Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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);
@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 / 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);