Skip to content

Commit

Permalink
Worked on WPS name resolution tool
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Mar 13, 2024
1 parent b690145 commit 03002c7
Show file tree
Hide file tree
Showing 9 changed files with 622 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ stamp-h[1-9]
/src/serpentcrypt
/src/unicodetouch
/src/wevtinfo
/src/wpsname
/src/winregsave
/src/winshellfolder
/src/winshelllink
Expand Down
1 change: 1 addition & 0 deletions msvscpp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ MSVSCPP_FILES = \
winregsave/winregsave.vcproj \
winshellfolder/winshellfolder.vcproj \
winshelllink/winshelllink.vcproj \
wpsname/wpsname.vcproj \
xor32sum/xor32sum.vcproj \
xor64sum/xor64sum.vcproj \
zcompress/zcompress.vcproj \
Expand Down
14 changes: 14 additions & 0 deletions msvscpp/assorted.sln
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wevtinfo", "wevtinfo\wevtin
{DD4C0210-D36E-4E74-AA91-B39E54E81E22} = {DD4C0210-D36E-4E74-AA91-B39E54E81E22}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wpsname", "wpsname\wpsname.vcproj", "{703A8EDC-5601-4662-A226-1C4FFBFEB6C3}"
ProjectSection(ProjectDependencies) = postProject
{16510E82-C099-4A58-8ABE-E62D36E945E8} = {16510E82-C099-4A58-8ABE-E62D36E945E8}
{7CCEB0A1-5BFC-4006-A364-EDAFC545EBF3} = {7CCEB0A1-5BFC-4006-A364-EDAFC545EBF3}
{2B851ED2-22C8-4BB6-AE22-E49A75536FF5} = {2B851ED2-22C8-4BB6-AE22-E49A75536FF5}
{12DF7DB4-FC19-44F7-89B6-B7221EA77BE6} = {12DF7DB4-FC19-44F7-89B6-B7221EA77BE6}
{952218B5-15F2-4EEC-B67D-164407BAE738} = {952218B5-15F2-4EEC-B67D-164407BAE738}
{DD4C0210-D36E-4E74-AA91-B39E54E81E22} = {DD4C0210-D36E-4E74-AA91-B39E54E81E22}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winregsave", "winregsave\winregsave.vcproj", "{9A2ECE73-F064-437E-A379-D4DE6A040116}"
ProjectSection(ProjectDependencies) = postProject
{7CCEB0A1-5BFC-4006-A364-EDAFC545EBF3} = {7CCEB0A1-5BFC-4006-A364-EDAFC545EBF3}
Expand Down Expand Up @@ -574,6 +584,10 @@ Global
{4600994E-D3A1-43F0-BCEE-A4AA7C7781C8}.Release|Win32.Build.0 = Release|Win32
{4600994E-D3A1-43F0-BCEE-A4AA7C7781C8}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
{4600994E-D3A1-43F0-BCEE-A4AA7C7781C8}.VSDebug|Win32.Build.0 = VSDebug|Win32
{703A8EDC-5601-4662-A226-1C4FFBFEB6C3}.Release|Win32.ActiveCfg = Release|Win32
{703A8EDC-5601-4662-A226-1C4FFBFEB6C3}.Release|Win32.Build.0 = Release|Win32
{703A8EDC-5601-4662-A226-1C4FFBFEB6C3}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
{703A8EDC-5601-4662-A226-1C4FFBFEB6C3}.VSDebug|Win32.Build.0 = VSDebug|Win32
{9A2ECE73-F064-437E-A379-D4DE6A040116}.Release|Win32.ActiveCfg = Release|Win32
{9A2ECE73-F064-437E-A379-D4DE6A040116}.Release|Win32.Build.0 = Release|Win32
{9A2ECE73-F064-437E-A379-D4DE6A040116}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
Expand Down
234 changes: 234 additions & 0 deletions msvscpp/wpsname/wpsname.vcproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="wpsname"
ProjectGUID="{703A8EDC-5601-4662-A226-1C4FFBFEB6C3}"
RootNamespace="wpsname"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libuna;..\..\libcfile;..\..\libfcrypto;..\..\libfguid;..\..\libfvalue;..\..\libfdatetime;..\..\libfmos;..\..\libfplist;..\..\libfwevt;..\..\libfwnt;..\..\..\zlib;..\..\..\bzip2;..\..\libhmac"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBFCRYPTO;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFMOS;HAVE_LOCAL_LIBFPLIST;HAVE_LOCAL_LIBFWEVT;HAVE_LOCAL_LIBFWNT;ZLIB_DLL;BZ_DLL;HAVE_LOCAL_LIBHMAC;ASSORTED_DLL_IMPORT"
RuntimeLibrary="2"
WarningLevel="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="2"
DataExecutionPrevention="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="VSDebug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libuna;..\..\libcfile;..\..\libfcrypto;..\..\libfguid;..\..\libfvalue;..\..\libfdatetime;..\..\libfmos;..\..\libfplist;..\..\libfwevt;..\..\libfwnt;..\..\..\zlib;..\..\..\bzip2;..\..\libhmac"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBFCRYPTO;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFMOS;HAVE_LOCAL_LIBFPLIST;HAVE_LOCAL_LIBFWEVT;HAVE_LOCAL_LIBFWNT;ZLIB_DLL;BZ_DLL;HAVE_LOCAL_LIBHMAC;ASSORTED_DLL_IMPORT"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="3"
WarningLevel="4"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\src\assorted_getopt.c"
>
</File>
<File
RelativePath="..\..\src\assorted_output.c"
>
</File>
<File
RelativePath="..\..\src\wpsname.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\src\assorted_getopt.h"
>
</File>
<File
RelativePath="..\..\src\assorted_i18n.h"
>
</File>
<File
RelativePath="..\..\src\assorted_libcerror.h"
>
</File>
<File
RelativePath="..\..\src\assorted_libcfile.h"
>
</File>
<File
RelativePath="..\..\src\assorted_libcnotify.h"
>
</File>
<File
RelativePath="..\..\src\assorted_libfguid.h"
>
</File>
<File
RelativePath="..\..\src\assorted_output.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
19 changes: 19 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ bin_PROGRAMS = \
serpentcrypt \
unicodetouch \
wevtinfo \
wpsname \
winregsave \
winshellfolder \
winshelllink \
Expand Down Expand Up @@ -478,6 +479,24 @@ wevtinfo_LDADD = \
@LIBCDATA_LIBADD@ \
@LIBCERROR_LIBADD@

wpsname_SOURCES = \
assorted_getopt.c assorted_getopt.h \
assorted_i18n.h \
assorted_libcerror.h \
assorted_libcfile.h \
assorted_libcnotify.h \
assorted_libfguid.h \
assorted_output.c assorted_output.h \
wpsname.c

wpsname_LDADD = \
@LIBFGUID_LIBADD@ \
@LIBCFILE_LIBADD@ \
@LIBUNA_LIBADD@ \
@LIBCNOTIFY_LIBADD@ \
@LIBCLOCALE_LIBADD@ \
@LIBCERROR_LIBADD@

winregsave_SOURCES = \
assorted_getopt.c assorted_getopt.h \
assorted_i18n.h \
Expand Down
49 changes: 49 additions & 0 deletions src/assorted_libfguid.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* The libfguid header wrapper
*
* Copyright (C) 2008-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#if !defined( _ASSORTED_LIBFGUID_H )
#define _ASSORTED_LIBFGUID_H

#include <common.h>

/* Define HAVE_LOCAL_LIBFGUID for local use of libfguid
*/
#if defined( HAVE_LOCAL_LIBFGUID )

#include <libfguid_definitions.h>
#include <libfguid_identifier.h>
#include <libfguid_types.h>

#else

/* If libtool DLL support is enabled set LIBFGUID_DLL_IMPORT
* before including libfguid.h
*/
#if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )
#define LIBFGUID_DLL_IMPORT
#endif

#include <libfguid.h>

#endif /* defined( HAVE_LOCAL_LIBFGUID ) */

#endif /* !defined( _ASSORTED_LIBFGUID_H ) */

2 changes: 1 addition & 1 deletion src/winshellfolder.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void usage_fprint(
}
fprintf( stream, "Use winshellfolder to determine a Shell Folder from a path.\n\n" );

fprintf( stream, "Usage: winshellfolder [ -12hvV ] path\n\n" );
fprintf( stream, "Usage: winshellfolder [ -hvV ] path\n\n" );

fprintf( stream, "\tpath: the path to determine the shell folder of.\n" );

Expand Down
2 changes: 1 addition & 1 deletion src/winshelllink.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void usage_fprint(
}
fprintf( stream, "Use winshelllink to determine a Shell Link from a path.\n\n" );

fprintf( stream, "Usage: winshelllink [ -12hvV ] path\n\n" );
fprintf( stream, "Usage: winshelllink [ -hvV ] path\n\n" );

fprintf( stream, "\tpath: the path to determine the shell link of.\n" );

Expand Down
Loading

0 comments on commit 03002c7

Please sign in to comment.