Skip to content

Instantly share code, notes, and snippets.

View BobuSumisu's full-sized avatar

Øyvind Ingvaldsen BobuSumisu

View GitHub Profile
(define-syntax try
(syntax-rules (catch)
((try try-body ... (catch catch-body ...))
(handle-exceptions exn ((lambda () catch-body ...)) ((lambda () try-body ...))))))
(try (socket-receive sock 4096)
(catch (print "[!] No HELLO from server")
(socket-close sock)
(exit 1)))
int __cdecl decrypt(int src, int count, int dest, unsigned int key)
{
unsigned int r1; // eax@1
unsigned int r3; // edx@1
unsigned int r2; // ecx@1
int pos; // esi@2
char byte; // bl@4
char done; // zf@4
r1 = key;
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
ip_dst = "192.168.1.1"
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: domains2pcap.py DOMAIN-FILE PCAP-FILE")
#include <stdlib.h>
#include <stdio.h>
void process(int number, int time) {
printf("Prosess %d kjører.\n", number);
sleep(time);
printf("Prosess %d kjørte i %d sekunder.\n", number, time);
}
(import foreign)
(foreign-declare "#include <pcap.h>")
(define-foreign-variable PCAP_ERRBUF_SIZE int)
(define-foreign-variable BUFSIZ int)
(define errbuf (make-string PCAP_ERRBUF_SIZE))
;; char *pcap_lookupdev(char *errbuf);
#!/usr/bin/env python2
# Simple config extractor for Bozok v1.4.3
import sys
import pefile
import json
import re
def extract_conf(filename):
data = open(filename, 'rb').read()
Boot Info Script 0.55 dated February 15th, 2010
============================= Boot Info Summary: ==============================
=> Grub 2 is installed in the MBR of /dev/sda and looks for Be.
sda1: _________________________________________________________________________
File system: ext4
Boot sector type: -
Boot Info Script 0.56 from 8 February 2011
============================= Boot Info Summary: ===============================
=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at sector
1 of the same hard drive for core.img. core.img is at this location and
looks in partition 6 for (,msdos6)/boot/grub.
sda1: __________________________________________________________________________
@BobuSumisu
BobuSumisu / gist:911331
Created April 9, 2011 11:38
/proc/partitions
major minor #blocks name
8 0 976762584 sda
8 1 547312640 sda1
8 3 1 sda3
8 5 7812096 sda5
8 6 421634048 sda6
CC=g++
CFLAGS=-c -Wall
LDFLAGS=
SRC=main.cpp
OBJ=$(SRC:.cpp=.o)
EXE=main
VPATH=src/
BUILDDIR=build