Skip to content

Instantly share code, notes, and snippets.

Avatar

Guillaume Quéré gquere

View GitHub Profile
View ports.txt
Network
=======
DNS 53
DHCP server 67
DHCP client 68
NTP 123
Auth
====
TACACS 49
@gquere
gquere / openldap2hashcat.py
Created Nov 17, 2020
Convert OpenLDAP hashes to a format Hashcat can understand
View openldap2hashcat.py
#!/usr/bin/env python3
# Convert OpenLDAP hashes to a format Hashcat can understand
import sys
import base64
with open(sys.argv[1], 'r') as f:
lines = f.readlines()
for line in lines:
line = line.rstrip("\n")
@gquere
gquere / openldap2john.py
Last active Nov 17, 2020
Convert OpenLDAP hashes to a format john the ripper can understand
View openldap2john.py
#!/usr/bin/env python3
# Convert OpenLDAP hashes to a format john the ripper can understand
import sys
import base64
with open(sys.argv[1], 'r') as f:
lines = f.readlines()
for line in lines:
line = line.rstrip("\n")
@gquere
gquere / dump_i2c_eeprom.c
Created Aug 17, 2020
dump I2C EEPROM memory from Linux device ioctl
View dump_i2c_eeprom.c
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
#define READ_SIZE (256)
#define NB_PAGES (256)
View artifactory_list_users.py
#!/usr/bin/env python3
import requests
import json
import urllib3
import sys
# SUPPRESS WARNINGS ############################################################
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
View gitlab_clone_all.py
#!/usr/bin/env python3
import argparse
import requests
import json
import urllib3
from urllib.parse import urlparse
import os
import re
from getpass import getpass
View bitbucket_clone_all.py
#!/usr/bin/env python3
import argparse
import requests
import json
import urllib3
from urllib.parse import urlparse
import os
import re
from getpass import getpass
View sstic2020_step6_invert.py
#!/usr/bin/env python2
import gmpy
# MODULAR QUADRATIC EQUATION SOLVER ############################################
def compute_next_sqrt(prev_sqrt, x, N):
if x % (2**N) == (prev_sqrt * prev_sqrt) % (2**N):
return prev_sqrt
elif (2**(N - 1) + x) % (2**N) == (prev_sqrt * prev_sqrt) % (2**N):
return 2**(N-2) - prev_sqrt
View sstic2020_step5_hash.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
void ripemd(int *output, int *input)
{
uint iVar1;
uint iVar2;
uint iVar3;
View coconut98.py
#!/usr/bin/env python3
# http://lasecwww.epfl.ch/pub/lasec/doc/Vau98a.ps
import sys
from pyfinite import ffield # don't forget to patch to include your field!
# CIPHER CONSTANTS #############################################################
c = 0xb7e15162
S = [
0x8AED2A, 0x6ABF71, 0x58809C, 0x0F4F3C7, 0x62E716, 0x0F38B4, 0x0DA56A7, 0x84D904,