Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

. .. icommitfelonies

🎯
Focusing
Block or report user

Report or block icommitfelonies

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@icommitfelonies
icommitfelonies / butchered-delete-tweets.py
Last active Aug 19, 2019
I'm a bad person. I should have just fixed the script in the repo of the original author, but opted to steal the TweetDestroyer module instead and wrap it with updated code to support the twitter json (not csv) - thanks @koenrh !
View butchered-delete-tweets.py
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=""
@icommitfelonies
icommitfelonies / mssql_interface.py
Last active Apr 27, 2019
Simple MSSQL python interface - you'll need to build all of your actual insert/query functions (don't forget to commit on insert! ;D)
View mssql_interface.py
# 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'
@icommitfelonies
icommitfelonies / image_meta_wipe.py
Created Apr 25, 2019
Clears metadata from images and creates a backup of the file (saved with appended _original)
View image_meta_wipe.py
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:
@icommitfelonies
icommitfelonies / PyKeyGen.py
Created Apr 25, 2019
SSH Key Generation tool - made to run from command line, but I used it as a module when I wrote it
View PyKeyGen.py
# 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'
@icommitfelonies
icommitfelonies / ActiveCLI Example
Last active Apr 26, 2019
Example as used in live code of an extremely simple and configurable command-line manager I wrote. I don't have the repo here, but I'll probably put it up soon once I can remember how the hell to use it. Found this while looking for examples in my own code. :p
View ActiveCLI Example
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()']]
]
]
View WhatBlockRule.py
import datetime
import digitalocean
import iptools
import json
import os
import Queue
import shlex
import string
import subprocess
import sys
@icommitfelonies
icommitfelonies / awsEmailCheck.py
Last active May 20, 2019
Determines if there is an AWS account associated with a given email address
View awsEmailCheck.py
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")
@icommitfelonies
icommitfelonies / whatblockrule-example.txt
Created Apr 29, 2019
Example of something other than nmap in WhatBlockRule.py
View whatblockrule-example.txt
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",
You can’t perform that action at this time.