Plugin extension added + SVN files plugin
parent
fb2560f329
commit
2567ba845b
|
@ -1,2 +1,31 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
import requests
|
||||
import re
|
||||
import json
|
||||
import os
|
||||
import imp
|
||||
|
||||
from wordpress import *
|
||||
|
||||
class Load_Plugins:
|
||||
plugin_folder = "./plugins"
|
||||
|
||||
def __init__(self, wordpress):
|
||||
available_plugins = os.listdir(self.plugin_folder)
|
||||
|
||||
for plugins in available_plugins:
|
||||
if not ".pyc" in plugins and not "__init__" in plugins:
|
||||
|
||||
# Find and load the package
|
||||
name = plugins.replace('.py','')
|
||||
f, file, desc = imp.find_module('plugins', ['.'])
|
||||
pkg = imp.load_module('plugins', f, file, desc)
|
||||
|
||||
# Find and load the plugin
|
||||
f, file, desc = imp.find_module(name, pkg.__path__)
|
||||
loaded = imp.load_module('plugins.' + name, f, file, desc)
|
||||
|
||||
# Run the __init__
|
||||
print notice('Plugin %s loaded.' % loaded.name)
|
||||
loaded.__init__(wordpress)
|
1
main.py
1
main.py
|
@ -38,6 +38,7 @@ if __name__ == "__main__":
|
|||
# Build a new wordpress object
|
||||
wp = Wordpress(results.url, results.random_agent)
|
||||
Scan_Engine(wp, results.aggressive)
|
||||
Load_Plugins(wp)
|
||||
|
||||
else:
|
||||
parser.print_help()
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# name : Example Title
|
||||
# description : Example description
|
||||
# author : Wordpresscan Team
|
||||
|
||||
import requests
|
||||
|
||||
name = "Example-Plugin"
|
||||
|
||||
def __init__(wordpress):
|
||||
# INSERT CODE HERE!
|
||||
return
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# name : SVN configuration files
|
||||
# description : Check for the file http://blog.domain.com/.svn/text-base/wp-config.php.svn-base
|
||||
# author : Wordpresscan Team
|
||||
|
||||
import requests
|
||||
|
||||
name = "SVN configuration files"
|
||||
|
||||
def __init__(wordpress):
|
||||
payload = ".svn/text-base/wp-config.php.svn-base"
|
||||
r = requests.get(wordpress.url + payload, headers={"User-Agent":wordpress.agent})
|
||||
|
||||
if "200" in str(r):
|
||||
print "Wordpress configuration found from SVN !"
|
Loading…
Reference in New Issue