Skip to content

Instantly share code, notes, and snippets.

@antichown
antichown / ela.py
Created September 11, 2020 17:05 — forked from ewencp/ela.py
Quick, simple implementation of Error Level Analysis
#!/usr/bin/env python
# This is a really simple implementation of ELA as described in
# http://blackhat.com/presentations/bh-dc-08/Krawetz/Whitepaper/bh-dc-08-krawetz-WP.pdf
# You shouldn't actually use it, or at least read the paper carefully
# and implement more of the techniques before drawing any conclusions.
from PIL import Image, ImageChops, ImageEnhance
import sys, os.path
@antichown
antichown / Spring Heap Dump
Created October 17, 2020 19:21
Spring Heap Dump
{ "type":"data","name":"data", "models":[ "/trace", "application"]},
{ "type":"data","name":"data", "models":[ "/info", "application"]},
{ "type":"data","name":"data", "models":[ "/metrics", "application"]},
{ "type":"data","name":"data", "models":[ "/mappings", "application"]},
{ "type":"data","name":"data", "models":[ "/monitor", "application"]},
{ "type":"data","name":"data", "models":[ "/heapdump", "application/octet-stream"]},
{ "type":"data","name":"data", "models":[ "/dump", "application"]},
{ "type":"data","name":"data", "models":[ "/health", "application"]},
{ "type":"data","name":"data", "models":[ "/loggers", "application"]},
{ "type":"data","name":"data", "models":[ "/auditevents", "application"]},
@antichown
antichown / Golang cross compilation
Last active November 7, 2020 21:51
Golang cross compilation
#!/bin/bash
# Reference:
# https://github.com/golang/go/blob/master/src/go/build/syslist.go
os_archs=(
aix/ppc64
darwin/386
darwin/amd64
dragonfly/amd64
freebsd/386
Orjinal:pip Typo: ipp
Orjinal:rsa Typo: sra
Orjinal:rsa Typo: ras
Orjinal:pip Typo: ppi
Orjinal:psutil Typo: sputil
Orjinal:py Typo: yp
Orjinal:pytz Typo: pyzt
Orjinal:pandas Typo: padnas
Orjinal:tqdm Typo: tdqm
Orjinal:yarl Typo: yalr
@antichown
antichown / burpscript.py
Created February 17, 2021 15:05 — forked from mwielgoszewski/burpscript.py
This extension registers an IHttpListener configured to execute a custom script editable via the Script tab added to Burp. The script is executed in the context with the following global and local variables (extender, callbacks, helpers, toolFlag, messageIsRequest, messageInfo).
from java.awt import Font
from javax.swing import JScrollPane, JTextPane
from javax.swing.text import SimpleAttributeSet
from burp import IBurpExtender, IExtensionStateListener, IHttpListener, ITab
import base64
import traceback
import json
from dateutil.parser import parse
import tweepy
consumer_key = ''
consumer_secret = ''
access_key = ''
access_secret = ''
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
@antichown
antichown / gist:4ccfd3fb3ac3d6edb78b7efbd120fe5d
Created February 27, 2021 19:26
Game Score Matching - Hacking
var score1=[];
findInMemory(600,score1);
//score1
var score2=[];
findInMemory(900,score2);
//score2
var score1=["0x","0x"];
@antichown
antichown / gist:12d355e1ab837e3c009fd9d963ec976d
Last active February 27, 2021 20:15
Messagebox - API hook
Test Breakpoint
bpx MessageBoxW
'use strict';
var msgbox=Module.getExportByName('user32.dll','MessageBoxW');
Interceptor.attach(msgbox , {
var NFS = Module.findBaseAddress("Game.dll");
var Speed = ptr(NFS).add(0x0005060);
Interceptor.attach(Speed, {
onLeave:function (retval) {
console.log("Speed",retval);
}
@antichown
antichown / gist:786cde160f1c78732eac5a44d5879e0b
Created July 26, 2021 13:39
AndroidManifest.xml binary files
// Define Header
typedef struct {
uint magicnumber;
uint filesize;
} HEADER;
// Define the string format
typedef struct {
ushort sfSize;
if (sfSize > 0)