Skip to content

Instantly share code, notes, and snippets.

@yehgdotnet
yehgdotnet / delete-git-recursively.sh
Created March 13, 2018 14:25 — forked from facelordgists/delete-git-recursively.sh
Recursively remove .git folders
( find . -type d -name ".git" && find . -name ".gitignore" && find . -name ".gitmodules" ) | xargs rm -rf
@yehgdotnet
yehgdotnet / gitupdate.sh
Created March 13, 2018 14:31
git update all
git add -A
echo "Press enter to commit"
read varname
git commit --all -m "$1"
echo "Press enter to push"
read varname
git push
@yehgdotnet
yehgdotnet / mandros.py
Created March 20, 2018 13:41 — forked from xassiz/mandros.py
Reverse MSSQL shell
import sys
import requests
import threading
import HTMLParser
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
'''
Description: Reverse MSSQL shell through xp_cmdshell + certutil for exfiltration
Author: @xassiz
'''
@yehgdotnet
yehgdotnet / dsreader.sh
Created March 22, 2018 03:24
.DS_Store Reader shell script
xxd -p .DS_Store | sed 's/00//g' | tr -d '\n' | sed 's/\([0-9A-F]\{2\}\)/0x\1 /g' | xxd -r -p | strings | sed 's/ptb[LN]ustr//g'
@yehgdotnet
yehgdotnet / pyt_scan.bat
Last active December 8, 2019 20:30
pyt scan wrapper (Windows bash script)
# https://github.com/python-security/pyt - python secure code scanner
@echo off
IF %1.==. GOTO No1
IF %2.==. GOTO Missing_Argument
set dir=%1
set type=%2
dir /s /b %dir% | find ".py" > source_listing.txt
@yehgdotnet
yehgdotnet / settings.py
Last active November 5, 2019 04:23
Django secure settings
# https://docs.djangoproject.com/en/2.0/ref/settings/
# https://docs.djangoproject.com/en/2.0/ref/settings/#csrf-cookie-httponly
# Ensure malicious script cannot access CSRF cookie
CSRF_COOKIE_HTTPONLY = True
# https://docs.djangoproject.com/en/2.0/ref/settings/#csrf-use-sessions
# Using session is safer than cookie as the former is server-side storage whilst the former is client-side stoage
CSRF_USE_SESSIONS = True
@yehgdotnet
yehgdotnet / settings.py
Created March 26, 2018 11:02
Django - Load Environment variables for safe handling of password/key
def load_env(env_name):
import os
if not os.environ.get(env_name):
print(env_name + " is not defined")
raise SystemExit
else:
env_name = os.environ[env_name]
@yehgdotnet
yehgdotnet / gplaycli.conf
Created April 27, 2018 02:54
gplaycli.conf
gplaycli.conf
[Credentials]
gmail_address=
gmail_password=
token=True
android_ID=
language=en_US
token_url=
[Cache]
token=~/.cache/gplaycli/token
@yehgdotnet
yehgdotnet / 1.json
Last active June 12, 2018 02:51
JSON(P)
{
"name" : "hacker",
"level" : "1337"
}
@yehgdotnet
yehgdotnet / tlds
Created June 12, 2018 07:39 — forked from di/tlds
Valid Two-Letter Top Level Domains
ac
ad
ae
af
ag
ai
al
am
an
ao