Added static binary tools collection (originally in SVN archive)

This commit is contained in:
2021-02-11 10:21:04 -05:00
parent cd42e4e051
commit eae7957d51
164 changed files with 53763 additions and 0 deletions

View File

@ -0,0 +1,9 @@
//#include <windows.h>
#ifdef _DLLMACRO
#define DllExport __declspec(dllexport)
#else
#define DllExport __declspec(dllimport)
#endif
DllExport DWORD DoMyJob(HWND hMainDlg, char *szFname, DWORD lpReserved, LPVOID lpParam);
DllExport LPSTR LoadDll();

View File

@ -0,0 +1,40 @@
#include <windows.h>
#include "defs.h"
DWORD DoMyJob(HWND hMainDlg, char *szFname, DWORD lpReserved, LPVOID lpParam)
{
//hMainDlg: HWND of PEiD window
//szFname: Filename
//lpReserved: PEiD passes 'PEiD' as the value
//lpParam: NULL passed, for future use
// Write your main code here
return 1;
}
LPSTR LoadDll()
{
return "Name of the plugin";
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

View File

@ -0,0 +1,30 @@
//sample provided by _pusher_
library Sample;
uses
Windows;
type DLL_RET_MSG = record
szMsgText: PChar;
szMsgHead: PChar;
dRetVal: DWORD;
dRetExVal: DWORD;
dFlags: DWORD;
end;
function LoadDll:PChar;cdecl;
begin
result:='Name for Plugin';
end;
function DoMyJob(hMainDlg: HWND; szFname: PChar; lpReserved: DWORD; DRM: DLL_RET_MSG):DWORD; cdecl;
begin
Messagebox(hMainDlg,Pchar('hello world'+#13+#10+'FileName: '+szFname),'',MB_OK);
result:=1; //this is like showing peid all went well.
end;
exports
DoMyJob,
LoadDll;
end.

View File

@ -0,0 +1,4 @@
\masm32\bin\ml /c /coff /Cp masm_plugin.asm
\masm32\bin\link /dll /DEF:masm_plugin.def /subsystem:windows /libpath:\masm32\lib masm_plugin.obj
pause

View File

@ -0,0 +1,75 @@
;******************************************************************************
;* PEiD Plugin Example by diablo2oo2 *
;******************************************************************************
.586p
.mmx
.model flat, stdcall
option casemap :none
;******************************************************************************
;* INCLUDES *
;******************************************************************************
include \masm32\include\windows.inc
include \masm32\macros\macros.asm
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\shell32.inc
include \masm32\include\advapi32.inc
include \masm32\include\gdi32.inc
include \masm32\include\comctl32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\advapi32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\comctl32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\masm32.lib
;******************************************************************************
;* DATA & CONSTANTS *
;******************************************************************************
.const
.data
.data?
hInstance dd ?
;******************************************************************************
;* CODE *
;******************************************************************************
.code
align 16
DllEntry proc _hInstance:HINSTANCE, _reason:DWORD, _reserved1:DWORD
m2m hInstance,_hInstance
mov eax,TRUE
ret
DllEntry endp
align 16
LoadDll proc
;---Name of the plugin---
mov eax,chr$("MASM Plugin Example")
ret
LoadDll endp
align 16
DoMyJob proc _hwnd:dword,_filename:dword,_lpreserved:dword,_lpparam:dword
invoke MessageBox,_hwnd,_filename,chr$("MASM Plugin Example"),MB_OK
;---job done!---
pop ebp ;stack fix
mov eax,1
retn ;stack fix
DoMyJob endp
end DllEntry

View File

@ -0,0 +1,4 @@
LIBRARY masm_plugin
EXPORTS
LoadDll
DoMyJob

View File

@ -0,0 +1,84 @@
' =================================================
'
' PEiD's Plugin skeleton for PowerBASIC
' (C) 2004 by Marco Pontello - http://mark0.net
'
' This code is to be considered "public domain".
' Feel free to do what you want with it.
'
' -------------------------------------------------
'
' PEiD is a file identifier especially tailored for
' PE (Portable executable) files. It detects most
' common packers, cryptors and compilers. It also
' sports a range of useful tools and plugins.
'
' PEiD's home: http://peid.has.it/
'
' =================================================
#COMPILE DLL
#DIM ALL
$PROGRAMVER = "1.0"
$PROGRAMTITLE = "MyPlugin"
#INCLUDE "WIN32API.INC"
' --- Global declarations
GLOBAL ghDLLInstance AS LONG
GLOBAL ghPEiDDialog AS LONG
' --- Exported functions
DECLARE FUNCTION DoMyJob CDECL ALIAS "DoMyJob" (BYVAL hMainDlg AS DWORD, _
BYREF szfName AS ASCIIZ, BYVAL lpReserved AS DWORD, _
BYVAL lpVoid AS DWORD) AS DWORD
DECLARE FUNCTION LoadDll CDECL ALIAS "LoadDll" () AS DWORD
' --- Return Plugin Name to PEiD
' PEiD call this at startup to build a list with the name of all
' available Plugins
FUNCTION LoadDll CDECL ALIAS "LoadDll" () EXPORT AS DWORD
STATIC szPluginName AS ASCIIZ * 256
szPluginName = $PROGRAMTITLE
FUNCTION = VARPTR(szPluginName)
END FUNCTION
' --- Main Plugin routine
' This is called by PEiD when the Plugin is selected/run
FUNCTION DoMyJob CDECL ALIAS "DoMyJob" (BYVAL hMainDlg AS DWORD, _
BYREF szfName AS ASCIIZ, BYVAL lpReserved AS DWORD, _
BYVAL lpVoid AS DWORD) EXPORT AS DWORD
ghPEiDDialog = hMainDlg
MsgBox "PEiD's file: " & szfName, %MB_SYSTEMMODAL, $PROGRAMTITLE
FUNCTION = 1
EXIT FUNCTION
END FUNCTION
' --- Main DLL entry
FUNCTION LibMain (BYVAL hInstance AS LONG, BYVAL fwdReason AS LONG, _
BYVAL lpvReserved AS LONG) AS LONG
SELECT CASE fwdReason
CASE %DLL_PROCESS_ATTACH
ghDLLInstance = hInstance
FUNCTION = 1
CASE %DLL_PROCESS_DETACH
FUNCTION = 1
CASE %DLL_THREAD_ATTACH
FUNCTION = 1
CASE %DLL_THREAD_DETACH
FUNCTION = 1
END SELECT
EXIT FUNCTION
END FUNCTION

View File

@ -0,0 +1,6 @@
The Sample sources were provided by
PowerBASIC, Mark0
C++ , snaker
Delphi, _pusher_
MASM, diablo2oo2