noobpk / auto-change-tor-ip

Automatically change tor ip address over time when accessing the internet. Make it private and safe for you
MIT License
93 stars 29 forks source link

[WARNING] - Your IP Already Exist - Request New IP ; Job for tor.service failed. #9

Open Marietto2008 opened 5 months ago

Marietto2008 commented 5 months ago

Hello.

I tried to run the script called "auto-change-tor-ip",but in my case it didn't work : (I'm running ubuntu 23.10). Do you want to help me to fix it ? thanks.


(.venv) root@Z390-AORUS-PRO-DEST:/home/ziomario/Scaricati/auto-change-tor-ip# python3 autorip.py
              _             _       
             | |           (_)      
   __ _ _   _| |_ ___  _ __ _ _ __  
  / _` | | | | __/ _ \| '__| | '_ \ 
 | (_| | |_| | || (_) | |  | | |_) |
  \__,_|\__,_|\__\___/|_|  |_| .__/ 
                             | |    
                             |_|    
    Automatically Change Tor Ip Address #noobteam

[*]___author___: @noobpk
[*]___version___: 1.3 alpha

[INFO] - [*] Detect Platform
[INFO] - [*] Linux - KALI LINUX - UBUNTU
[INFO] - [+] Check Requirement
[INFO] - [*] Tor has been install
[INFO] - [*] TorSocks has been install
[INFO] - [*] Privoxy has been install
[INFO] - [*] File listip.txt has been created
[INFO] - [*] Current IP Address : 71.55.27.189
[INFO] - [*] Start service Tor
[INFO] - [*] Start service Privoxy
[INFO] - [*] Add to your browsers HTTP Proxy 127.0.0.1:8118
[INFO] - [*] Access Privoxy Manager http://p.p/
[INFO] - [*] Set time stamp

[?] Time to auto change ip by second (default 600s):30
[?] Number of loop (default 144):

[INFO] - [*] Change New IP

[WARNING] - Your IP Already Exist - Request New IP

[WARNING] - Your IP Already Exist - Request New IP

[WARNING] - Your IP Already Exist - Request New IP

[WARNING] - Your IP Already Exist - Request New IP

[WARNING] - Your IP Already Exist - Request New IP
Job for tor.service failed.
See "systemctl status tor.service" and "journalctl -xeu tor.service" for details.

[WARNING] - Your IP Already Exist - Request New IP
Job for tor.service failed.
See "systemctl status tor.service" and "journalctl -xeu tor.service" for details.

[WARNING] - Your IP Already Exist - Request New IP
Job for tor.service failed.
See "systemctl status tor.service" and "journalctl -xeu tor.service" for details.

[WARNING] - Your IP Already Exist - Request New IP
Job for tor.service failed.
See "systemctl status tor.service" and "journalctl -xeu tor.service" for details.

[WARNING] - Your IP Already Exist - Request New IP
Job for tor.service failed.
See "systemctl status tor.service" and "journalctl -xeu tor.service" for details.

[WARNING] - Your IP Already Exist - Request New IP
Job for tor.service failed.
See "systemctl status tor.service" and "journalctl -xeu tor.service" for details.
^CKeyboardInterrupt

[WARNING] - [#] KeyboardInterrupt
[INFO] - [*] Stop service Tor
^Z<
[1]+  Stopped                 python3 autorip.py

As you can see,it is not able to request a new IP. The script is broken.

In addition,when I open the website : 127.0.0.1:8118 -----> I get this error : invalid header received from client.

and http://p.p/ ====> Uhm… we aren't able to find this website.

this is the log :

× tor.service - Anonymizing overlay network for TCP (multi-instance-master)
     Loaded: loaded (/lib/systemd/system/tor.service; enabled; preset: enabled)
     Active: failed (Result: start-limit-hit) since Sun 2024-01-21 23:39:00 CET; 26min ago
   Duration: 161ms
    Process: 10397 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 10397 (code=exited, status=0/SUCCESS)
        CPU: 916us

Z390-AORUS-PRO-DEST systemd[1]: Failed to start tor.service - Anonymizing overlay network for TCP (multi-instance-master).

Z390-AORUS-PRO-DEST systemd[1]: tor.service: Start request repeated too quickly.

Z390-AORUS-PRO-DEST systemd[1]: tor.service: Failed with result 'start-limit-hit'.

Z390-AORUS-PRO-DEST systemd[1]: Failed to start tor.service - Anonymizing overlay network for TCP (multi-instance-master).

Z390-AORUS-PRO-DEST systemd[1]: tor.service: Start request repeated too quickly.

Z390-AORUS-PRO-DEST systemd[1]: tor.service: Failed with result 'start-limit-hit'.

Z390-AORUS-PRO-DEST systemd[1]: Failed to start tor.service - Anonymizing overlay network for TCP (multi-instance-master).

Z390-AORUS-PRO-DEST systemd[1]: tor.service: Start request repeated too quickly.

Z390-AORUS-PRO-DEST systemd[1]: tor.service: Failed with result 'start-limit-hit'.

Z390-AORUS-PRO-DEST systemd[1]: Failed to start tor.service - Anonymizing overlay network for TCP (multi-instance-master).
noobpk commented 5 months ago

Read this article and you may find a solution to your problem: https://www.reddit.com/r/TOR/comments/16msfmf/cannot_start_torservice_start_request_repeated/

Marietto2008 commented 5 months ago

I've modified the torrc config file and now the error is changed :


[*] Detect Platform
[INFO] - [*] Linux - KALI LINUX - UBUNTU
[INFO] - [+] Check Requirement
/usr/sbin/tor
/usr/bin/torsocks
/usr/sbin/privoxy
[INFO] - [*] Tor has been installed
[INFO] - [*] TorSocks has been installed
[INFO] - [*] Privoxy has been installed
[INFO] - [*] File listip.txt has been created
[INFO] - [*] Current IP Addresss
71.35.27.189
[INFO] - [*] Start service Tor
[INFO] - [*] Start service Privoxy
[INFO] - [*] Add to your browsers HTTP Proxy 127.0.0.1:8118
[INFO] - [*] Access Privoxy Manager http://p.p/
[INFO] - [*] Set time stamp
[?] Time to auto change ip by second (default 600s):30
[?] Number of loop (default 144):
[INFO] - [*] Change New IP

**PERROR torsocks[44152]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:202)**

[INFO] - [*] Successfully - Your IP has been Changed
[INFO] - [*] New IP Addresss:
71.35.27.189
Marietto2008 commented 5 months ago

On your instructions you haven't included the working conf. file for tor and privoxy. This can cause problems for the newbies. Do you want to add the correct config file,please ? I'm using these parameters,but the error persists :

/etc/tor/torrc :

RunAsDaemon 1
ORPort 62464
Nickname superman
BridgeRelay 1

/etc/tor/torsocks.conf

TorAddress 127.0.0.1
TorPort 9150
OnionAddrRange 127.42.42.0/24

on my router I opened ports : 62464 ; 9150 ; 9050 ; 9100 ; 8118 ;

Marietto2008 commented 5 months ago

This is interesting to understand how to fix your script : (I don't know yet how)

(.venv) root@Z390:/home/ziomario/auto-change-tor-ip# torsocks wget -qO - https://api.ipify.org; echo

PERROR torsocks[54597]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:202)

BUT this seems to work :

(.venv) root@Z390:/home/ziomario/auto-change-tor-ip# proxychains4 wget -qO - https://api.ipify.org; echo

[proxychains] config file found: /etc/proxychains4.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.16
[proxychains] Strict chain  ...  127.0.0.1:9050  ...  api.ipify.org:443  ...  OK
185.217.125.210

I've modified your script asking to install proxychains4 :

os.system('apt-get install torsocks proxychains-ng -y')

and I have modified this line :

currentip = os.system(
                **"proxychains4 wget -qO- http://ipecho.net/plain ; echo")**
            socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)

but it still does not work :

[proxychains] Strict chain ... 127.0.0.1:9050 ... timeout