Skip to content

Instantly share code, notes, and snippets.

@eliheady
eliheady / gmail-reports.py
Created October 16, 2017 13:25
get attachments from gmail messages
#!/usr/bin/env python
# collect attachments from messages identified by label and date
# taken from Gmail API Python Quickstart
from __future__ import print_function
import httplib2
import os
import sys
@ivanvza
ivanvza / packet_log.dll
Created November 6, 2019 16:28
DLL to capture&save proc send recv via detours
#include <windows.h>
#include <fstream> // Required to output logs to files
#include <iomanip> // Required to display the hex properly
#include "detours.h" // Version 3.0 use for this hook. Be sure to include the library and includes to your project in visual studio
// Detours: https://www.microsoft.com/en-us/research/project/detours/
#pragma comment(lib,"detours.lib") // Need to include this so we can use Detours
#pragma comment(lib,"ws2_32.lib") // Required to hook Send and Recv since they both reside in this library
@tommelo
tommelo / example.js
Last active June 8, 2022 22:57
Promisify net.Socket
const { connect } = require('./socket');
async function asyncSocket() {
let socket;
try {
socket = await connect('localhost', 3000, 30);
await socket.write('ping');