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 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 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 |
View epoch_time_conversion.xlsx
=TEXT((((A1-(5*3600))/86400)+25569),"yyyy-MM-dd HH:mm:ss") |
View ipaddr_to_decimal.py
ip='127.0.0.1' | |
ipsplit=ip.split('.') | |
(int(ipsplit[0]) * 16777216)+(int(ipsplit[1])*65536)+(int(ipsplit[2])*256)+int(ipsplit[3]) | |
# 2130706433 |
NewerOlder