Skip to content

Instantly share code, notes, and snippets.

View ajdumanhug's full-sized avatar
🏠
Working from home

Aj Dumanhug ajdumanhug

🏠
Working from home
View GitHub Profile
#!/usr/bin/python2.7
import random
lr = '\x64'
print '''
___________.__ _________ __
\__ ___/| |__ ____ / _____/ ____ _____ | | __ ____
| | | | \_/ __ \ \_____ \ / \\__ \ | |/ // __ \
| | | Y \ ___/ / \ | \/ __ \| <\ ___/
|____| |___| /\___ > /_______ /___| (____ /__|_ \\___ >
\/ \/ \/ \/ \/ \/ \/
@ajdumanhug
ajdumanhug / upload.php
Created November 18, 2018 07:27
RITSEC's upload.php file from Archivr
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST')
{
if ($_FILES['upload']['size'] > 5000)
{ //max 5KB
die("File too large!");
}
$filename = $_FILES['upload']['name'];
@ajdumanhug
ajdumanhug / emoji.py
Created November 19, 2018 05:58
Converting Emoji to Characters
emojiCipherText = "🤞👿🤓🥇🐼💩🤓🚫💪🤞🗣🙄🤓🥇🐼💩🤓😀✅😟🤓🍞🐼✅🚫💪🥇🤓🐼👿🤓🚫💪😟🤓👿😾😀😯🤓👿🤞✅🔥🚫🤓🥇🐼💩🤓👻💩🔥🚫🤓😀🗣🔥🍞😟✅🤓🚫💪😟🔥😟🤓🚫💪✅😟😟🤓💔💩😟🔥🚫🤞🐼🗣🔥😭🤓🍞💪😀🚫🤓🤞🔥🤓🥇🐼💩🤓🗣😀👻😟🤢🤓🍞💪😀🚫🤓🤞🔥🤓🥇🐼💩✅🤓💔💩😟🔥🚫🤢🤓🍞💪😀🚫🤓🤞🔥🤓🚫💪😟🤓😀🤞✅🤓🔥🐙😟😟😎🤓👀😟😾🐼🤬🤞🚫🥇🤓🐼👿🤓😀🗣🤓💩🗣😾😀😎😟🗣🤓🔥🍞😀😾😾🐼🍞😭🤓🥇🐼💩✅🤓👿😾😀😯🤓🤞🔥🤡🤓😀👿✅🤞🤬😀🗣_🐼✅_😟💩✅🐼🐙😟😀🗣_🔥🍞😀😾😾🐼🍞_🍞🐼🍞_🚫💪😟✅😟🔥_😀_😎🤞👿👿😟✅😟🗣🤬😟🤓"
translatedEmojis = {}
finalCipher = ""
x = 0
for emoji in emojiCipherText:
if emoji not in translatedEmojis:
translatedEmojis[emoji] = chr(65+x)
x += 1
@ajdumanhug
ajdumanhug / traversethebridge.php
Created November 25, 2018 04:23
Directory Traversal bug in TUCTF 2018's Crystal Gate
<?php
echo 'Note: Only used for access management and to check user info.';
echo '<br>';
echo 'Note2: I can\'t seem to remember the param. It\'s "file"';
echo '<br>';
if (isset($_GET['file'])) {
$file = $_GET['file'];
if (strpos($file, '/etc/passwd') == true) {
include($file);
fsociety:TUCTF aj$ nc 3.16.57.250 12345
AAA YYYYYYY YYYYYYYYYYYYYY YYYYYYYYYYYYYY YYYYYYY
A:::A Y:::::Y Y:::::YY:::::Y Y:::::YY:::::Y Y:::::Y
A:::::A Y:::::Y Y:::::YY:::::Y Y:::::YY:::::Y Y:::::Y
A:::::::A Y::::::Y Y::::::YY::::::Y Y::::::YY::::::Y Y::::::Y
A:::::::::A YYY:::::Y Y:::::YYYYYY:::::Y Y:::::YYYYYY:::::Y Y:::::YYY
A:::::A:::::A Y:::::Y Y:::::Y Y:::::Y Y:::::Y Y:::::Y Y:::::Y
A:::::A A:::::A Y:::::Y:::::Y Y:::::Y:::::Y Y:::::Y:::::Y
A:::::A A:::::A Y:::::::::Y Y:::::::::Y Y:::::::::Y

Keybase proof

I hereby claim:

  • I am ajdumanhug on github.
  • I am ajdumanhug (https://keybase.io/ajdumanhug) on keybase.
  • I have a public key whose fingerprint is B7C1 3504 AB8A 2379 3450 6D4C D053 7C03 7C00 F60A

To claim this, I am signing this object:

@ajdumanhug
ajdumanhug / Crawl.py
Created May 2, 2020 17:49
Link Crawler
#!/usr/bin/python
import sys
import json
import requests
import argparse
from bs4
import BeautifulSoup
def results(file):
@ajdumanhug
ajdumanhug / SuperSecureServer.py
Created May 7, 2020 02:00
Obscurity Source Code for the Webserver
import socket
import threading
from datetime import datetime
import sys
import os
import mimetypes
import urllib.parse
import subprocess
respTemplate = """HTTP/1.1 {statusNum} {statusCode}
@ajdumanhug
ajdumanhug / decryptPass.vb
Last active June 5, 2020 15:25
HackTheBox's Nest VB Code to Decrypt Password
Imports System
Imports System.Text
Imports System.Security.Cryptography
Public Module Module1
Public Sub Main()
Console.WriteLine( Decrypt("fTEzAfYDoz1YzkqhQkH6GQFYKp1XY5hm7bjOP86yYxE=", "N3st22", "88552299", 2, "464R5DFA5DL6LE28", 256) )
End Sub
Public Function Decrypt(ByVal cipherText As String, _