Skip to content

Instantly share code, notes, and snippets.

View miou-gh's full-sized avatar

miou miou-gh

  • Canada
View GitHub Profile
@miou-gh
miou-gh / pac2spt.py
Last active June 14, 2017 16:57
WPE PAC to SPT Converter with Filtering
import struct
import sys
import re
import argparse
class SPT_Packet:
def __init__(self, name, data):
self.name = name
self.data = data
@miou-gh
miou-gh / WPEPACReader.py
Last active June 14, 2017 14:36
A WPE PAC Reader
import struct
from enum import Enum
class Packet:
def __init__(self, data, socket_id, source_addr, destination_addr, packet_size, function):
self.data = data
self.socket_id = socket_id
self.source_addr = source_addr
self.destination_addr = destination_addr
import bson
import struct
from enum import Enum
class SPT:
def __init__(self):
pass
class Packet:
using System;
using System.IO;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace SPTReader
{
class Program
{
static void Main(string[] args)
@miou-gh
miou-gh / WPEMFCSelect.au3
Last active June 14, 2017 11:57
WPE Pro MFC Selector
#include <MsgBoxConstants.au3>
#include <SendMessage.au3>
#include <GuiMenu.au3>
#include <GuiTreeView.au3>
#Include <WindowsConstants.au3>
HotKeySet("^q", "QuitApp")
MsgBox($MB_SYSTEMMODAL, "WPE Select", "Make sure only the first packet is showing by moving the hex editor view up.")
class Color:
def __init__(self, r, g, b):
self.r = r
self.g = g
self.b = b
def to_rgb_color(argb:int, remove_alpha:bool = True) -> Color:
a = (argb >> 24) & 255
r = (argb >> 16) & 255
g = (argb >> 8) & 255
import os
import re
import time
import json
import hashlib
import calendar
import requests
import threading
import html2text
@miou-gh
miou-gh / spt.py
Last active April 22, 2017 00:58
read/write WPE spt files
import bson
import struct
from enum import Enum
class SPT:
def __init__(self):
pass
class Packet:
from random import shuffle
consonants = [
# single consonants. without 'q' since it's often awkward in words
"b", "c", "d", "f", "g", "h", "j", "k", "l", "m",
"n", "p", "r", "s", "t", "v", "w", "x", "z",
# possible combinations excluding those which cannot start a word
"pt", "gl", "gr", "ch", "ph", "ps", "sh", "st", "th", "wh",
]
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using AForge.Imaging;
using Image = System.Drawing.Image;
using Bitmap = System.Drawing.Bitmap;
using Rectangle = System.Drawing.Rectangle;