maurosoria / dirsearch

Web path scanner
11.93k stars 2.31k forks source link

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

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 those 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