On 30.01.19 20:09, Alberto Garcia wrote: > Andreas, You can use Till example in this thread along with this > commands for the ssh client: > ssh -vvv -o StrictHostKeyChecking=no -D 0.0.0.0:11223 > <http://0.0.0.0:11223/> 10.104.1.115 -p 2222 -N > > and to make it crash just run: > > import requests > import threading > def do_request(): > while 1: > resp = requests.get('http://go.to <http://go.to/>', > > proxies=dict(http='socks5://127.0.0.1:11223 > <http://127.0.0.1:11223/>', > https='socks5:// 127.0.0.1 > :11223')) > print(resp.status_code) > for i in range(0,5): > try: > t=threading.Thread(target=do_request) > t.start() > except: > print ("Error: unable to start thread") > while 1: > pass > > > Let me know if you have any questions or you can't make it crash.
On my distro (Ubuntu 16.04) I had to adapt the script a bit: import requests import threading import socket import socks # Set up a proxy socks.set_default_proxy(socks.SOCKS5, '127.0.0.1', 11223) socket.socket = socks.socksocket def do_request(): while 1: resp = requests.get('http://go.to') print(resp.status_code) for i in range(0,5): try: t=threading.Thread(target=do_request) t.start() except: print ("Error: unable to start thread") while 1: pass