Skip to content

Instantly share code, notes, and snippets.

View queencitycyber's full-sized avatar
💭
knuckin n buckin

clandestination queencitycyber

💭
knuckin n buckin
View GitHub Profile
@queencitycyber
queencitycyber / parse_ffufjson.sh
Created July 13, 2023 18:34
Parse FFUF json output
#!/bin/bash
# Directory path containing the JSON files
directory="."
# Print column titles
# not pretty and doesn't scale well but who cares
echo -e "URL\tStatus\tLength\tWords\tLines"
# Iterate over each JSON file in the directory
@queencitycyber
queencitycyber / url_to_md.py
Created July 11, 2023 14:06
URL -> Markdown
### Turn HTML page into Markdown (.md)
import requests
import html2text
def download_html(url):
response = requests.get(url)
return response.text
def convert_to_markdown(html):
@queencitycyber
queencitycyber / exparser.py
Created January 21, 2023 19:37
dumb python script to parse exchanger output
'''
parses impacket-exchanger output to put useful results in a table
https://github.com/fortra/impacket/blob/master/examples/exchanger.py
'''
import click
from rich.console import Console
from rich.table import Table
import re
@queencitycyber
queencitycyber / serve.py
Created August 17, 2022 14:20
Multi-threaded SimpleHTTPServer
#!/usr/bin/python3
import argparse
import http.server
import socketserver
import sys
class ThreadedHTTPServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
pass
def main(argv):
@queencitycyber
queencitycyber / testpub.py
Created May 24, 2022 14:17
username oracle via ssh public key
# source: https://github.com/rushter/blog_code/blob/master/ssh/check.py
import logging
import socket
import sys
import paramiko.auth_handler
import requests
import argparse
@queencitycyber
queencitycyber / hbh-header-abuse-test.py
Created May 11, 2022 18:48 — forked from ndavison/hbh-header-abuse-test.py
Attempts to find hop-by-hop header abuse potential against the provided URL.
# github.com/ndavison
import requests
import random
import string
from argparse import ArgumentParser
parser = ArgumentParser(description="Attempts to find hop-by-hop header abuse potential against the provided URL.")
parser.add_argument("-u", "--url", help="URL to target (without query string)")
@queencitycyber
queencitycyber / check_hashes.py
Created April 18, 2022 13:56 — forked from bandrel/check_hashes.py
To check for and reveal AD user accounts that share passwords using a hashdump from a Domain Controller
#!/usr/bin/env python3
#Purpose: To check for and reveal AD user accounts that share passwords using a hashdump from a Domain Controller
#Script requires a command line argument of a file containing usernames/hashes in the format of user:sid:LMHASH:NTLMHASH:::
# ./check_hashes.py <hash_dump>
import argparse
import re
parser = argparse.ArgumentParser(description="Check user hashes against each other to find users that share passwords")
@queencitycyber
queencitycyber / xsscors.py
Last active April 25, 2022 15:31
Flask server, enable CORS Access-Control-Allow-Origin headers to accept connections from an XSS affected victim while hosting XSS PoC
"""
A tiny Flask web server ready to shoot reflective CORS Access-Control-Allow-Origin headers to accept connections from an XSS affected victim while hosting your evil JS payload
"""
# Stolen from https://twitter.com/snovvcrash/status/1511702029403631620
from flask import Flask, send_file
from flask_cors import CORS
app = Flask(__name__)
CORS(app)
###
# Dumps GitLab's user base to CSV form.
# Source: https://www.rapid7.com/blog/post/2022/03/03/cve-2021-4191-gitlab-graphql-api-user-enumeration-fixed/
# Requires GraphqlClient: pip install python-graphql-client
###
from python_graphql_client import GraphqlClient
import json
import sys
import argparse
@queencitycyber
queencitycyber / randsomshit
Last active April 4, 2022 15:31
Random Shit
Tired of having random notes and shit floatin around. Most of this will probably exist elsewhere in my notes, but I'd like to have it here to remember
# Console Table. Update as needed
`console.table([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a)))`
# No clue. From Outlook headers
https://webshell.suite.office.com/iframe/TokenFactoryIframe?origin=https://Foutlook.office.com&shsid=[GUID]&apiver=oneshell&cshver=20220227.1&upn=[REDACTED]