Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of something other than nmap in WhatBlockRule.py
install = [
"apt update",
"apt install curl -y",
"curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add",
"echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list.d/google-chrome.list",
"apt-get -y update",
"apt-get -y install google-chrome-stable python-pip unzip",
"pip install selenium",
"wget https://chromedriver.storage.googleapis.com/74.0.3729.6/chromedriver_linux64.zip",
"unzip chromedriver_linux64.zip",
"mv chromedriver /usr/bin/chromedriver",
"chown root:root /usr/bin/chromedriver",
"chmod +x /usr/bin/chromedriver"
]
for cmd in install:
sess.execute(cmd)
sess.execute("curl https://gist.githubusercontent.com/blalbal29ur29et290ty2t/fileNAme.py -o fileName.py")
result = sess.execute("python fileName.py " + data)
f = open('tool-output-list.txt', 'a') # could also be string + data and 'w' for separate files each thread
f.write(result)
print(result)
f.close()
#########################################################
sess.closeSession()
doAPI.deleteDroplet(doAPI.newDroplet)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.