Skip to content

Instantly share code, notes, and snippets.

View ustayready's full-sized avatar

ustayready ustayready

View GitHub Profile
@ustayready
ustayready / badge.py
Created October 18, 2023 16:37
Minicom python
import subprocess
def start_minicom(serial_port):
try:
# Run minicom in the background to listen to the serial port
minicom_process = subprocess.Popen(['minicom', '-D', serial_port], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Wait for minicom to finish (you can add a loop to continue running if needed)
minicom_process.wait()
@ustayready
ustayready / aes.py
Created October 12, 2023 21:22
Simple AES ECB Encryption/Decryption
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
from base64 import b64encode, b64decode
def encrypt_text(plaintext, key):
key = bytes(key, 'ascii') + b'\x00' * (16-len(key))
cipher = AES.new(key, AES.MODE_ECB)
ciphertext = cipher.encrypt(pad(plaintext.encode(), AES.block_size))
return ciphertext
@ustayready
ustayready / gpt.py
Created January 16, 2023 23:49
CloudGPT - Use ChatGPT to analyze AWS policies for vulnerabilities
import openai
import boto3
import json
import time
from typing import Dict, List
openai.api_key = '### SET YOUR OPENAPI API KEY HERE ###'
session = boto3.session.Session()
client = session.client('iam')
@ustayready
ustayready / spoof.py
Created April 13, 2022 13:22
Simple unfinished SMTP spoof script for use with Office365 DirectSend SmartHosts
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
import ssl
import email
import argparse
import os.path
import pefile
print('#pragma once')
target_dll = r'target.dll'
pe = pefile.PE(target_dll)
for export in pe.DIRECTORY_ENTRY_EXPORT.symbols:
if export.name:
name = export.name.decode()
@ustayready
ustayready / kerberos_attacks_cheatsheet.md
Created August 12, 2020 16:48 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@ustayready
ustayready / version.txt
Last active May 29, 2020 14:57
Version
1.0
@ustayready
ustayready / google_lure.py
Last active September 23, 2024 20:18
Generate phishing lures that exploit open-redirects from www.google.com using Google Docs
from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from apiclient import errors
import re
from bs4 import BeautifulSoup as Soup