Skip to content

Instantly share code, notes, and snippets.

@jaigouk
jaigouk / db.coffee
Last active November 3, 2021 16:27
Riot.js Todo MVC in coffeescript https://github.com/moot/riotjs
DB = (key) ->
store = window.localStorage
get: ->
JSON.parse store[key] or "{}"
put: (data) ->
store[key] = JSON.stringify(data)
import re
import sys
import pefile
from pydbg import *
from pydbg.defines import *
def parseidalog(file):
all_funcs = []
f = open(file)
funcs = f.readlines()
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@debasishm89
debasishm89 / inlinehookdll.c
Last active October 5, 2019 05:59
DLL code for Inline Hooking MessageBoxW API of User32.dll
#include <windows.h>
__declspec(naked) EvilFunction()
{
/*
0007FA18 01001FC4 Ä. /CALL to MessageBoxW from notepad.01001FBE
0007FA1C 001503C8 È. |hOwner = 001503C8 ('Find',class='#32770',parent=003C029E)
0007FA20 000A3A88 ˆ:.. |Text = "Cannot find "junk""
0007FA24 000A8F34 4.. |Title = "Notepad"
0007FA28 00000040 @... \Style = MB_OK|MB_ICONASTERISK|MB_APPLMODAL
*/
@XayOn
XayOn / bruteforce.py
Created September 19, 2013 14:44
Como hacer un brute force cracker para autenticación básica http en veinte lineas de python, con coloricos y todo. Argumentos: <fichero de usuarios> <fichero de contraseñas> <url>
#!/usr/bin/env python
from termcolor import colored
import sys, mechanize
with open(sys.argv[1]) as userfile:
users = [u.strip() for u in userfile.readlines()]
with open(sys.argv[2]) as pwfile:
passwords = [u.strip() for u in pwfile.readlines()]
for user in users:
@pseudomuto
pseudomuto / list.c
Created August 25, 2013 16:30
Blog Code: Implementing a Generic Linked List in C
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "list.h"
void list_new(list *list, int elementSize, freeFunction freeFn)
{
assert(elementSize > 0);
list->logicalLength = 0;
@pseudomuto
pseudomuto / stack.c
Last active November 17, 2019 10:52
Blog Code: Implementing a Generic Stack in C
#include <stdlib.h>
#include <assert.h>
#include "stack.h"
void stack_new(stack *s, int elementSize, freeFunction freeFn)
{
s->list = malloc(sizeof(list));
// make sure the malloc call didn't fail...
assert(s->list != NULL);
@amarvutha
amarvutha / camera.py
Last active December 21, 2015 15:59
# Display webcam image, plus plasma diagnostics
# version 2, 2013-09-25
# Amar
# Changelog:
# v2: Very slight modification of http://matplotlib.org/examples/animation/dynamic_image.html
import numpy as np
import cv2
import time
import matplotlib.animation as animation
@robmccormack
robmccormack / mrm_show_quick_panel.py
Created July 19, 2013 17:19
Examples of using custom quick_panels in Sublime Text 2 / 3
import sublime_plugin
import datetime
'''
__ __ __ __
| \/ |_ _| \/ |
| |\/| | '_| |\/| |_
|_| |_|_| |_| |_(_)
Project: Examples of using show_quick_panel in Sublime 2
@robmccormack
robmccormack / mrm_example_dialogs.py
Last active February 12, 2024 10:54
Examples of using custom dialogs and messages in Sublime Text 2
import sublime
import sublime_plugin
'''
__ __ __ __
| \/ |_ _| \/ |
| |\/| | '_| |\/| |_
|_| |_|_| |_| |_(_)
Project: Examples of using custom dialog and messages in Sublime 2