Skip to content

Instantly share code, notes, and snippets.

View mrexodia's full-sized avatar
❤️
‌‌

Duncan Ogilvie mrexodia

❤️
‌‌
View GitHub Profile
@mrexodia
mrexodia / index.php
Created December 21, 2015 17:59
Lightshot API
<?php
function addLog($text, $debug = false) {
if ($debug) {
file_put_contents("debug_log.txt", $text . PHP_EOL, FILE_APPEND);
}
}
function makeResponse($request) {
return array(
"jsonrpc" => "2.0",
@mrexodia
mrexodia / reg.cpp
Created December 15, 2015 14:01
reg.cpp
#include "Debugger.Thread.Registers.h"
#ifdef _WIN64
#define contextGax _context.Rax
#define contextGbx _context.Rbx
#define contextGcx _context.Rcx
#define contextGdx _context.Rdx
#define contextGdi _context.Rdi
#define contextGsi _context.Rsi
#define contextGbp _context.Rbp
#include "DLL.h"
#include <stdlib.h>
#include <cstring>
DLL_EXPORT void* DataAlloc(size_t size)
{
return malloc(size);
}
DLL_EXPORT void DataFree(void* ptr)
@mrexodia
mrexodia / gist:892ff9958d6cae36d867
Created May 19, 2015 23:54
python script for call stack
"""
A script that tries to determine the call stack
Run the application with the debugger, suspend the debugger, select a thread and finally run the script.
Copyright (c) 1990-2009 Hex-Rays
ALL RIGHTS RESERVED.
@mrexodia
mrexodia / default.ini
Last active September 7, 2016 11:34
Default by mrexodia (http://i.imgur.com/2lW8pqm.png)
[Colors]
AbstractTableViewBackgroundColor=#FFF8F0
AbstractTableViewHeaderTextColor=#000000
AbstractTableViewSelectionColor=#C0C0C0
AbstractTableViewSeparatorColor=#808080
AbstractTableViewTextColor=#000000
DisassemblyAddressBackgroundColor=#XXXXXX
DisassemblyAddressColor=#808080
DisassemblyAutoCommentBackgroundColor=#XXXXXX
DisassemblyAutoCommentColor=#008000
{ "attachments" : [ { "filename" : "zzz.png",
"issue" : 202,
"path" : "attachments/b6cc53ffeaab42adb9071515d82704f9",
"user" : "Vincent168"
},
{ "filename" : "nfsw_launcher.exe",
"issue" : 212,
"path" : "attachments/6ef6431123184d2ba01e712715bdbe10",
"user" : null
},
#ifndef _DEBUGGER_H
#define _DEBUGGER_H
#include "_global.h"
/**
\brief A debugger class.
*/
class Debugger
{
@mrexodia
mrexodia / command.cpp
Created March 21, 2015 23:00
Command Parser
#include "command.h"
Command::Command(const String & command)
{
ParseState state = Default;
int len = command.length();
for(int i=0; i<len; i++)
{
char ch = command[i];
switch(state)
@mrexodia
mrexodia / ClipboardTest.cs
Created January 17, 2015 18:30
ClipboardTest for GitExtensions
using System;
using System.Windows.Forms;
using System.Drawing;
namespace ClipboardTest
{
public class Form1 : Form
{
public Form1()
{
#include "FindPattern.h"
#include <algorithm>
#include <cctype>
#include <string>
using namespace std;
struct PatternByte
{
struct PatternNibble