pythonsession-hijacking

Whats the error in this python code?


What do i do to solve it? Terminal output is:

abhi@abhi-desktop:~/Desktop/sslstrip-0.1$ python sslstrip.py --listen=3130
Traceback (most recent call last):
  File "sslstrip.py", line 254, in 
    main(sys.argv[1:])
  File "sslstrip.py", line 246, in main
    server = ThreadingHTTPServer(('', listenPort), StripProxy)
  File "/usr/lib/python2.6/SocketServer.py", line 400, in init
    self.server_bind()
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.6/SocketServer.py", line 411, in server_bind
    self.socket.bind(self.server_address)
  File "", line 1, in bind
TypeError: an integer is required
abhi@abhi-desktop:~/Desktop/sslstrip-0.1$ 

Here is a 21kb code given... Download link


Solution

  • Does it fail when you don't specify a port?

    My guess is that listenPort is coming out of the option parsing as a string and needs to be cast to an in sslstrip.py on line 77.