Skip to content

Instantly share code, notes, and snippets.

@itsho
itsho / HwndHostEx.cs
Last active January 23, 2024 17:13
Hosting an app inside a WPF app (System.Windows.Interop)
using System;
using System.Runtime.InteropServices;
using System.Windows.Interop;
namespace HostingAppTest
{
// based on https://stackoverflow.com/q/30186930/426315
public class HwndHostEx : HwndHost
{
private readonly IntPtr _childHandle;
anonymous
anonymous / words
Created February 24, 2018 17:31
[a, auto] [p, play] [toggle]* 0 parameter(s)
[admin]* [cmds, commands] [reload] 0 parameter(s)
[admin]* [eval] 1 parameter(s)
[admin]* [gc] 0 parameter(s)
[admin]* [get, find] [servers, guilds] [mutual]* 1 parameter(s)
[admin]* [history] [get]* 2 parameter(s)
[admin]* [throw error, throwerror] 0 parameter(s)
[admin]* [usage] 0 parameter(s)
[b, previous, prev, back] [track]* 0 parameter(s)
[bean, baen, sean] [chan]* 0 parameter(s)
@williballenthin
williballenthin / add_segment.py
Last active December 27, 2019 01:59
Add a segment to an IDA .idb from a file.
'''
IDAPython plugin that adds the contents of a file as a new segment in an existing idb.
Prompts the user for:
- file path
- segment name
- segment starting offset
Useful for reversing engineering packed software and shellcode.
Author: Willi Ballenthin <william.ballenthin@fireeye.com>
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active March 25, 2024 13:55
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@shoghicp
shoghicp / Comparator.php
Last active July 26, 2020 21:36
Minecraft PE .lst Information Extractor to obtain Protocol Information and Compare Versions
<?php
define("COMPARATOR_VERSION", "0.1");
ini_set("memory_limit", "512M");
$node1 = json_decode(@file_get_contents($argv[1]), true);
if($node1 == ""){
echo "Provide a valid json file produced by the Extractor".PHP_EOL;
exit(1);
}
$node2 = json_decode(@file_get_contents($argv[2]), true);
@zhuowei
zhuowei / identvtable.py
Last active December 10, 2015 14:28
An attempt to deobfuscate Minecraft Pi by identifying VTables using the readable typeinfo embedded in the executable
"""Identify vtables from a C++ ELF application. Tailored for Minecraft-pi.
Requires the pyelftools library from https://bitbucket.org/eliben/pyelftools
Copyright (C) 2013 Zhuowei Zhang
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
@zhuowei
zhuowei / blockidgrep.py
Created December 31, 2012 02:25
Pulls movs r1, # statements from objdump output of Tile::initTiles to find out block ID locations in Minecraft PE
#!/usr/bin/python
#Feed the decompiled Tile::initTiles method from objdump into standard input
from sys import stdin
lastMov = "";
def decodeAndPrint(movstr):
endpart = movstr[movstr.find("#") + 1:len(movstr) - 1]
@kirb
kirb / README.md
Last active October 18, 2022 03:26
Install Theos on Linux

Please don't use this. It's old and didn't really even work in the first place. Just keeping it around for historical value.

@mobibob
mobibob / dumpCursor
Created June 24, 2011 20:20
Android cursor dump
private void dumpCursor(Cursor myCursor) {
if (myCursor == null) {
Logs.w(TAG, "Null cursor");
} else {
try {
if (myCursor.moveToFirst()) {
String [] columns = myCursor.getColumnNames();
StringBuilder sbHeader = new StringBuilder();
for (String columnName : columns) {
sbHeader.append(columnName).append(", ");
@lox
lox / phark_proposal.md
Created November 23, 2010 04:03
A proposal for a sane php package manager

Proposal for Phark, a sane php package manager

As it stands PEAR sucks. It's complicated, clumsy and is full of utter garbage (sorry).

PHP is rapidly dying because we don't have any decent way of writing code that can easily build on the work of others. What we need is a simple, open package management system like rubygems.

We now have decent support for namespaces, class autoloading and archives. I propose we abandon