Jump to content

Hosts-manager


Li Zong

Recommended Posts

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

 

image.thumb.png.df12e2c43f42375f54066c228388112b.png

Edited by Li Zong
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...