Skip to content

Instantly share code, notes, and snippets.

Avatar

william packetchef

  • 01060
View GitHub Profile
View eicar_references.txt
Existing Python gist: https://gist.github.com/packetchef/13d4c2d677f34d188de493f14fd1d42c
API: https://3ukyhfgejb.execute-api.us-east-1.amazonaws.com/test1/eicar?decode=True
View api_references.txt
Wordnik
https://developer.wordnik.com/gettingstarted
httpbin.org
http://httpbin.org/
Reqres
https://reqres.in/
I think I setup this API to dump the input
View python_randomness.py
# Roll a die, defaulting to d6
import random
def roll(d=6):
return random.randint(1, d)
# Randomly select a value a list
import random
wordlist = ['quick', 'brown', 'fox', 'jumped']
random.choice(wordlist)
View hex_stuff.txt
Convert with Python, individually:
>>> '\x3d'
'='
>>> '\x22'
'"'
>>> '\x2e'
'.'
>>> '\x5c'
'\\'
View regular_expression_references.txt
From the maker of RegexBuddy
http://www.regular-expressions.info/characters.html
A regex cheat-sheet for password crackers
https://www.unix-ninja.com/p/A_cheat-sheet_for_password_crackers
View forensics_references.txt
Forensics Wiki
https://forensicswiki.xyz/wiki/index.php?title=Apple_Safari
Chad Tilbury
https://www.forensicmethods.com/
Forensic Artifacts
https://github.com/ForensicArtifacts/artifacts
View bash_arguments.sh
if [ $# -eq 0 ]; then
echo "No arguments"
else
echo "First arg is $1"
fi
View ignore_comments.pl
How do I get rid of comments via Perl?
if($_!~/^#/)
{
# do nothing
}
View awk_tips.awk
# How many characters per line?
$ awk '{ print length($0) }'
# How many words per line? Add -F for separator
awk '{ print NF }'
# How do I see a substring? Example, 4 characters starting at position 2
$ awk '{ print substr($0, 2, 4) }'
# Alternative to the above, use cut:
View dos_date_string.bat
# Create a file named with the current timestamp
for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
set timestr=%d:~6,4%_%d:~0,2%_%d:~3,2%
echo %timestr%
set FILENAME=%timestr%.log
You can’t perform that action at this time.