smuggler icon indicating copy to clipboard operation
smuggler copied to clipboard

Error: Cannot find config file

Open nikitastupin opened this issue 4 years ago • 5 comments

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 avatar Jun 21 '20 08:06 nikitastupin

$ python3 --version
Python 3.7.7

macOS Catalina 10.15.5

nikitastupin avatar Jun 21 '20 08:06 nikitastupin

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

defparam avatar Jun 21 '20 12:06 defparam

Hi Evan,

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

Thanks for your response!

nikitastupin avatar Jun 22 '20 08:06 nikitastupin

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

ayush-bagde avatar Jul 19 '20 12:07 ayush-bagde

@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

dannypete avatar Oct 14 '20 19:10 dannypete