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
from datetime import datetime | |
import json, os, twitter, io, time | |
string_input_with_date = "01/01/2018" | |
file_name = 'tweet.js' | |
TWITTER_CONSUMER_KEY="" | |
TWITTER_CONSUMER_SECRET="" | |
TWITTER_ACCESS_TOKEN="" | |
TWITTER_ACCESS_TOKEN_SECRET="" |
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
# Universally usable MSSQL interface Just modify the connection info and add specific module if necessary | |
import datetime, pyodbc | |
class MSSQLinterface(): | |
# Init module | |
def __init__(self): | |
# Pulls global connection info into properties | |
self.dbUser = 'sa' | |
self.dbPass = 'password' |
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
import magic, os, shutil | |
from gi.repository import GExiv2 | |
def createBackupFile(filePath): | |
if os.path.isfile(filePath): | |
shutil.copyfile(filePath, filePath + "_original") | |
def wipeImageMetadata(filePath): | |
exif = GExiv2.Metadata(filePath) | |
try: |
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
# PyKeyGen - Simplified SSH Key Generation | |
import getpass, os, sys | |
class PyKeyGen(): | |
def __init__(self): | |
# Base Command To Use | |
self.baseCMD = 'ssh-keygen -t {0} -b {1} -C "{2}" -N "{3}" -f {4}' | |
self.sshDir = '~/.ssh/' | |
# Default SSH Key Settings | |
self.defaultFormat = 'rsa' | |
self.defaultBits = '2048' |
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
activeCommands =[ | |
['sleepmon',[ | |
['start', 'startSystemSleepMonitor(); cd printMsg(\'System Sleep Monitor has been started\', 0, True)'], | |
['stop', 'global sleepMonitorKill; sleepMonitorKill = True'], | |
['status', "'sleepmon: active' if sleepMonitorKill else 'sleepmon: inactive'"]] | |
], | |
['connect',[ | |
['global tm; tm = TunnelManager(); tm.initSSH()']] | |
] | |
] |
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
import datetime | |
import digitalocean | |
import iptools | |
import json | |
import os | |
import Queue | |
import shlex | |
import string | |
import subprocess | |
import sys |
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
import re | |
import sys | |
import subprocess | |
from time import sleep # Can be optimized / replaced | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
def bruteAmazonEmailLogin(userEmail): | |
options = Options() | |
options.add_argument("--headless") |
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", |