Skip to content

Instantly share code, notes, and snippets.

View spetzreborn's full-sized avatar

Björn Fjällström spetzreborn

  • Stockholm University
  • Stockholm
View GitHub Profile
@spetzreborn
spetzreborn / pydbg_firefox.py
Created November 15, 2019 08:57 — forked from RobinDavid/pydbg_firefox.py
Pydbg: sample to hook a firefox function to retrieve credentials (Gray Hat Python book)
'''
Example taken from Gray Hat Python (book)
This script present a way to hook a DLL library in Firefox. For this example the script hook nspr4.dll which encrypt datas for SSL connection.
So we will be able to get the text before it is encrypted. Moreover we catch a pattern "password" to get all login/password before they are ciphered.
'''
from pydbg import *
from pydbg.defines import *
import utils
@spetzreborn
spetzreborn / endian.c
Created November 14, 2019 21:04 — forked from saibikalpa/endian.c
Sample C program to determine endianness
#include <stdio.h>
union s{
int n;
char b;
}x;
void main(){
x.n = 0x4142;
if(x.b == 0x42){
printf("Little Endian\n");
}