MCPcopy
hub / github.com/CreditTone/hooker / un_proxy

Function un_proxy

hooker.py:1404–1410  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1402 ssl_log(f"{current_identifier}/r0capture_ssl.pcap", True)
1403
1404def un_proxy():
1405 run_su_command(r"for i in $(iptables -t nat -L OUTPUT --line-numbers | grep REDIRECT |grep 12345 | awk \"{print \$1}\" | sort -rn); do iptables -t nat -D OUTPUT $i; done")
1406 run_su_command("iptables -t nat -F REDSOCKS")
1407 run_su_command("iptables -t nat -D OUTPUT -p tcp -j REDSOCKS")
1408 run_su_command("iptables -t nat -X REDSOCKS")
1409 run_su_command("killall redsocks")
1410 run_su_command("pid=$(ps -ef | grep '[r]edsocks' | awk '{print $2}'); [ -n \"$pid\" ] && kill -9 $pid")
1411
1412def set_proxy(proxy):
1413 pattern = r'(http|socks5)://(\d{2,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(\d+)$'

Callers 2

set_proxyFunction · 0.85
handle_commandFunction · 0.85

Calls 1

run_su_commandFunction · 0.85

Tested by

no test coverage detected