hansmach1ne / LFImap

Local File Inclusion discovery and exploitation tool
Apache License 2.0
194 stars 29 forks source link

Args to parse arguments #59

Closed nrathaus closed 2 weeks ago

nrathaus commented 4 weeks ago

At the moment args is being init every time the import occurs - this is not a good idea programmatically

It should be init only once

I have made the smallest possible change to prevent it, a better change would be to use a class for args instead of a function, but this change is also good enough

Unfortunately this is one of the needed change to prevent the cyclic dependencies

nrathaus commented 4 weeks ago

I think a better way to do this change would be to not have everyone access the args, rather global variables so instead of args.lhost

Use: LHOST = ...

This will prevent:

  1. Modification of the args.lhost and similar (by mistake)
  2. Allow testing scripts to be added (pytest cannot pass cmdline arguments)