defparam / smuggler

Smuggler - An HTTP Request Smuggling / Desync testing tool written in Python 3
MIT License
1.79k stars 291 forks source link

Error: Cannot find config file #5

Open nikitastupin opened 4 years ago

nikitastupin commented 4 years ago

Hi,

I've tried to use another config with -c option but smuggler returns an error:

$ python3 smuggler.py -c configs/doubles.py -u https://example.com 

  ______                         _              
 / _____)                       | |             
( (____  ____  _   _  ____  ____| | _____  ____ 
 \____ \|    \| | | |/ _  |/ _  | || ___ |/ ___)
 _____) ) | | | |_| ( (_| ( (_| | || ____| |    
(______/|_|_|_|____/ \___ |\___ |\_)_____)_|    
                    (_____(_____|               

     @defparam                         v1.1

[+] URL        : https://example.com
[+] Method     : POST
[+] Endpoint   : /
[+] Configfile : configs/doubles.py
[+] Timeout    : 5.0 seconds
[+] Cookies    : 0 (Appending to the attack)
[+] Error      : Cannot find config file

P.S. Hackish way to get around this is to copy desired config to default.py ๐Ÿ˜ƒ P.P.S. Thanks for the tool!

nikitastupin commented 4 years ago
$ python3 --version
Python 3.7.7

macOS Catalina 10.15.5

defparam commented 4 years ago

Hey Nikita,

Thanks for reporting the issue. This could be a documentation issue but the script searches for config files starting at the configs directory. The command for using doubles.py should be:

python3 smuggler.py -c doubles.py -u https://example.com

Please try that and let me know. Donโ€™t self-close this issue, at a minimum I want to update the documentation.

Thanks! Evan

nikitastupin commented 4 years ago

Hi Evan,

python3 smuggler.py -c doubles.py -u https://example.com this works just fine :)

Thanks for your response!

ayush-bagde commented 4 years ago

Sir Can we input our config file?? If yes, how because everytime i input the location or put .py file in config folder still shows config file not found. As you can see in the picture Screenshot from 2020-07-19 18-09-42

dannypete commented 3 years ago

@TechnicalPredator Smuggler has a small bug in attempting to figure out if the passed configfile path is an absolute path. As a result, the best bet is to put your configfile in the project's configs (e.g. "myconfig.py") folder and then use argument e.g. -c myconfig.py.

I've made a tiny PR for this. https://github.com/defparam/smuggler/pull/22