Skip to content

Instantly share code, notes, and snippets.

View redknight99's full-sized avatar

redknight99 redknight99

View GitHub Profile
@redknight99
redknight99 / casear_cipher_brute.,py
Created November 20, 2021 01:58
Quick and hacky [Caesar Cipher](https://en.wikipedia.org/wiki/Caesar_cipher) brute force script. Nothing fancy.
# Cesar Cipher Brute Force
def Caesar_Bruteforce(word_string: str) -> None:
if word_string.upper() != word_string:
print("input not upper returning")
return None
message = word_string
LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@redknight99
redknight99 / base64_rot13.py
Last active January 9, 2020 23:28
A proof of concept script for attempting to crack the remaining unsolved ciphers of Black Ops3 Zombies Revelations Map. Background: https://www.reddit.com/r/CODZombies/wiki/revelations#wiki_ciphers
"""
This module is a test to see if any of the remaining unsolved Black Ops 3
ciphers were Rot13'd + Base64 using the Base64 alphabet / chart.
Base64 alphabet / chart example: https://en.wikipedia.org/wiki/Base64#Base64table .
The results of the test suggest that none of the remaining ciphers we're dealing
with are encrypted using this technique.
"""
import base64
@redknight99
redknight99 / simple_mass_unblock_twitter.py
Created November 17, 2019 12:35
Background: I encountered an interesting Twitter thread where someone was trying to figure out how to mass unblock. This gist is adapted from one of the replies. Essentially it uses api oauth tokens to get that user's block user list and then unblocks them one by one.
import json
import oauth2 as oauth
import requests
import urllib
CONSUMER_KEY = "CHANGEME"
CONSUMER_SECRET = "CHANGEME"
ACCESS_KEY = "CHANGEME"
ACCESS_SECRET = "CHANGEME"
@redknight99
redknight99 / simple_python_reddit_api_example.py
Created November 15, 2019 00:40
Background: I recently ran into headaches trying to get the Reddit API to work for a simple non-PRAW Python script. So I adapted this together from the https://github.com/reddit-archive/reddit/wiki/OAuth2-Quick-Start-Example for future reference.
import requests
import requests.auth
"""
This is a simple non-PRAW Reddit API example using Python and the Python module Requests.
SECURITY NOTE: client_token, client_secret, password, username, accesss_token are all taken from the URL:
https://github.com/reddit-archive/reddit/wiki/OAuth2-Quick-Start-Example and should be
be replace by your own.
"""
@redknight99
redknight99 / SimpleHydraExamples.md
Last active September 12, 2019 05:27
A gist for simple Hydra ( https://github.com/vanhauser-thc/thc-hydra ) commands since their homepage is lacking examples / clarity. I'm planning on adding to this as time goes on.

Simple Post Brute Force Example

hydra 127.0.0.1 -L /usr/share/wordlists/metasploit/unix_users.txt -P /usr/share/wordlists/metasploit/unix_passwords.txt http-form-post "/admin.php:=username^USER^&password=^PASS^:S=Good Password"

Simple SSH Brute Force Example

hydra 127.0.0.1 -L /usr/share/wordlists/metasploit/unix_users.txt -P /usr/share/wordlists/metasploit/unix_passwords.txt ssh

@redknight99
redknight99 / web-servers.md
Created July 12, 2018 14:58 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.