Tuhinshubhra / CMSeeK

CMS Detection and Exploitation suite - Scan WordPress, Joomla, Drupal and over 180 other CMSs
GNU General Public License v3.0
2.31k stars 497 forks source link

Consider using urllib.parse.urljoin in wp/init.py #103

Open ByteDestroyer opened 4 years ago

ByteDestroyer commented 4 years ago

The plugin section in file deepscans/wp/init.py is appending the text /wp-content/plugins/ to the current URL to list the plugins. The problem is that the URL is not always the root domain and it could be changed to a folder it redirects. Ex: https://mydomain.com redirects to https://mydoamin.com/new-site/ and theme URLs are printed as https://mydoamin.com/new-site//wp-content/plugins/[plugin]. This can be easily fix with the use of urllib.parse.urljoin. Ex: sresult.end_subsub('URL: ' + cmseek.fgreen + urllib.parse.urljoin(url, f'/wp-content/plugins/{plug[0]}') + cmseek.cln). Could you also save the plugin URL in the output file? I noticed the results are printed but not saved into the output file.