Skip to content

Instantly share code, notes, and snippets.

@BeanBagKing
BeanBagKing / 1105.csv
Created Mar 9, 2021
1105 Media Inc. Pi-Hole Blacklist
View 1105.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
# 1105 MEDIA INC. Blacklist
0.0.0.0 05agency.com
0.0.0.0 05group.com
0.0.0.0 101com.com
0.0.0.0 101com.xyz
0.0.0.0 101communications.com
0.0.0.0 101communications.online
0.0.0.0 101direct.com
0.0.0.0 101m3.com
View scripts_update.sh
#!/bin/bash
#######
# Creates a flat text file list of NSE scripts suitable for searching via command line
# Used in conjunction with nsesearch.sh
# Replaces nmap_scripts.list gist
# Dependencies: html2text
#######
YEL='\033[1;33m'
@BeanBagKing
BeanBagKing / urldecode.py
Created Oct 20, 2016
Takes a URL encoded file (such as a TCP stream) and decodes it.
View urldecode.py
#!/usr/bin/python
import urllib
fin = open("urlencoded.txt")
fout = open("urldecoded.txt", "wt")
for line in fin:
fout.write(urllib.unquote(line))
fin.close()
fout.close()
@BeanBagKing
BeanBagKing / simple_cookie.php
Created Oct 2, 2016
Simple Cookie Thief PHP Code - No logging
View simple_cookie.php
@BeanBagKing
BeanBagKing / hunting.sh
Last active Apr 24, 2021
Hunting One Liners
View hunting.sh
# Linux - Look for attempts to hide files (note the spaces)
find / \( -name '. ' -o -name '.. ' -o -name '...' -o -name ' ' \)
# Linux - Find last 20 modified files
### Excluded directoreis for /proc, /sys
### Excludes /tmp/sort* as these are used by this process
##### Exclude directory - find . -type d \( -path dir1 -o -path dir2 -o -path dir3 \) -prune -o -print
find / -type d \( -path /proc -o -path /sys \) -prune -o -print -type f ! -wholename "/tmp/sort*" -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | head
# Find 20 largest files
@BeanBagKing
BeanBagKing / cookie_thief.php
Last active Apr 24, 2021
PHP Cookie Thief with Information Logging
View cookie_thief.php
View decode.sh
#!/bin/bash
string=$1
YEL='\033[1;33m'
NC='\033[0m' # No Color
if [ -z $string ]; then
echo "Usage: `basename $0` [BASE64 STRING]"
exit 1
fi
View detectFolder.ps1
# For servers in list, check if the folder exists
# Useful for detecting user folders, installed programs, etc.
Get-Content C:\Users\UserName\Desktop\DetectFolder\servers.txt | `
Select-Object @{Name='ComputerName';Expression={$_}},@{Name='FolderExist';Expression={ Test-Path "\\$_\c$\program files"}}
View mapDrive.ps1
# This was, ideally, a way to map SharePoint drives as network drives in Windows. I don't believe I ever got it working, but maybe
# it will come in handy for someone.
# http://community.office365.com/en-us/f/173/t/286802.aspx
# Reference the above for "steps"
# Adds sharepoint.com to the list of trusted sites
# AKA Step 1
View nslookup.bat
REM Performs nslookup on a list of IP's
for /F %i in (iplist.txt) do @nslookup %i 8.8.8.8 2>nul | find "Name" && echo %i