Skip to content

Instantly share code, notes, and snippets.

@spnow
spnow / pickle-payload.py
Created August 9, 2017 14:04 — forked from mgeeky/pickle-payload.py
Python's Pickle Remote Code Execution payload template.
#!/usr/bin/python
#
# Pickle deserialization RCE payload.
# To be invoked with command to execute at it's first parameter.
# Otherwise, the default one will be used.
#
import cPickle
import os
import sys
@spnow
spnow / md5.py
Created August 1, 2017 23:16 — forked from evernick/md5.py
# -*- coding: utf-8 -*-
import hashlib
if __name__ == "__main__":
m = hashlib.md5("hello".encode("UTF-8"))
data = (m.hexdigest())
print data
# -*- coding: utf-8 -*-
from pytesser import *
if __name__ == "__main__":
print image_file_to_string("fonts_test.png")
#define _WIN32_WINNT 0x0501
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
return IsDebuggerPresent();
}
#define _WIN32_WINNT 0x0501
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
BOOL result;
CheckRemoteDebuggerPresent(GetCurrentProcess(), &result);
return result;
}
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
BOOL result = FALSE;
if(FindWindow("OLLYDBG", 0) || FindWindow("WinDbgFrameClass", 0))
result = TRUE;
return result;
}
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
DWORD Val = 123;
SetLastError(Val);
OutputDebugString(L"random");
if(GetLastError() == Val) {
return 1;
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
BOOL result = FALSE;
HKEY hKey;
char lpData[256];
DWORD lpSize = sizeof(lpData);
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
TCHAR pathname[512];
TCHAR * filename;
GetModuleFileName(0, pathname, 512);
filename = wcsrchr(pathname, L'\\');
if (wcsncmp(filename, L"\\%s%s.exe", 10) == 0) {
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
DWORD Val = 123;
SetLastError(Val);
OutputDebugString(L"%s%s%s%s%s%s%s%s");
if(GetLastError() == Val) {
return 1;