Skip to content

Instantly share code, notes, and snippets.

@Ge0rg3
Created August 19, 2018 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ge0rg3/5a1d71288bb44ff22ae93c9c6c0bea0a to your computer and use it in GitHub Desktop.
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
#!/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