Skip to content

Instantly share code, notes, and snippets.

View dweekly's full-sized avatar
😍

David E. Weekly dweekly

😍
View GitHub Profile
@nikitaborisov
nikitaborisov / combinations.py
Created May 27, 2018 20:48
count number of item combinations
import functools
MENU = (
('cake', 99),
('cupcake', 20),
('donut', 10),
('muffin', 25),
('cookie', 5)
)
PRICE = 1035
@takeshixx
takeshixx / hb-test.py
Last active July 4, 2024 03:29
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@dweekly
dweekly / mp3acm.c
Created October 19, 2010 00:45
Windows Snippet To Use Built-in ACM MP3 Decoder
#include <windows.h>
#include <stdio.h>
#include <assert.h>
#include <mmreg.h>
#include <msacm.h>
#define MP3_BLOCK_SIZE 522
#define SOURCE_MP3 "C:\\audiograbber\\At The Club Last Night\\At_The_Club_Last_Night_-_Haven't_You_Heard.mp3"
#define OUTPUT_PCM_FILE "c:\\dump.pcm"