tristanlatr / WPWatcher

Wordpress Watcher is a wrapper for WPScan that manages scans on multiple sites and reports by email and/or syslog. Schedule scans and get notified when vulnerabilities, outdated plugins and other risks are found.
https://wpwatcher.readthedocs.io
Apache License 2.0
47 stars 18 forks source link

Auto delete /tmp/wpscan can cause No such file or directory error (rare) #13

Closed tristanlatr closed 3 years ago

tristanlatr commented 4 years ago

Error sample :

ERROR - WPScan command 'wpscan --format cli --no-banner --random-user-agent --disable-tls-checks --enumerate t,p,tt,cb,dbe,u,m --url ' failed with exit code 3 . WPScan output: [+] URL: [] [+] Effective URL: / [+] Started: Thu Apr 16 00:06:37 2020 [!] No WPVulnDB API Token given, as a result vulnerability data has not been output. [!] You can get a free API token with 50 daily requests by registering at https://wpvulndb.com/users/sign_up [+] Finished: Thu Apr 16 00:06:37 2020 [+] Requests Done: 4 [+] Cached Requests: 0 [+] Data Sent: 1.354 KB [+] Data Received: 75.075 KB [+] Memory used: 37.961 MB [+] Elapsed time: 00:00:00 Scan Aborted: No such file or directory @ rb_sysopen - /tmp/wpscan/cache/b20515b38b68645f5c87c5ac518148bb/1655927643 Trace: [...]

Currently the program tries to delete /tmp/wpscan and fails silently if errors. Initially, it delete /tmp/wpscan to save space, the cache can rapidly increase size to a few Gigas.

Could do a clear_wpscan_cache=Yes/No in the config and --clear argument

tristanlatr commented 4 years ago

This issue is caused by repetitive scans of the same target Workarround: add options --cache-ttl 0 in your wpscan_args config or arguments