Li Zong Posted November 10, 2022 Share Posted November 10, 2022 (edited) I created this workflow. No dependency. How to Use Quick View hosts Add (if the corresponding domain name already exists, it will be updated) hosts add 127.0.0.1 google.com Delete hosts del google.com Note: Set the system password to the value of password. (requires administrator privileges to modify the hosts file Download... | Github Edited November 10, 2022 by Li Zong Link to comment Share on other sites More sharing options...
vitor Posted November 10, 2022 Share Posted November 10, 2022 Thank you for the submission, but this requires having the macOS system password in plain text in the workflow, which is not great for security. It means that anyone could open the workflow and see what your password is. Don’t want to incentivise users to do that. An alternative might be to use AppleScript’s do shell script with administrator privileges, which should trigger macOS to ask for the password or biometric authentication at the time of changes. Two other notes for future submissions:The contents should be in English-only.The screenshot doesn’t follow the method requested in the pinned post. Link to comment Share on other sites More sharing options...
Li Zong Posted November 11, 2022 Author Share Posted November 11, 2022 14 hours ago, vitor said: Thank you for the submission, but this requires having the macOS system password in plain text in the workflow, which is not great for security. It means that anyone could open the workflow and see what your password is. Don’t want to incentivise users to do that. An alternative might be to use AppleScript’s do shell script with administrator privileges, which should trigger macOS to ask for the password or biometric authentication at the time of changes. Two other notes for future submissions: The contents should be in English-only. The screenshot doesn’t follow the method requested in the pinned post. thank you for your reply. The original intention of the design is to be unwilling to enter the password when modifying the hosts file, so the process is to save the password directly. Secondly, because I am using it personally, I have not considered security. I will pay more attention to this issue in the future. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now