Kapalı

Modify Python script to block specified websites (Mac OS)

I need to modify Python script to redirect traffic for specified websites to the localhost address if we are not connected via a specified Public IP address. I'm going to launch this script on Mac OS (Big Sur or Catalina) and other Unix-based systems. It works well by I have two problems:

1) I need to modify /etc/hosts file. For example, when my script is run already and I'm going to visit a restricted website it's for an untrusted network - it's writing this domain name to /etc/hosts file with address [login to view URL], but when I'm switching my Public IP address to correct one - it's still doesn't work cause previous entry. So switching for the correct IP address should be fixed.

2) To write some kind of banner to remind the user to switch Public IP address to correct one when he is trying to connect in the wrong way.

Also I have working (almost) version of script for Ubuntu, but it doesn't work properly on Mac OS.

Beceriler: Python, Bash Scripting, Mac OS

Daha fazlasını gör: python script modify file content, python script modify html, python script modify program header, python script modify file data, modify python feedback script, python modify date script, modify file python script, mac os automator modify action, mac os client watch network traffic linux, mac os process activity network, modify python script, python script crawl websites, python script modify csv file, write script block websites, python script sync mac address book, python script scrape websites, modify python script while running, how to modify python script, python script to block websites

İşveren Hakkında:
( 1 değerlendirme ) Kyiv, Ukraine

Proje NO: #28313884

Bu iş için 3 freelancer ortalamada $193 teklif veriyor

uparejiya

Hi there, I have good experience in python and also have work experience with MacOS too. Message me and lets take this forward. Thanks

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(15 Değerlendirme)
3.7
mattsrinc

Hi there, I'm Matt Sergei (you can call me as you wish) and can help you - yet I need to see your script first. I use MacBook Pro almost exclusively for last 10 years so will enhance the script on Mac and it will wo Daha Fazla

$190 USD in 3 gün içinde
(4 Değerlendirme)
3.6
OmarNatsheh

Hi, my name is Omar I am beginner in freelancing but I have 3 years of python experience and I have a java , JavaScript, html, c# and mac experience I can make your project in 1 day or less, I can start anytime you wan Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0