Created
April 29, 2019 16:05
-
-
Save flerpadoo/8ee767539930970cdd76cde6087f7c36 to your computer and use it in GitHub Desktop.
Example of something other than nmap in WhatBlockRule.py
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
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