Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (21 sloc) 1.01 KB
from wordpot.plugins_manager import BasePlugin
class Plugin(BasePlugin):
def run(self):
# Initialize template vars dict
self.outputs['template_vars'] = {}
# First check if the file is wp-login.php
if not (self.inputs['filename'] == 'wp-login' and self.inputs['ext'] == 'php'):
return
# Logic
origin = self.inputs['request'].remote_addr
if self.inputs['request'].method == 'POST':
username = self.inputs['request'].form['log']
password = self.inputs['request'].form['pwd']
self.outputs['log'] = '%s tried to login with username %s and password %s' % (origin, username, password)
self.outputs['template_vars']['BADLOGIN'] = True
self.outputs['template'] = 'wp-login.html'
else:
self.outputs['log'] = '%s probed for the login page' % origin
self.outputs['template_vars']['BADLOGIN'] = False
self.outputs['template'] = 'wp-login.html'
return
Jump to Line
Something went wrong with that request. Please try again.