wireghoul/dotdotpwn

System-wide install

zar3bski opened this issue · 1 comments

While trying to install dotdotpwn in a docker image, I noticed the following at run time when executing dotdotpwn

Cannot open User-Agents.txt file: No such file or directory at /usr/lib/perl5/vendor_perl/DotDotPwn/HTTP_Url.pm 

dotdotpwn was installed that way

cp -r dotdotpwn-3.0.2/DotDotPwn/ /usr/lib/perl5/vendor_perl
cp dotdotpwn-3.0.2/dotdotpwn.pl /usr/bin/dotdotpwn

Libraries are found from /usr/lib/perl5/vendor_perl, no problem, but this specific resource (User-Agents.txt) cannot be found by HTTP_Url.pm even-though it is right next to it

bash-5.0# ls /usr/lib/perl5/vendor_perl/DotDotPwn/
BisectionAlgorithm.pm  File.pm                HTTP.pm                Payload.pm             TFTP.pm                User-Agents.txt
FTP.pm                 Fingerprint.pm         HTTP_Url.pm            STDOUT.pm              TraversalEngine.pm

I do not know how relative path is handled by pearl but I wondered if my current problem had anything to do with this specific line

open(AGENTS, "DotDotPwn/User-Agents.txt") or die "[-] Cannot open User-Agents.txt file: $!";

It might sound naive but, from the standpoint of HTTP_Url.pm , isn't User-Agents.txt supposed to be at ./User-Agents.txt instead of DotDotPwn/User-Agents.txt?

I am a complete noob with pearl so I am open to any cleaner way to install this tool system wide

This is not a project issue, there are Linux distros have packaged the project. Maybe look at their scripts or use their package.