Skip to content

Commit

Permalink
Strip Yara code. Already present in x64dbg.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukem9 committed Apr 3, 2015
1 parent 23d4eb9 commit a33ce9a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 168 deletions.
19 changes: 10 additions & 9 deletions sigmake/Dialog/SigMakeDialog.cpp
Expand Up @@ -112,22 +112,23 @@ void MakeSigDialogExecute(HWND hwndDlg)
GetWindowText(GetDlgItem(hwndDlg, IDC_SIGMAKE_EDIT1), data, dataLen);
GetWindowText(GetDlgItem(hwndDlg, IDC_SIGMAKE_EDIT2), mask, maskLen);

std::vector<duint> results;
SIG_DESCRIPTOR *desc = nullptr;

//
// Convert the string to a code descriptor
//
if (Settings::LastType == SIG_CODE)
desc = DescriptorFromCode(data, mask);
else if (Settings::LastType == SIG_IDA)
desc = DescriptorFromIDA(data);
else if (Settings::LastType == SIG_CRC)
desc = DescriptorFromCRC(data);
SIG_DESCRIPTOR *desc = nullptr;

switch (Settings::LastType)
{
case SIG_CODE: desc = DescriptorFromCode(data, mask); break;
case SIG_IDA: desc = DescriptorFromIDA(data); break;
case SIG_CRC: desc = DescriptorFromCRC(data); break;
}

//
// Scan
//
std::vector<duint> results;

PatternScan(desc, results);

//
Expand Down
5 changes: 0 additions & 5 deletions sigmake/Plugin.cpp
Expand Up @@ -42,10 +42,6 @@ void MenuEntryCallback(CBTYPE Type, PLUG_CB_MENUENTRY *Info)
OpenSigMakeDialog();
break;

case PLUGIN_MENU_YARASIG:
OpenYaraDialog();
break;

case PLUGIN_MENU_SETTINGS:
OpenSettingsDialog();
break;
Expand Down Expand Up @@ -92,7 +88,6 @@ DLL_EXPORT void plugsetup(PLUG_SETUPSTRUCT *SetupStruct)

// Initialize the menu
_plugin_menuaddentry(g_MenuHandle, PLUGIN_MENU_MAKESIG, "&Create signature");
_plugin_menuaddentry(g_MenuHandle, PLUGIN_MENU_YARASIG, "&Yara signature");
_plugin_menuaddseparator(g_MenuHandle);
_plugin_menuaddentry(g_MenuHandle, PLUGIN_MENU_SETTINGS, "&Settings");
_plugin_menuaddentry(g_MenuHandle, PLUGIN_MENU_ABOUT, "&About");
Expand Down
1 change: 0 additions & 1 deletion sigmake/Plugin.h
Expand Up @@ -11,7 +11,6 @@ duint DbgGetCurrentModule();
enum
{
PLUGIN_MENU_MAKESIG,
PLUGIN_MENU_YARASIG,
PLUGIN_MENU_CONVERTSIG,
PLUGIN_MENU_SETTINGS,
PLUGIN_MENU_ABOUT,
Expand Down
130 changes: 0 additions & 130 deletions sigmake/Yara.cpp

This file was deleted.

3 changes: 0 additions & 3 deletions sigmake/Yara.h

This file was deleted.

6 changes: 2 additions & 4 deletions sigmake/sigmake.vcxproj
Expand Up @@ -72,7 +72,7 @@
<LinkIncremental>true</LinkIncremental>
<TargetName>$(ProjectName)_debug</TargetName>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir)\yara</IncludePath>
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
Expand All @@ -87,7 +87,7 @@
<OutDir>$(SolutionDir)x32\plugins\</OutDir>
<TargetExt>.dp32</TargetExt>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir)\yara</IncludePath>
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
Expand Down Expand Up @@ -176,7 +176,6 @@
<ClInclude Include="SigMake.h" />
<ClInclude Include="Dialog\SigMakeDialog.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="Yara.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Descriptor.cpp" />
Expand Down Expand Up @@ -260,7 +259,6 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="Yara.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="sigmake.rc" />
Expand Down
6 changes: 0 additions & 6 deletions sigmake/sigmake.vcxproj.filters
Expand Up @@ -68,9 +68,6 @@
<ClInclude Include="Descriptor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Yara.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Dialog\SigMakeDialog.h">
<Filter>Dialog</Filter>
</ClInclude>
Expand Down Expand Up @@ -121,9 +118,6 @@
<ClCompile Include="Descriptor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Yara.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Dialog\SettingsDialog.cpp">
<Filter>Dialog</Filter>
</ClCompile>
Expand Down
10 changes: 0 additions & 10 deletions sigmake/stdafx.h
Expand Up @@ -16,14 +16,6 @@ extern "C"
#include "distorm/prefix.h"
}

//
// YARA
//
extern "C"
{
#include <yara.h>
}

//
// X64DBG
//
Expand All @@ -49,7 +41,6 @@ extern "C"
#include "pluginsdk/_dbgfunctions.h"
#include "pluginsdk/TitanEngine/TitanEngine.h"


//
// PLUGIN
//
Expand All @@ -59,7 +50,6 @@ extern "C"
#include "Plugin.h"
#include "Descriptor.h"
#include "SigMake.h"
#include "Yara.h"
#include "Dialog/SigMakeDialog.h"
#include "Dialog/Settings.h"
#include "Dialog/SettingsDialog.h"

0 comments on commit a33ce9a

Please sign in to comment.