maurosoria / dirsearch

Web path scanner
11.93k stars 2.31k forks source link

Allow dirsearch to use a non-default network interface #1323

Closed huyphan closed 1 year ago

huyphan commented 1 year ago

Description

This change allows users to configure dirsearch to use specific network interface instead of the default one. This is useful for users who have more than one egress interfaces on their machines.

Testing

With the change in place, I was able to pick the network interface when running dirsearch (targetting my own service) and could verify that dirsearch did pick up the designated interface (by looking at the access log of my server).

$ tcpdump --list-interfaces
1.eno1 [Up, Running, Connected]
2.wg0 [Up, Running]

# These two commands resulted in two different IPs being logged in my service's access logs. 
$ pipenv run python dirsearch.py -u <my-service> --interface eno1
$ pipenv run python dirsearch.py -u <my-service> --interface wg0

Requirements

shelld3v commented 1 year ago

Hi @huyphan, thank you for your contribution, can you make another PR from this branch? Some stuff got messed up on my side

huyphan commented 1 year ago

Sure thing. New draft pull request is now created: https://github.com/maurosoria/dirsearch/pull/1325. I'm waiting for all the workflows to complete before publishing it.

Not sure why the workflows in this PR kept using the old commit though.