Created
August 19, 2018 23:44
-
-
Save Ge0rg3/5a1d71288bb44ff22ae93c9c6c0bea0a to your computer and use it in GitHub Desktop.
A script for checking a list of programs against those on https://gtfobins.github.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#Usage: "python EscapeMe.py filename", where filename is a file containing a list of binaries. | |
import requests as rq | |
from bs4 import BeautifulSoup | |
import sys | |
resp = rq.get("https://gtfobins.github.io/").text | |
soup = BeautifulSoup(resp, 'html.parser') | |
try: filename = sys.argv[1] | |
except: print("Usage: python EscapeMe.py filename") | |
with open(filename,'r') as f: | |
text = f.read() | |
offline_li = list(set(text.split())) | |
online_li = [str(i.text) for i in soup.findAll("a", class_="bin-name")] | |
overlap = [i for i in online_li if i in offline_li] | |
if any(overlap): | |
print("Possible escape vectors:\n########################") | |
for count, i in enumerate(overlap): | |
print("%d: %s" % (count+1, i)) | |
else: | |
print("No escape vectors found!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment