hansmach1ne / LFImap

Local File Inclusion discovery and exploitation tool
Apache License 2.0
214 stars 32 forks source link

Bug: uncaught exception -- args.method is None #38

Closed chovanecadam closed 10 months ago

chovanecadam commented 1 year ago

The args.method is undefined if -M is not specified and the placeholder (--placeholder, args.param) is not part of the URL. This causes the application to crash.

bug

The issue lies in the following lines:

https://github.com/hansmach1ne/LFImap/blob/436ea01b5b81cef17f01684c221c453830f381fc/lfimap.py#L1623-L1632

One possible solution would be setting default method in the optionsGroup.add_argument call or rewriting the code in this fashion:

if (args.url and args.param in args.url): args.method = "GET" 
hansmach1ne commented 1 year ago

Thanks for taking an interest in LFImap. The snippet you pasted above is bad and will hopefully be fixed this week.

mastercho commented 1 year ago

Just noticed same issue

hansmach1ne commented 1 year ago

@chovanecadam

Implemented additional checks and default fallback method if it is not specified. Could you please git pull and check if everything works for you now?

hansmach1ne commented 11 months ago

I reopened this issue, because I noticed a few edge cases bugs with -R, -F modules. Will be fixing asap and test thoroughly new automatic parameter recognition feature, together with custom parameter specification with 'PWN'.