P0cL4bs / wifipumpkin3

Powerful framework for rogue access point attack.
http://wifipumpkin3.github.io/
Apache License 2.0
1.87k stars 284 forks source link

crash when getting some url #261

Open vricosti opened 4 months ago

vricosti commented 4 months ago

Please, before opening a new issue, please make sure that what you are about to report has not been reported already or is not included on the website FAQ list.

Description of the bug or feature request I am starting wifipumpin3 to capture the commands sent by the FreeTéléc mobie application on IOS with the following pulp script:

set interface wlo1
set ssid Pumpkin
set security true
set security.wpa_algorithms CCMP
set security.wpa_sharedkey 314123789
set proxy pumpkinproxy
ignore pydns_server

Then I connect to the Pumpkin ssid on my iPhone (maybe I should also connect my TV...) and then I start the launch the application and I let it discover my internet/tv box and I can see the following crash:

[  sniffkin3  ] 15:30:57  - [ 10.0.0.21 > 212.27.40.254 ] GET hd1.freebox.fr/pub/channels 
 [  sniffkin3  ] 15:30:57  - [ 10.0.0.21 > 212.27.40.253 ] GET hd2.freebox.fr/pub/channels 
 [  pumpkinproxy  ] 15:31:27  - Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/wifipumpkin3/plugins/bin/sslstrip3.py", line 171, in main
    init(sys.argv[1:])
  File "/usr/local/lib/python3.10/dist-packages/wifipumpkin3/plugins/bin/sslstrip3.py", line 167, in init
    reactor.run()
  File "/usr/local/lib/python3.10/dist-packages/twisted/internet/base.py", line 695, in run
    self.mainLoop()
  File "/usr/local/lib/python3.10/dist-packages/twisted/internet/base.py", line 705, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/local/lib/python3.10/dist-packages/twisted/internet/base.py", line 1090, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/usr/local/lib/python3.10/dist-packages/twisted/internet/tcp.py", line 487, in failIfNotConnected
    self.connector.connectionFailed(failure.Failure(err))
  File "/usr/local/lib/python3.10/dist-packages/twisted/internet/base.py", line 1297, in connectionFailed
    self.factory.clientConnectionFailed(self, reason)
  File "/usr/local/lib/python3.10/dist-packages/wifipumpkin3/plugins/external/sslstrip/ServerConnectionFactory.py", line 44, in clientConnectionFailed
    self.headers["host"],
builtins.KeyError: 'host'

To Reproduce Steps to reproduce the behavior:

  1. Start wifipumpkin3 with the [pumpkin.pulp.txt](https://github.com/P0cL4bs/wifipumpkin3/files/15110848/pumpkin.pulp.txt)
  2. sudo wifipumpkin3 --pulp pumpkin.pulp
  3. Download FreeTéléc on iOS
  4. Start FreeTéléc and start to discover your box/tv

Expected behavior I expect no crash ins the logs

Desktop (please complete the following information):

vricosti commented 4 months ago

Actually the host is not reachable so in this case instead of an exception it would be better to catch and display something like: host cannot be reached .... It seems you already have fixed this bug but something went wrong ...