Hi, first of all you have a made work! congratulations WPScanTeam!. So, I'm using the docker container provided but I need to save logs into my machine to process before and create a visual report, how to extract logs file from Docket Container?.
Current command:
docker run -it --rm wpscanteam/wpscan -u http://{target} --random-agent --batch --no-color --no-banner --log {target}.txt --enumerate vt,tt,u,vp
Thanks
Copied from the readme :)
# the file must exist prior to starting the container, otherwise docker will create a directory with the filename
touch ~/FILENAME
docker run -it --rm -v ~/FILENAME:/wpscan/output.txt wpscanteam/wpscan --url https://yourblog.com --log /wpscan/output.txt
This mounts the file on the host system into the docker container and so the logfile will be written to the host.
I'm sorry, I'll try in a few minutes. Thanks
Tried this cmd and doesn't seem to work for me.
Should i create a separate issue?
touch ~/output.txt
docker run -it --rm -v ~/output.txt:/wpscan/output.txt wpscanteam/wpscan -u myblog.com --enumerate vp,vt --follow-redirection --batch 鈥攍og /wpscan/output.txt
You need a double dash for the log parameter
@FireFart yes that's a typo there sorry, but i used the right syntax to run it.
Tried another variety as follows:
touch ~/output;
docker run -it --rm -v ~/output:/wpscan/output.txt wpscanteam/wpscan -u myblog.com --log output.txt --enumerate vp,vt --follow-redirection --batch
and got some error:
/wpscan/lib/common/hacks.rb:24:in `initialize': Is a directory @ rb_sysopen - /wpscan/output.txt (Errno::EISDIR)
This now generates an output.txt in the output folder, which is an improvement, but it's empty (due to error). Thanks for checking.
output exists as a directory (I assume you ran it first without the touch statement). Just remove the folder and try again
rm -rf ~/output.txt
touch ~/output.txt
docker run -it --rm -v ~/output.txt:/wpscan/output.txt wpscanteam/wpscan -u myblog.com --enumerate vp,vt --follow-redirection --batch 鈥攍og /wpscan/output.txt
had to pull the latest image. it now finished the run, but the output.txt file is still empty. anything else i can check please @FireFart ?
Is the default command working for you?
rm -rf ~/output.txt
touch ~/output.txt
docker run -it --rm -v ~/output.txt:/wpscan/output.txt wpscanteam/wpscan --url https://yourblog.com --log /wpscan/output.txt
@FireFart tried that but i only get this error the last few tries:
[!] Error with logfile /wpscan/output.txt:
[!] Permission denied @ rb_sysopen - /wpscan/output.txt
Update: This now works on my Mac with latest Docker CE, but not on my server with a much older version.
@irrashai try the -u root flag when running wpscan.
Thank you @FireFart for solutions and @irrashai for reply, I tried last code and works perfectly
Most helpful comment
Is the default command working for you?