Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
544fbd19f4 | |||
2f964b5b93 | |||
52c31028c5 | |||
e391718b52 | |||
ea64977098 | |||
9fdbb01bcd | |||
31712d00ee | |||
37fdb5016f | |||
05b6541e2a | |||
325c9ab13e | |||
5903f86ac5 | |||
7d846847f6 | |||
52ed5fe3ea | |||
5d269a31ce | |||
b581a947d2 | |||
600a107861 |
6
.gitmodules
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[submodule "SsdeepNET"]
|
||||||
|
path = SsdeepNET
|
||||||
|
url = https://github.com/kolos450/SsdeepNET
|
||||||
|
[submodule "androidxmldotnet"]
|
||||||
|
path = androidxmldotnet
|
||||||
|
url = https://github.com/quamotion/androidxmldotnet
|
|
@ -9,6 +9,22 @@
|
||||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
|
@ -12,6 +12,21 @@
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<Deterministic>true</Deterministic>
|
<Deterministic>true</Deterministic>
|
||||||
|
<PublishUrl>게시\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
@ -32,13 +47,22 @@
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<SignAssembly>true</SignAssembly>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<AssemblyOriginatorKeyFile>socialonthefile.snk</AssemblyOriginatorKeyFile>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BencodeNET, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\BencodeNET.4.0.0\lib\netstandard2.0\BencodeNET.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Crc32.NET, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dc0b95cf99bf4e99, processorArchitecture=MSIL">
|
<Reference Include="Crc32.NET, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dc0b95cf99bf4e99, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Crc32.NET.1.2.0\lib\net20\Crc32.NET.dll</HintPath>
|
<HintPath>..\packages\Crc32.NET.1.2.0\lib\net20\Crc32.NET.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="MetadataExtractor, Version=2.8.1.0, Culture=neutral, PublicKeyToken=b66b5ccaf776c301, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\MetadataExtractor.2.8.1\lib\net45\MetadataExtractor.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
@ -48,21 +72,32 @@
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Design" />
|
<Reference Include="System.Design" />
|
||||||
<Reference Include="System.IO.Pipelines, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Compression" />
|
||||||
<HintPath>..\packages\System.IO.Pipelines.4.6.0\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
<Reference Include="System.IO.Compression.FileSystem" />
|
||||||
|
<Reference Include="System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Packaging, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
<HintPath>..\packages\System.IO.Packaging.8.0.0\lib\net462\System.IO.Packaging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.IO.Pipelines, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.IO.Pipelines.8.0.0\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Numerics" />
|
<Reference Include="System.Numerics" />
|
||||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Security" />
|
||||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
@ -73,29 +108,45 @@
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="XmpCore, Version=6.1.10.1, Culture=neutral, PublicKeyToken=961f4f366277b80e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\XmpCore.6.1.10.1\lib\net35\XmpCore.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Config.cs" />
|
<Compile Include="Config.cs" />
|
||||||
<Compile Include="Form1.cs">
|
<Compile Include="Helper\InfoHashExtractor.cs" />
|
||||||
|
<Compile Include="Model\CfbfPartInfo.cs" />
|
||||||
|
<Compile Include="Model\HashInfo.cs" />
|
||||||
|
<Compile Include="Worker1.cs" />
|
||||||
|
<Compile Include="Main.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Form1.Designer.cs">
|
<Compile Include="Main.Designer.cs">
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
<DependentUpon>Main.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Form2.cs">
|
<Compile Include="UserControl2.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Form2.Designer.cs">
|
<Compile Include="UserControl2.Designer.cs">
|
||||||
<DependentUpon>Form2.cs</DependentUpon>
|
<DependentUpon>UserControl2.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Helper\FileCompute.cs" />
|
<Compile Include="Helper\ApkManifestExtractor.cs" />
|
||||||
<Compile Include="Helper\FileExtensionDB.cs" />
|
<Compile Include="Helper\CfbfExtractor.cs" />
|
||||||
<Compile Include="Helper\FileCompany.cs" />
|
<Compile Include="Helper\FileHasher.cs" />
|
||||||
<Compile Include="Helper\FileMagic.cs" />
|
<Compile Include="Helper\FileExtensionDatabase.cs" />
|
||||||
|
<Compile Include="Helper\PeOrganizationExtractor.cs" />
|
||||||
|
<Compile Include="Helper\FileMagicExtractor.cs" />
|
||||||
|
<Compile Include="Helper\LinkExtractor.cs" />
|
||||||
<Compile Include="Helper\ImpHash.cs" />
|
<Compile Include="Helper\ImpHash.cs" />
|
||||||
|
<Compile Include="Helper\ExifTagExtractor.cs" />
|
||||||
|
<Compile Include="Helper\OpenXMLExtractor.cs" />
|
||||||
<Compile Include="Helper\Timeline.cs" />
|
<Compile Include="Helper\Timeline.cs" />
|
||||||
<Compile Include="Model\ComputeModel.cs" />
|
<Compile Include="Model\AndroidPermission.cs" />
|
||||||
<Compile Include="Model\Indicator.cs" />
|
<Compile Include="Model\ExifTag.cs" />
|
||||||
|
<Compile Include="Model\TimelineMessage.cs" />
|
||||||
|
<Compile Include="Model\OpenXMLMetadata.cs" />
|
||||||
|
<Compile Include="Model\Timestamp.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="UserControl1.cs">
|
<Compile Include="UserControl1.cs">
|
||||||
|
@ -104,11 +155,11 @@
|
||||||
<Compile Include="UserControl1.Designer.cs">
|
<Compile Include="UserControl1.Designer.cs">
|
||||||
<DependentUpon>UserControl1.cs</DependentUpon>
|
<DependentUpon>UserControl1.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<EmbeddedResource Include="Form1.resx">
|
<EmbeddedResource Include="Main.resx">
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
<DependentUpon>Main.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Form2.resx">
|
<EmbeddedResource Include="UserControl2.resx">
|
||||||
<DependentUpon>Form2.cs</DependentUpon>
|
<DependentUpon>UserControl2.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
@ -123,6 +174,7 @@
|
||||||
<EmbeddedResource Include="UserControl1.resx">
|
<EmbeddedResource Include="UserControl1.resx">
|
||||||
<DependentUpon>UserControl1.cs</DependentUpon>
|
<DependentUpon>UserControl1.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<None Include="LICENSE" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
@ -133,6 +185,7 @@
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<None Include="socialonthefile.snk" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
|
@ -143,41 +196,48 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\icon.ico" />
|
<None Include="Resources\icon.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\fediverse.1024x1020.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\fediverse.256x255.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\icon_32.ico" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\officedatabase_103574.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\database_theapplication_3365.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\chat_bubble_talk_conversation_talking_snapchat_icon-icons.com_59964.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\message_bubble_conversation_speech_communication_talk_chat_icon_219299.png" />
|
<None Include="Resources\message_bubble_conversation_speech_communication_talk_chat_icon_219299.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\data_96285.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\data_database_icon_177024.png" />
|
<None Include="Resources\data_database_icon_177024.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\ok_done_yes_accept_checklist_checkmark_icon_232033.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\checkmark_checklist_agenda_schedule_budget_wedding_cost_list_planner_icon_255066.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\document_paperclip_list_paper_icon_219544.png" />
|
<None Include="Resources\document_paperclip_list_paper_icon_219544.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\2333410-android-os-smartphone_85588.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\office_18907.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\link-symbol_icon-icons.com_56927.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\tags_icon-icons.com_73382.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Microsoft .NET Framework 4.8%28x86 및 x64%29</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\androidxmldotnet\AndroidXml\AndroidXml.csproj">
|
||||||
|
<Project>{e55ce5e9-aeec-4625-82ff-9c73dad2ba84}</Project>
|
||||||
|
<Name>AndroidXml</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\SsdeepNET\Source\SsdeepNET\SsdeepNET.csproj">
|
||||||
|
<Project>{1fc34ef4-5137-4069-a18a-d35afec5181f}</Project>
|
||||||
|
<Name>SsdeepNET</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
public class Config
|
public class Config
|
||||||
{
|
{
|
||||||
public static string SEARCH_URL = "http://utilhome.cafe24.com/extlist.xml?q=";
|
public static string SEARCH_URL = "https://exts.kr/extlist.xml?q=";
|
||||||
public static string MASTODON_HOST = "catswords.social";
|
public static string MASTODON_HOST = "catswords.social";
|
||||||
public static string MASTODON_ACCESS_TOKEN = "HDVTEfLswvSJZq5MRpim2tp7DifTcgKbMl0mBM5-uHw";
|
public static string MASTODON_ACCESS_TOKEN = "HDVTEfLswvSJZq5MRpim2tp7DifTcgKbMl0mBM5-uHw";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
using Catswords.DataType.Client.Model;
|
|
||||||
using System;
|
|
||||||
using System.ComponentModel.Design;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Catswords.DataType.Client
|
|
||||||
{
|
|
||||||
public partial class Form2 : Form
|
|
||||||
{
|
|
||||||
private UserControl1 parent;
|
|
||||||
private ComputeModel computedData;
|
|
||||||
|
|
||||||
public Form2(UserControl1 parent)
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
this.parent = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Form2_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
computedData = Helper.FileCompute.Compute(parent.filePath);
|
|
||||||
txtExtension.Text = computedData.Extension;
|
|
||||||
txtHashMd5.Text = computedData.MD5;
|
|
||||||
txtHashSha1.Text = computedData.SHA1;
|
|
||||||
txtHashCrc32.Text = computedData.CRC32;
|
|
||||||
txtHashSha256.Text = computedData.SHA256;
|
|
||||||
txtMagic.Text = computedData.MAGIC;
|
|
||||||
txtInfoHash.Text = computedData.InfoHash;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
ByteViewer bv = new ByteViewer();
|
|
||||||
bv.SetFile(parent.filePath); // or SetBytes
|
|
||||||
|
|
||||||
Form newForm = new Form();
|
|
||||||
newForm.Size = new System.Drawing.Size(650, 600);
|
|
||||||
newForm.Text = "ByteViewer";
|
|
||||||
newForm.Icon = Properties.Resources.icon;
|
|
||||||
newForm.MinimizeBox = false;
|
|
||||||
newForm.MaximizeBox = false;
|
|
||||||
newForm.FormBorderStyle = FormBorderStyle.FixedSingle;
|
|
||||||
newForm.Controls.Add(bv);
|
|
||||||
newForm.Show();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void button2_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Process.Start("https://www.virustotal.com/gui/file/" + computedData.SHA256);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
82
Catswords.DataType.Client/Helper/ApkManifestExtractor.cs
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
using AndroidXml;
|
||||||
|
using Catswords.DataType.Client.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client.Helper
|
||||||
|
{
|
||||||
|
class ApkManifestExtractor
|
||||||
|
{
|
||||||
|
private string FilePath;
|
||||||
|
private string TempDirectory;
|
||||||
|
private string TargetPath;
|
||||||
|
|
||||||
|
public ApkManifestExtractor(string filePath)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Open()
|
||||||
|
{
|
||||||
|
// Create a temporary directory for extraction
|
||||||
|
TempDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
|
||||||
|
Directory.CreateDirectory(TempDirectory);
|
||||||
|
|
||||||
|
using (ZipArchive apkArchive = ZipFile.OpenRead(FilePath))
|
||||||
|
{
|
||||||
|
foreach (ZipArchiveEntry entry in apkArchive.Entries)
|
||||||
|
{
|
||||||
|
if (entry.FullName == "AndroidManifest.xml")
|
||||||
|
{
|
||||||
|
TargetPath = Path.Combine(TempDirectory, Guid.NewGuid().ToString());
|
||||||
|
entry.ExtractToFile(TargetPath);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
// Delete the temporary directory and its contents
|
||||||
|
Directory.Delete(TempDirectory, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AndroidPermission> GetPermissions()
|
||||||
|
{
|
||||||
|
List<AndroidPermission> permissions = new List<AndroidPermission>();
|
||||||
|
|
||||||
|
using (FileStream stream = File.OpenRead(TargetPath))
|
||||||
|
{
|
||||||
|
// Read the AndroidManifest.xml file
|
||||||
|
var reader = new AndroidXmlReader(stream);
|
||||||
|
XDocument doc = XDocument.Load(reader);
|
||||||
|
|
||||||
|
// Find all <uses-permission> elements
|
||||||
|
var permissionNodes = doc.Descendants().Where(e => e.Name.LocalName == "uses-permission");
|
||||||
|
foreach (var node in permissionNodes)
|
||||||
|
{
|
||||||
|
foreach (var attr in node.Attributes())
|
||||||
|
{
|
||||||
|
if (attr.Name.LocalName == "name")
|
||||||
|
{
|
||||||
|
permissions.Add(new AndroidPermission
|
||||||
|
{
|
||||||
|
Name = attr.Value,
|
||||||
|
Description = "",
|
||||||
|
Severity = 0,
|
||||||
|
CreatedAt = DateTime.Now
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return permissions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
71
Catswords.DataType.Client/Helper/CfbfExtractor.cs
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
using Catswords.DataType.Client.Model;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO.Packaging;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client.Helper
|
||||||
|
{
|
||||||
|
public class CfbfExtractor
|
||||||
|
{
|
||||||
|
private string FilePath;
|
||||||
|
|
||||||
|
public CfbfExtractor(string filePath)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CfbfPartInfo> GetParts()
|
||||||
|
{
|
||||||
|
List<CfbfPartInfo> partInfoList = new List<CfbfPartInfo>();
|
||||||
|
|
||||||
|
if (!IsValidFormat())
|
||||||
|
{
|
||||||
|
return partInfoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
using (Package package = Package.Open(FilePath, FileMode.Open, FileAccess.Read))
|
||||||
|
{
|
||||||
|
foreach (PackagePart part in package.GetParts())
|
||||||
|
{
|
||||||
|
CfbfPartInfo partInfo = new CfbfPartInfo();
|
||||||
|
partInfo.URI = part.Uri.ToString();
|
||||||
|
partInfo.ContentType = part.ContentType;
|
||||||
|
|
||||||
|
using (Stream stream = part.GetStream(FileMode.Open, FileAccess.Read))
|
||||||
|
{
|
||||||
|
using (StreamReader reader = new StreamReader(stream))
|
||||||
|
{
|
||||||
|
partInfo.Content = reader.ReadToEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
partInfoList.Add(partInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return partInfoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsValidFormat()
|
||||||
|
{
|
||||||
|
// CFBF 파일 시그니처 확인
|
||||||
|
byte[] signatureBytes = { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 };
|
||||||
|
byte[] fileBytes = new byte[signatureBytes.Length];
|
||||||
|
|
||||||
|
using (FileStream fileStream = new FileStream(FilePath, FileMode.Open, FileAccess.Read))
|
||||||
|
{
|
||||||
|
fileStream.Read(fileBytes, 0, signatureBytes.Length);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < signatureBytes.Length; i++)
|
||||||
|
{
|
||||||
|
if (fileBytes[i] != signatureBytes[i])
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
44
Catswords.DataType.Client/Helper/ExifTagExtractor.cs
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
using Catswords.DataType.Client.Model;
|
||||||
|
using MetadataExtractor;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client.Helper
|
||||||
|
{
|
||||||
|
class ExifTagExtractor
|
||||||
|
{
|
||||||
|
private string FilePath;
|
||||||
|
|
||||||
|
public ExifTagExtractor(string filePath)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ExifTag> GetTags()
|
||||||
|
{
|
||||||
|
List<ExifTag> tags = new List<ExifTag>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
IEnumerable<Directory> directories = ImageMetadataReader.ReadMetadata(FilePath);
|
||||||
|
foreach (var directory in directories)
|
||||||
|
{
|
||||||
|
foreach (var tag in directory.Tags)
|
||||||
|
{
|
||||||
|
tags.Add(new ExifTag
|
||||||
|
{
|
||||||
|
Section = directory.Name,
|
||||||
|
Name = tag.Name,
|
||||||
|
Description = tag.Description.ToString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,69 +0,0 @@
|
||||||
using Catswords.DataType.Client.Model;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Xml;
|
|
||||||
|
|
||||||
namespace Catswords.DataType.Client.Helper
|
|
||||||
{
|
|
||||||
class FileExtensionDB
|
|
||||||
{
|
|
||||||
public List<Indicator> Indicators;
|
|
||||||
|
|
||||||
public FileExtensionDB()
|
|
||||||
{
|
|
||||||
Indicators = new List<Indicator>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Fetch(string q)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// 원격 주소에서 XML 다운로드
|
|
||||||
string url = Config.SEARCH_URL + q;
|
|
||||||
WebClient client = new WebClient();
|
|
||||||
client.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3");
|
|
||||||
client.Encoding = Encoding.UTF8;
|
|
||||||
string xmlString = client.DownloadString(url);
|
|
||||||
|
|
||||||
// XmlDocument 객체 생성
|
|
||||||
XmlDocument xmlDoc = new XmlDocument();
|
|
||||||
xmlDoc.LoadXml(xmlString);
|
|
||||||
|
|
||||||
// 루트 노드 가져오기
|
|
||||||
XmlNodeList itemList = xmlDoc.SelectNodes("/claw/list/item");
|
|
||||||
|
|
||||||
// 각 아이템을 반복하며 정보 출력
|
|
||||||
foreach (XmlNode itemNode in itemList)
|
|
||||||
{
|
|
||||||
Indicators.Add(new Indicator()
|
|
||||||
{
|
|
||||||
Id = itemNode.SelectSingleNode("id").InnerText,
|
|
||||||
CreatedAt = FormatDateTime(itemNode.SelectSingleNode("datetime").InnerText),
|
|
||||||
Content = itemNode.SelectSingleNode("description").InnerText,
|
|
||||||
Url = ""
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
MessageBox.Show("Error: " + ex.Message);
|
|
||||||
Console.WriteLine("Error: " + ex.Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string FormatDateTime(string dateString)
|
|
||||||
{
|
|
||||||
string formattedDateTime = "";
|
|
||||||
|
|
||||||
if (DateTime.TryParseExact(dateString, "yyyy-MM-dd HH:mm:ss", null, System.Globalization.DateTimeStyles.None, out DateTime parsedDateTime))
|
|
||||||
{
|
|
||||||
formattedDateTime = parsedDateTime.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
return formattedDateTime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
112
Catswords.DataType.Client/Helper/FileExtensionDatabase.cs
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
using Catswords.DataType.Client.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client.Helper
|
||||||
|
{
|
||||||
|
class FileExtensionDatabase
|
||||||
|
{
|
||||||
|
public List<TimelineMessage> Indicators;
|
||||||
|
|
||||||
|
public FileExtensionDatabase()
|
||||||
|
{
|
||||||
|
Indicators = new List<TimelineMessage>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Fetch(string q)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 원격 주소에서 XML 다운로드
|
||||||
|
string url = Config.SEARCH_URL + q;
|
||||||
|
WebClient client = new WebClient();
|
||||||
|
client.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3");
|
||||||
|
client.Encoding = Encoding.UTF8;
|
||||||
|
string xmlString = client.DownloadString(url);
|
||||||
|
|
||||||
|
// XmlDocument 객체 생성
|
||||||
|
XmlDocument xmlDoc = new XmlDocument();
|
||||||
|
xmlDoc.LoadXml(xmlString);
|
||||||
|
|
||||||
|
// 루트 노드 가져오기
|
||||||
|
XmlNodeList itemList = xmlDoc.SelectNodes("/claw/list/item");
|
||||||
|
|
||||||
|
// 각 아이템을 반복하며 정보 출력
|
||||||
|
foreach (XmlNode itemNode in itemList)
|
||||||
|
{
|
||||||
|
// organization
|
||||||
|
Indicators.Add(new TimelineMessage()
|
||||||
|
{
|
||||||
|
Id = itemNode.SelectSingleNode("id").InnerText,
|
||||||
|
CreatedAt = GetDateTimeFromString(itemNode.SelectSingleNode("datetime").InnerText),
|
||||||
|
Content = "This format published by " + itemNode.SelectSingleNode("organization").InnerText,
|
||||||
|
Url = ""
|
||||||
|
});
|
||||||
|
|
||||||
|
// description
|
||||||
|
Indicators.Add(new TimelineMessage()
|
||||||
|
{
|
||||||
|
Id = itemNode.SelectSingleNode("id").InnerText,
|
||||||
|
CreatedAt = GetDateTimeFromString(itemNode.SelectSingleNode("datetime").InnerText),
|
||||||
|
Content = itemNode.SelectSingleNode("description").InnerText,
|
||||||
|
Url = ""
|
||||||
|
});
|
||||||
|
|
||||||
|
// content
|
||||||
|
Indicators.Add(new TimelineMessage()
|
||||||
|
{
|
||||||
|
Id = itemNode.SelectSingleNode("id").InnerText,
|
||||||
|
CreatedAt = GetDateTimeFromString(itemNode.SelectSingleNode("datetime").InnerText),
|
||||||
|
Content = itemNode.SelectSingleNode("content").InnerText,
|
||||||
|
Url = ""
|
||||||
|
});
|
||||||
|
|
||||||
|
// openwith
|
||||||
|
Indicators.Add(new TimelineMessage()
|
||||||
|
{
|
||||||
|
Id = itemNode.SelectSingleNode("id").InnerText,
|
||||||
|
CreatedAt = GetDateTimeFromString(itemNode.SelectSingleNode("datetime").InnerText),
|
||||||
|
Content = "Open with " + itemNode.SelectSingleNode("openwith").InnerText,
|
||||||
|
Url = ""
|
||||||
|
});
|
||||||
|
|
||||||
|
// first reported
|
||||||
|
Indicators.Add(new TimelineMessage()
|
||||||
|
{
|
||||||
|
Id = itemNode.SelectSingleNode("id").InnerText,
|
||||||
|
CreatedAt = GetDateTimeFromString(itemNode.SelectSingleNode("datetime").InnerText),
|
||||||
|
Content = "This format first seen on " + GetDateTimeFromString(itemNode.SelectSingleNode("datetime").InnerText).ToString(),
|
||||||
|
Url = ""
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Error: " + ex.Message);
|
||||||
|
Console.WriteLine("Error: " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DateTime GetDateTimeFromString(string dateString)
|
||||||
|
{
|
||||||
|
DateTime parsedDateTime;
|
||||||
|
|
||||||
|
if (DateTime.TryParseExact(dateString, "yyyy-MM-dd HH:mm:ss", null, System.Globalization.DateTimeStyles.None, out parsedDateTime))
|
||||||
|
{
|
||||||
|
return parsedDateTime;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parsedDateTime = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
return parsedDateTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
using BencodeNET.Parsing;
|
using Force.Crc32;
|
||||||
using BencodeNET.Torrents;
|
using SsdeepNET;
|
||||||
using Catswords.DataType.Client.Model;
|
|
||||||
using Force.Crc32;
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
@ -9,49 +7,41 @@ using System.Text;
|
||||||
|
|
||||||
namespace Catswords.DataType.Client.Helper
|
namespace Catswords.DataType.Client.Helper
|
||||||
{
|
{
|
||||||
public class FileCompute
|
public class FileHasher
|
||||||
{
|
{
|
||||||
public static ComputeModel Compute(string filename)
|
private string FilePath;
|
||||||
|
|
||||||
|
public FileHasher(string filePath)
|
||||||
{
|
{
|
||||||
string extension = GetExtension(filename);
|
FilePath = filePath;
|
||||||
return new ComputeModel
|
|
||||||
{
|
|
||||||
Extension = extension,
|
|
||||||
MD5 = GetMD5(filename),
|
|
||||||
SHA1 = GetSHA1(filename),
|
|
||||||
MAGIC = GetMAGIC(filename),
|
|
||||||
CRC32 = GetCRC32(filename),
|
|
||||||
SHA256 = GetSHA256(filename),
|
|
||||||
InfoHash = GetInfoHash(filename, extension)
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetExtension(string filename)
|
public string GetExtension()
|
||||||
{
|
{
|
||||||
|
string extension = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (Path.GetExtension(filename).Length > 0)
|
if (Path.GetExtension(FilePath).Length > 0)
|
||||||
{
|
{
|
||||||
return Path.GetExtension(filename).Substring(1).ToUpper();
|
extension = Path.GetExtension(FilePath).Substring(1).ToLower();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch
|
||||||
{
|
{
|
||||||
return "";
|
// nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetMD5(string filename)
|
public string GetMD5()
|
||||||
{
|
{
|
||||||
string checksum = "";
|
string checksum = string.Empty;
|
||||||
|
|
||||||
using (MD5 hasher = MD5.Create())
|
using (MD5 hasher = MD5.Create())
|
||||||
{
|
{
|
||||||
using (FileStream stream = File.OpenRead(filename))
|
using (FileStream stream = File.OpenRead(FilePath))
|
||||||
{
|
{
|
||||||
byte[] hash = hasher.ComputeHash(stream);
|
byte[] hash = hasher.ComputeHash(stream);
|
||||||
checksum = BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
checksum = BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
||||||
|
@ -61,13 +51,13 @@ namespace Catswords.DataType.Client.Helper
|
||||||
return checksum;
|
return checksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetSHA1(string filename)
|
public string GetSHA1()
|
||||||
{
|
{
|
||||||
string checksum = "";
|
string checksum = string.Empty;
|
||||||
|
|
||||||
using (SHA1 hasher = SHA1.Create())
|
using (SHA1 hasher = SHA1.Create())
|
||||||
{
|
{
|
||||||
using (FileStream stream = File.OpenRead(filename))
|
using (FileStream stream = File.OpenRead(FilePath))
|
||||||
{
|
{
|
||||||
byte[] hash = hasher.ComputeHash(stream);
|
byte[] hash = hasher.ComputeHash(stream);
|
||||||
checksum = BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
checksum = BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
||||||
|
@ -77,11 +67,11 @@ namespace Catswords.DataType.Client.Helper
|
||||||
return checksum;
|
return checksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetCRC32(string filename)
|
public string GetCRC32()
|
||||||
{
|
{
|
||||||
string checksum = "";
|
string checksum = string.Empty;
|
||||||
|
|
||||||
using (FileStream stream = File.OpenRead(filename))
|
using (FileStream stream = File.OpenRead(FilePath))
|
||||||
{
|
{
|
||||||
MemoryStream ms = new MemoryStream();
|
MemoryStream ms = new MemoryStream();
|
||||||
stream.CopyTo(ms);
|
stream.CopyTo(ms);
|
||||||
|
@ -91,13 +81,13 @@ namespace Catswords.DataType.Client.Helper
|
||||||
return checksum;
|
return checksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetSHA256(string filename)
|
public string GetSHA256()
|
||||||
{
|
{
|
||||||
string checksum = "";
|
string checksum = string.Empty;
|
||||||
|
|
||||||
using (SHA256 hasher = SHA256.Create())
|
using (SHA256 hasher = SHA256.Create())
|
||||||
{
|
{
|
||||||
using (FileStream stream = File.OpenRead(filename))
|
using (FileStream stream = File.OpenRead(FilePath))
|
||||||
{
|
{
|
||||||
var hash = hasher.ComputeHash(stream);
|
var hash = hasher.ComputeHash(stream);
|
||||||
checksum = BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
checksum = BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
||||||
|
@ -107,11 +97,11 @@ namespace Catswords.DataType.Client.Helper
|
||||||
return checksum;
|
return checksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] GetFileBytes(string filename, int count = 32)
|
public byte[] GetFileBytes(int count = 32)
|
||||||
{
|
{
|
||||||
byte[] buffer = new byte[count];
|
byte[] buffer = new byte[count];
|
||||||
|
|
||||||
using (var stream = File.OpenRead(filename))
|
using (var stream = File.OpenRead(FilePath))
|
||||||
{
|
{
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
while (offset < count)
|
while (offset < count)
|
||||||
|
@ -120,7 +110,7 @@ namespace Catswords.DataType.Client.Helper
|
||||||
{
|
{
|
||||||
int read = stream.Read(buffer, offset, count - offset);
|
int read = stream.Read(buffer, offset, count - offset);
|
||||||
if (read == 0)
|
if (read == 0)
|
||||||
throw new System.IO.EndOfStreamException();
|
throw new EndOfStreamException();
|
||||||
offset += read;
|
offset += read;
|
||||||
}
|
}
|
||||||
catch (EndOfStreamException)
|
catch (EndOfStreamException)
|
||||||
|
@ -135,28 +125,44 @@ namespace Catswords.DataType.Client.Helper
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetMAGIC(string filename)
|
public string GetMagic()
|
||||||
{
|
{
|
||||||
return FileMagic.Read(filename);
|
return new FileMagicExtractor(FilePath).GetString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetInfoHash(string filename, string extension)
|
public string GetInfoHash()
|
||||||
{
|
{
|
||||||
string checksum = "";
|
string checksum = string.Empty;
|
||||||
|
string extension = GetExtension().ToLower();
|
||||||
|
|
||||||
if (extension == "TORRENT")
|
if (extension == "torrent")
|
||||||
{
|
{
|
||||||
BencodeParser parser = new BencodeParser();
|
var extractor = new InfoHashExtractor(FilePath);
|
||||||
Torrent torrent = parser.Parse<Torrent>(filename);
|
checksum = extractor.GetString();
|
||||||
checksum = BitConverter.ToString(torrent.GetInfoHashBytes()).Replace("-", "").ToLowerInvariant();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return checksum;
|
return checksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetHexView(byte[] Data)
|
public string GetSSDEEP()
|
||||||
{
|
{
|
||||||
string output = "";
|
string checksum = string.Empty;
|
||||||
|
|
||||||
|
using (FileStream stream = File.OpenRead(FilePath))
|
||||||
|
{
|
||||||
|
MemoryStream ms = new MemoryStream();
|
||||||
|
stream.CopyTo(ms);
|
||||||
|
|
||||||
|
FuzzyHash fuzzyHash = new FuzzyHash();
|
||||||
|
checksum = fuzzyHash.ComputeHash(ms.ToArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
return checksum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetHexView(byte[] Data)
|
||||||
|
{
|
||||||
|
string output = string.Empty;
|
||||||
|
|
||||||
StringBuilder strb = new StringBuilder();
|
StringBuilder strb = new StringBuilder();
|
||||||
StringBuilder text = new StringBuilder();
|
StringBuilder text = new StringBuilder();
|
|
@ -3,18 +3,24 @@ using System.IO;
|
||||||
|
|
||||||
namespace Catswords.DataType.Client.Helper
|
namespace Catswords.DataType.Client.Helper
|
||||||
{
|
{
|
||||||
public static class FileMagic
|
public class FileMagicExtractor
|
||||||
{
|
{
|
||||||
public static string Error = string.Empty;
|
private string FilePath;
|
||||||
|
private string Error = null;
|
||||||
|
|
||||||
public static string Read(string filePath)
|
public FileMagicExtractor(string filePath)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetString()
|
||||||
{
|
{
|
||||||
string hexString = "";
|
string hexString = "";
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 파일 열기
|
// 파일 열기
|
||||||
using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
|
using (FileStream fs = new FileStream(FilePath, FileMode.Open, FileAccess.Read))
|
||||||
{
|
{
|
||||||
// 첫 3 바이트 읽기
|
// 첫 3 바이트 읽기
|
||||||
byte[] buffer = new byte[3] { 0x00, 0x00, 0x00 };
|
byte[] buffer = new byte[3] { 0x00, 0x00, 0x00 };
|
||||||
|
@ -32,5 +38,10 @@ namespace Catswords.DataType.Client.Helper
|
||||||
|
|
||||||
return hexString;
|
return hexString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetError()
|
||||||
|
{
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
51
Catswords.DataType.Client/Helper/InfoHashExtractor.cs
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client.Helper
|
||||||
|
{
|
||||||
|
public class InfoHashExtractor
|
||||||
|
{
|
||||||
|
private string FilePath;
|
||||||
|
|
||||||
|
public InfoHashExtractor(string filePath)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetString()
|
||||||
|
{
|
||||||
|
string infoHashString = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 토렌트 파일을 바이트 배열로 읽어옴
|
||||||
|
byte[] torrentData = File.ReadAllBytes(FilePath);
|
||||||
|
|
||||||
|
// 토렌트 파일에서 InfoHash 추출
|
||||||
|
byte[] infoHash = ExtractInfoHash(torrentData);
|
||||||
|
|
||||||
|
// InfoHash를 문자열로 변환하여 출력
|
||||||
|
infoHashString = BitConverter.ToString(infoHash).Replace("-", "").ToLower();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("An error occurred: " + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return infoHashString;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] ExtractInfoHash(byte[] torrentData)
|
||||||
|
{
|
||||||
|
// 토렌트 파일의 구조에 따라 InfoHash 위치 파악
|
||||||
|
int start = Array.IndexOf(torrentData, (byte)'4', 0);
|
||||||
|
int end = Array.IndexOf(torrentData, (byte)'e', start);
|
||||||
|
|
||||||
|
// InfoHash 추출
|
||||||
|
byte[] infoHash = new byte[20];
|
||||||
|
Array.Copy(torrentData, start + 1, infoHash, 0, 20);
|
||||||
|
|
||||||
|
return infoHash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
117
Catswords.DataType.Client/Helper/LinkExtractor.cs
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client.Helper
|
||||||
|
{
|
||||||
|
class LinkExtractor
|
||||||
|
{
|
||||||
|
private string FilePath;
|
||||||
|
|
||||||
|
public LinkExtractor(string filePath)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ProcessFile(string srcfile, List<string> results)
|
||||||
|
{
|
||||||
|
// Read the binary file
|
||||||
|
byte[] data = File.ReadAllBytes(srcfile);
|
||||||
|
|
||||||
|
// Convert binary data to string
|
||||||
|
string binaryString = Encoding.ASCII.GetString(data);
|
||||||
|
|
||||||
|
// Regular expression to match IP address pattern
|
||||||
|
string ipPattern = @"(?<!\d)(?:\d{1,3}\.){3}\d{1,3}(?!\d)";
|
||||||
|
|
||||||
|
// Regular expression to match URL pattern
|
||||||
|
string urlPattern = @"(?:http|https):\/\/[\w\-_]+(?:\.[\w\-_]+)+[\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#]";
|
||||||
|
|
||||||
|
// Match IP addresses
|
||||||
|
MatchCollection ipMatches = Regex.Matches(binaryString, ipPattern);
|
||||||
|
foreach (Match match in ipMatches)
|
||||||
|
{
|
||||||
|
results.Add(match.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Match URLs
|
||||||
|
MatchCollection urlMatches = Regex.Matches(binaryString, urlPattern);
|
||||||
|
foreach (Match match in urlMatches)
|
||||||
|
{
|
||||||
|
results.Add(match.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsZipFile()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (FileStream fs = new FileStream(FilePath, FileMode.Open, FileAccess.Read))
|
||||||
|
{
|
||||||
|
byte[] buffer = new byte[4];
|
||||||
|
int bytesRead = fs.Read(buffer, 0, 4);
|
||||||
|
if (bytesRead >= 4)
|
||||||
|
{
|
||||||
|
string fileSignature = BitConverter.ToString(buffer);
|
||||||
|
return fileSignature == "50-4B-03-04"; // "PK" signature for zip files
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// File is too small to read signature
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"An error occurred: {ex.Message}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> GetStrings()
|
||||||
|
{
|
||||||
|
List<string> results = new List<string>();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Check if the file is a zip file
|
||||||
|
bool isZip = IsZipFile();
|
||||||
|
|
||||||
|
if (isZip)
|
||||||
|
{
|
||||||
|
// Extract files from zip archive
|
||||||
|
string tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
|
||||||
|
Directory.CreateDirectory(tempDir);
|
||||||
|
using (ZipArchive apkArchive = ZipFile.OpenRead(FilePath))
|
||||||
|
{
|
||||||
|
foreach (ZipArchiveEntry entry in apkArchive.Entries)
|
||||||
|
{
|
||||||
|
string extractedFile = Path.Combine(tempDir, Guid.NewGuid().ToString());
|
||||||
|
entry.ExtractToFile(extractedFile);
|
||||||
|
ProcessFile(extractedFile, results);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up temp directory
|
||||||
|
Directory.Delete(tempDir, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Process the file directly
|
||||||
|
ProcessFile(FilePath, results);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"An error occurred: {ex.Message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
101
Catswords.DataType.Client/Helper/OpenXMLExtractor.cs
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
using System;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
|
using Catswords.DataType.Client.Model;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client.Helper
|
||||||
|
{
|
||||||
|
class OpenXMLExtractor
|
||||||
|
{
|
||||||
|
private string FilePath;
|
||||||
|
private string TempDirectory;
|
||||||
|
private string TargetPath;
|
||||||
|
|
||||||
|
public OpenXMLExtractor(string filePath)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Open()
|
||||||
|
{
|
||||||
|
// Create a temporary directory for extraction
|
||||||
|
TempDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
|
||||||
|
Directory.CreateDirectory(TempDirectory);
|
||||||
|
|
||||||
|
using (ZipArchive apkArchive = ZipFile.OpenRead(FilePath))
|
||||||
|
{
|
||||||
|
foreach (ZipArchiveEntry entry in apkArchive.Entries)
|
||||||
|
{
|
||||||
|
if (entry.FullName == "docProps/core.xml")
|
||||||
|
{
|
||||||
|
TargetPath = Path.Combine(TempDirectory, Guid.NewGuid().ToString());
|
||||||
|
entry.ExtractToFile(TargetPath);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
// Delete the temporary directory and its contents
|
||||||
|
Directory.Delete(TempDirectory, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OpenXMLMetadata GetMetadata()
|
||||||
|
{
|
||||||
|
XmlDocument doc = new XmlDocument();
|
||||||
|
doc.Load(TargetPath);
|
||||||
|
return ExtractMetadata(doc);
|
||||||
|
}
|
||||||
|
|
||||||
|
private OpenXMLMetadata ExtractMetadata(XmlDocument doc)
|
||||||
|
{
|
||||||
|
XmlNode _author = doc.SelectSingleNode("//dc:creator", GetNamespaceManager(doc));
|
||||||
|
XmlNode _title = doc.SelectSingleNode("//dc:title", GetNamespaceManager(doc));
|
||||||
|
XmlNode _subject = doc.SelectSingleNode("//dc:subject", GetNamespaceManager(doc));
|
||||||
|
XmlNode _category = doc.SelectSingleNode("//dc:category", GetNamespaceManager(doc));
|
||||||
|
XmlNode _keywords = doc.SelectSingleNode("//dc:keywords", GetNamespaceManager(doc));
|
||||||
|
XmlNode _description = doc.SelectSingleNode("//dc:description", GetNamespaceManager(doc));
|
||||||
|
XmlNode _lastModifiedBy = doc.SelectSingleNode("//cp:lastModifiedBy", GetNamespaceManager(doc));
|
||||||
|
XmlNode _lastPrinted = doc.SelectSingleNode("//cp:lastPrinted", GetNamespaceManager(doc));
|
||||||
|
XmlNode _created = doc.SelectSingleNode("//dcterms:created", GetNamespaceManager(doc));
|
||||||
|
XmlNode _modified = doc.SelectSingleNode("//dcterms:modified", GetNamespaceManager(doc));
|
||||||
|
|
||||||
|
string author = _author != null ? _author.InnerText : "Unknown";
|
||||||
|
string title = _title != null ? _title.InnerText : "Unknown";
|
||||||
|
string subject = _subject != null ? _subject.InnerText : "Unknown";
|
||||||
|
string category = _category != null ? _category.InnerText : "Unknown";
|
||||||
|
string keywords = _keywords != null ? _keywords.InnerText : "Unknown";
|
||||||
|
string description = _description != null ? _description.InnerText : "Unknown";
|
||||||
|
string lastModifiedBy = _lastModifiedBy != null ? _lastModifiedBy.InnerText : "Unknown";
|
||||||
|
DateTime lastPrinted = _lastPrinted != null ? DateTime.Parse(_lastPrinted.InnerText) : DateTime.MinValue;
|
||||||
|
DateTime created = _created != null ? DateTime.Parse(_created.InnerText) : DateTime.MinValue;
|
||||||
|
DateTime modified = _modified != null ? DateTime.Parse(_modified.InnerText) : DateTime.MinValue;
|
||||||
|
|
||||||
|
return new OpenXMLMetadata
|
||||||
|
{
|
||||||
|
Author = author,
|
||||||
|
Title = title,
|
||||||
|
Subject = subject,
|
||||||
|
Category = category,
|
||||||
|
Keyword = keywords,
|
||||||
|
Description = description,
|
||||||
|
CreatedAt = created,
|
||||||
|
UpdatedAt = modified,
|
||||||
|
LastUpdatedBy = lastModifiedBy,
|
||||||
|
LastPrintedAt = lastPrinted
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private XmlNamespaceManager GetNamespaceManager(XmlDocument doc)
|
||||||
|
{
|
||||||
|
XmlNamespaceManager nsManager = new XmlNamespaceManager(doc.NameTable);
|
||||||
|
nsManager.AddNamespace("dc", "http://purl.org/dc/elements/1.1/");
|
||||||
|
nsManager.AddNamespace("dcterms", "http://purl.org/dc/terms/");
|
||||||
|
nsManager.AddNamespace("cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties");
|
||||||
|
return nsManager;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,17 +5,19 @@ using System.Security.Cryptography.X509Certificates;
|
||||||
|
|
||||||
namespace Catswords.DataType.Client.Helper
|
namespace Catswords.DataType.Client.Helper
|
||||||
{
|
{
|
||||||
public static class FileCompany
|
class PeOrganizationExtractor
|
||||||
{
|
{
|
||||||
static public string Read(string filePath)
|
private string FilePath;
|
||||||
|
|
||||||
|
public PeOrganizationExtractor(string filePath)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetString()
|
||||||
{
|
{
|
||||||
// 회사 정보 추출
|
// 회사 정보 추출
|
||||||
string[] companies = new string[] {
|
string[] companies = new string[] { GetCompanyInfo(), GetProductName(), GetCopyrightInfo(), GetOrganization() };
|
||||||
GetCompanyInfo(filePath),
|
|
||||||
GetProductName(filePath),
|
|
||||||
GetCopyrightInfo(filePath),
|
|
||||||
GetOrganization(filePath)
|
|
||||||
};
|
|
||||||
foreach (string company in companies)
|
foreach (string company in companies)
|
||||||
{
|
{
|
||||||
if (company != null && !company.Equals(string.Empty))
|
if (company != null && !company.Equals(string.Empty))
|
||||||
|
@ -27,12 +29,12 @@ namespace Catswords.DataType.Client.Helper
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetOrganization(string filePath)
|
private string GetOrganization()
|
||||||
{
|
{
|
||||||
string organization = string.Empty;
|
string organization = string.Empty;
|
||||||
|
|
||||||
// 서명된 파일인 경우 인증서 정보 추출
|
// 서명된 파일인 경우 인증서 정보 추출
|
||||||
X509Certificate2 certificate = GetCertificateInfo(filePath);
|
X509Certificate2 certificate = GetCertificateInfo();
|
||||||
if (certificate != null)
|
if (certificate != null)
|
||||||
{
|
{
|
||||||
// Subject 필드에서 O (Organization) 값을 찾아 회사 정보 추출
|
// Subject 필드에서 O (Organization) 값을 찾아 회사 정보 추출
|
||||||
|
@ -52,31 +54,31 @@ namespace Catswords.DataType.Client.Helper
|
||||||
return organization;
|
return organization;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetCompanyInfo(string filePath)
|
private string GetCompanyInfo()
|
||||||
{
|
{
|
||||||
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(filePath);
|
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(FilePath);
|
||||||
return versionInfo.CompanyName;
|
return versionInfo.CompanyName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetProductName(string filePath)
|
private string GetProductName()
|
||||||
{
|
{
|
||||||
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(filePath);
|
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(FilePath);
|
||||||
return versionInfo.ProductName;
|
return versionInfo.ProductName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetCopyrightInfo(string filePath)
|
private string GetCopyrightInfo()
|
||||||
{
|
{
|
||||||
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(filePath);
|
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(FilePath);
|
||||||
return versionInfo.LegalCopyright;
|
return versionInfo.LegalCopyright;
|
||||||
}
|
}
|
||||||
|
|
||||||
static X509Certificate2 GetCertificateInfo(string filePath)
|
private X509Certificate2 GetCertificateInfo()
|
||||||
{
|
{
|
||||||
// GetCertificateInfo 구현
|
// GetCertificateInfo 구현
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 파일에 디지털 서명이 있는지 확인
|
// 파일에 디지털 서명이 있는지 확인
|
||||||
Assembly assembly = Assembly.LoadFile(filePath);
|
Assembly assembly = Assembly.LoadFile(FilePath);
|
||||||
X509Certificate2 certificate = new X509Certificate2(assembly.Location);
|
X509Certificate2 certificate = new X509Certificate2(assembly.Location);
|
||||||
|
|
||||||
// 서명이 유효한지 확인 (옵션)
|
// 서명이 유효한지 확인 (옵션)
|
|
@ -12,14 +12,14 @@ namespace Catswords.DataType.Client.Helper
|
||||||
{
|
{
|
||||||
public string ApiBaseUrl;
|
public string ApiBaseUrl;
|
||||||
public string AccessToken;
|
public string AccessToken;
|
||||||
public List<Indicator> Indicators;
|
public List<TimelineMessage> Messages;
|
||||||
public string ResponseText;
|
public string ResponseText;
|
||||||
|
|
||||||
public Timeline(string host, string access_token)
|
public Timeline(string host, string access_token)
|
||||||
{
|
{
|
||||||
ApiBaseUrl = $"https://{host}/api/v1/timelines/tag";
|
ApiBaseUrl = $"https://{host}/api/v1/timelines/tag";
|
||||||
AccessToken = access_token;
|
AccessToken = access_token;
|
||||||
Indicators = new List<Indicator>();
|
Messages = new List<TimelineMessage>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string RemoveHtmlTags(string input)
|
public static string RemoveHtmlTags(string input)
|
||||||
|
@ -33,21 +33,22 @@ namespace Catswords.DataType.Client.Helper
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string FormatDateTime(string dateString)
|
public static DateTime GetDateTimeFromString(string dateString)
|
||||||
{
|
{
|
||||||
string formattedDateTime = "";
|
DateTime localTime;
|
||||||
|
|
||||||
// 날짜와 시간을 파싱
|
// 날짜와 시간을 파싱
|
||||||
if (DateTime.TryParseExact(dateString, "MM/dd/yyyy HH:mm:ss", null, System.Globalization.DateTimeStyles.None, out DateTime parsedDateTime))
|
if (DateTime.TryParseExact(dateString, "MM/dd/yyyy HH:mm:ss", null, System.Globalization.DateTimeStyles.None, out DateTime parsedDateTime))
|
||||||
{
|
{
|
||||||
// UTC에서 로컬 시간으로 변환
|
// UTC에서 로컬 시간으로 변환
|
||||||
DateTime localTime = parsedDateTime.ToLocalTime();
|
localTime = parsedDateTime.ToLocalTime();
|
||||||
|
}
|
||||||
// 현재 스레드의 문화권에 따라 날짜와 시간 출력
|
else
|
||||||
formattedDateTime = localTime.ToString();
|
{
|
||||||
|
localTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
return formattedDateTime;
|
return localTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Fetch(string q)
|
public void Fetch(string q)
|
||||||
|
@ -76,9 +77,9 @@ namespace Catswords.DataType.Client.Helper
|
||||||
string createdAt = status["created_at"].Value<string>();
|
string createdAt = status["created_at"].Value<string>();
|
||||||
string content = status["content"].Value<string>();
|
string content = status["content"].Value<string>();
|
||||||
|
|
||||||
Indicators.Add(new Indicator
|
Messages.Add(new TimelineMessage
|
||||||
{
|
{
|
||||||
CreatedAt = FormatDateTime(createdAt),
|
CreatedAt = GetDateTimeFromString(createdAt),
|
||||||
Content = RemoveHtmlTags(content)
|
Content = RemoveHtmlTags(content)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
674
Catswords.DataType.Client/LICENSE
Normal file
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU 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 General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
@ -1,6 +1,6 @@
|
||||||
namespace Catswords.DataType.Client
|
namespace Catswords.DataType.Client
|
||||||
{
|
{
|
||||||
partial class Form1
|
partial class Main
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 필수 디자이너 변수입니다.
|
/// 필수 디자이너 변수입니다.
|
||||||
|
@ -35,12 +35,13 @@
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.SystemColors.Window;
|
this.BackColor = System.Drawing.SystemColors.Window;
|
||||||
this.ClientSize = new System.Drawing.Size(384, 469);
|
this.ClientSize = new System.Drawing.Size(384, 517);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
|
this.Icon = global::Catswords.DataType.Client.Properties.Resources.icon;
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "Form1";
|
this.Name = "Form1";
|
||||||
this.Text = "Catswords.DataType.Client";
|
this.Text = "Catswords.DataType.Client";
|
||||||
this.Icon = Properties.Resources.icon;
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace Catswords.DataType.Client
|
namespace Catswords.DataType.Client
|
||||||
{
|
{
|
||||||
public partial class Form1 : Form
|
public partial class Main : Form
|
||||||
{
|
{
|
||||||
public Form1()
|
public Main()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
9
Catswords.DataType.Client/Model/AndroidPermission.cs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
namespace Catswords.DataType.Client.Model
|
||||||
|
{
|
||||||
|
public class AndroidPermission: Timestamp
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public int Severity { get; set; }
|
||||||
|
}
|
||||||
|
}
|
9
Catswords.DataType.Client/Model/CfbfPartInfo.cs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
namespace Catswords.DataType.Client.Model
|
||||||
|
{
|
||||||
|
public class CfbfPartInfo: Timestamp
|
||||||
|
{
|
||||||
|
public string URI { get; set; }
|
||||||
|
public string ContentType { get; set; }
|
||||||
|
public string Content { get; set; }
|
||||||
|
}
|
||||||
|
}
|
9
Catswords.DataType.Client/Model/ExifTag.cs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
namespace Catswords.DataType.Client.Model
|
||||||
|
{
|
||||||
|
public class ExifTag: Timestamp
|
||||||
|
{
|
||||||
|
public string Section { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
namespace Catswords.DataType.Client.Model
|
namespace Catswords.DataType.Client.Model
|
||||||
{
|
{
|
||||||
public class ComputeModel
|
class HashInfo: Timestamp
|
||||||
{
|
{
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public string Extension { get; set; }
|
public string Extension { get; set; }
|
||||||
|
@ -10,5 +10,6 @@
|
||||||
public string CRC32 { get; set; }
|
public string CRC32 { get; set; }
|
||||||
public string SHA256 { get; set; }
|
public string SHA256 { get; set; }
|
||||||
public string InfoHash { get; set; }
|
public string InfoHash { get; set; }
|
||||||
|
public string SSDEEP { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
16
Catswords.DataType.Client/Model/OpenXMLMetadata.cs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client.Model
|
||||||
|
{
|
||||||
|
public class OpenXMLMetadata: Timestamp
|
||||||
|
{
|
||||||
|
public string Author { get; set; }
|
||||||
|
public string Title { get; set; }
|
||||||
|
public string Subject { get; set; }
|
||||||
|
public string Category { get; set; }
|
||||||
|
public string Keyword { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public string LastUpdatedBy { get; set; }
|
||||||
|
public DateTime LastPrintedAt { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,10 +1,9 @@
|
||||||
namespace Catswords.DataType.Client.Model
|
namespace Catswords.DataType.Client.Model
|
||||||
{
|
{
|
||||||
public class Indicator
|
public class TimelineMessage: Timestamp
|
||||||
{
|
{
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
public string Content { get; set; }
|
public string Content { get; set; }
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
public string CreatedAt { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
10
Catswords.DataType.Client/Model/Timestamp.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client.Model
|
||||||
|
{
|
||||||
|
public class Timestamp
|
||||||
|
{
|
||||||
|
public DateTime CreatedAt { get; set; }
|
||||||
|
public DateTime UpdatedAt { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,7 +16,7 @@ namespace Catswords.DataType.Client
|
||||||
{
|
{
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.Run(new Form1());
|
Application.Run(new Main());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,12 @@ using System.Runtime.InteropServices;
|
||||||
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
||||||
// 이러한 특성 값을 변경하세요.
|
// 이러한 특성 값을 변경하세요.
|
||||||
[assembly: AssemblyTitle("Catswords.DataType.Client")]
|
[assembly: AssemblyTitle("Catswords.DataType.Client")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("File reputation checker with Social media timeline")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("Catswords Research, Co.")]
|
||||||
[assembly: AssemblyProduct("Catswords.DataType.Client")]
|
[assembly: AssemblyProduct("Catswords.DataType.Client")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
[assembly: AssemblyCopyright("Namhyeon Go, Opensource licensed under GPL 3.0")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("Catswords")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||||
|
|
|
@ -60,6 +60,16 @@ namespace Catswords.DataType.Client.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap _2333410_android_os_smartphone_85588 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("_2333410_android_os_smartphone_85588", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -100,6 +110,16 @@ namespace Catswords.DataType.Client.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap link_symbol_icon_icons_com_56927 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("link_symbol_icon_icons_com_56927", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -109,5 +129,25 @@ namespace Catswords.DataType.Client.Properties {
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap office_18907 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("office_18907", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap tags_icon_icons_com_73382 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("tags_icon_icons_com_73382", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,19 @@
|
||||||
<data name="image1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="image1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\image1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\image1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="link_symbol_icon_icons_com_56927" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\link-symbol_icon-icons.com_56927.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="message_bubble_conversation_speech_communication_talk_chat_icon_219299" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="message_bubble_conversation_speech_communication_talk_chat_icon_219299" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\message_bubble_conversation_speech_communication_talk_chat_icon_219299.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\message_bubble_conversation_speech_communication_talk_chat_icon_219299.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="office_18907" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\office_18907.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="tags_icon_icons_com_73382" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\tags_icon-icons.com_73382.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="_2333410_android_os_smartphone_85588" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\2333410-android-os-smartphone_85588.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 13 KiB |
BIN
Catswords.DataType.Client/Resources/office_18907.png
Normal file
After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 10 KiB |
12
Catswords.DataType.Client/UserControl1.Designer.cs
generated
|
@ -46,7 +46,7 @@
|
||||||
this.listView1.HideSelection = false;
|
this.listView1.HideSelection = false;
|
||||||
this.listView1.Location = new System.Drawing.Point(18, 125);
|
this.listView1.Location = new System.Drawing.Point(18, 125);
|
||||||
this.listView1.Name = "listView1";
|
this.listView1.Name = "listView1";
|
||||||
this.listView1.Size = new System.Drawing.Size(347, 277);
|
this.listView1.Size = new System.Drawing.Size(347, 339);
|
||||||
this.listView1.TabIndex = 8;
|
this.listView1.TabIndex = 8;
|
||||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||||
this.listView1.View = System.Windows.Forms.View.Details;
|
this.listView1.View = System.Windows.Forms.View.Details;
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
//
|
//
|
||||||
// columnHeader2
|
// columnHeader2
|
||||||
//
|
//
|
||||||
this.columnHeader2.Text = "Opinion";
|
this.columnHeader2.Text = "Description";
|
||||||
this.columnHeader2.Width = 200;
|
this.columnHeader2.Width = 200;
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
//
|
//
|
||||||
this.textBox1.BackColor = System.Drawing.Color.White;
|
this.textBox1.BackColor = System.Drawing.Color.White;
|
||||||
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
this.textBox1.Location = new System.Drawing.Point(16, 445);
|
this.textBox1.Location = new System.Drawing.Point(16, 496);
|
||||||
this.textBox1.Name = "textBox1";
|
this.textBox1.Name = "textBox1";
|
||||||
this.textBox1.ReadOnly = true;
|
this.textBox1.ReadOnly = true;
|
||||||
this.textBox1.Size = new System.Drawing.Size(349, 13);
|
this.textBox1.Size = new System.Drawing.Size(349, 13);
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
// linkLabel1
|
// linkLabel1
|
||||||
//
|
//
|
||||||
this.linkLabel1.AutoSize = true;
|
this.linkLabel1.AutoSize = true;
|
||||||
this.linkLabel1.Location = new System.Drawing.Point(15, 416);
|
this.linkLabel1.Location = new System.Drawing.Point(13, 475);
|
||||||
this.linkLabel1.Name = "linkLabel1";
|
this.linkLabel1.Name = "linkLabel1";
|
||||||
this.linkLabel1.Size = new System.Drawing.Size(122, 13);
|
this.linkLabel1.Size = new System.Drawing.Size(122, 13);
|
||||||
this.linkLabel1.TabIndex = 9;
|
this.linkLabel1.TabIndex = 9;
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
//
|
//
|
||||||
// button1
|
// button1
|
||||||
//
|
//
|
||||||
this.button1.Location = new System.Drawing.Point(280, 411);
|
this.button1.Location = new System.Drawing.Point(280, 470);
|
||||||
this.button1.Name = "button1";
|
this.button1.Name = "button1";
|
||||||
this.button1.Size = new System.Drawing.Size(85, 23);
|
this.button1.Size = new System.Drawing.Size(85, 23);
|
||||||
this.button1.TabIndex = 12;
|
this.button1.TabIndex = 12;
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
this.Controls.Add(this.label2);
|
this.Controls.Add(this.label2);
|
||||||
this.Controls.Add(this.linkLabel1);
|
this.Controls.Add(this.linkLabel1);
|
||||||
this.Name = "UserControl1";
|
this.Name = "UserControl1";
|
||||||
this.Size = new System.Drawing.Size(433, 457);
|
this.Size = new System.Drawing.Size(388, 517);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
using Catswords.DataType.Client.Model;
|
using Catswords.DataType.Client.Helper;
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.Design;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Catswords.DataType.Client
|
namespace Catswords.DataType.Client
|
||||||
|
@ -12,30 +9,30 @@ namespace Catswords.DataType.Client
|
||||||
public partial class UserControl1 : UserControl
|
public partial class UserControl1 : UserControl
|
||||||
{
|
{
|
||||||
private ImageList imageList = new ImageList();
|
private ImageList imageList = new ImageList();
|
||||||
private Form parent;
|
|
||||||
|
|
||||||
public string filePath;
|
public string FilePath;
|
||||||
public string fileMagic;
|
public string FileMagic;
|
||||||
public string fileName;
|
public string FileName;
|
||||||
public string fileExtension;
|
public string FileExtension;
|
||||||
|
|
||||||
public UserControl1(Form parent)
|
public UserControl1(Form parent)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
// set parent form
|
|
||||||
this.parent = parent;
|
|
||||||
|
|
||||||
// Set image size
|
// Set image size
|
||||||
imageList.Images.Add(Properties.Resources.data_database_icon_177024);
|
imageList.Images.Add(Properties.Resources.data_database_icon_177024);
|
||||||
imageList.Images.Add(Properties.Resources.message_bubble_conversation_speech_communication_talk_chat_icon_219299);
|
imageList.Images.Add(Properties.Resources.message_bubble_conversation_speech_communication_talk_chat_icon_219299);
|
||||||
|
imageList.Images.Add(Properties.Resources._2333410_android_os_smartphone_85588);
|
||||||
|
imageList.Images.Add(Properties.Resources.office_18907);
|
||||||
|
imageList.Images.Add(Properties.Resources.link_symbol_icon_icons_com_56927);
|
||||||
|
imageList.Images.Add(Properties.Resources.tags_icon_icons_com_73382);
|
||||||
|
|
||||||
// set image list
|
// set image list
|
||||||
listView1.SmallImageList = imageList;
|
listView1.SmallImageList = imageList;
|
||||||
|
|
||||||
// Store the file path.
|
// Store the file path.
|
||||||
filePath = OpenFileDialog();
|
FilePath = OpenFileDialog();
|
||||||
if (string.IsNullOrEmpty(filePath))
|
if (string.IsNullOrEmpty(FilePath))
|
||||||
{
|
{
|
||||||
MessageBox.Show("Failed to get a file name", "Catswords.DataType.Client");
|
MessageBox.Show("Failed to get a file name", "Catswords.DataType.Client");
|
||||||
parent.Close();
|
parent.Close();
|
||||||
|
@ -43,104 +40,34 @@ namespace Catswords.DataType.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get first 4 bytes from the file.
|
// Get first 4 bytes from the file.
|
||||||
fileMagic = Helper.FileMagic.Read(filePath);
|
var extractor = new FileMagicExtractor(FilePath);
|
||||||
|
FileMagic = extractor.GetString();
|
||||||
|
|
||||||
// Show file magic to the label
|
// Show file magic to the label
|
||||||
label1.Text = "#0x" + fileMagic;
|
label1.Text = "#0x" + FileMagic;
|
||||||
if (Helper.FileMagic.Error != string.Empty)
|
if (extractor.GetError() != null)
|
||||||
{
|
{
|
||||||
textBox1.Text = Helper.FileMagic.Error;
|
ShowStatus(extractor.GetError());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get file name and file extension
|
// Get file name and file extension
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
fileExtension = Path.GetExtension(filePath);
|
FileExtension = Path.GetExtension(FilePath);
|
||||||
fileName = Path.GetFileName(filePath);
|
FileName = Path.GetFileName(FilePath);
|
||||||
if (fileExtension.Length > 0 && fileExtension.Substring(0, 1) == ".")
|
if (FileExtension.Length > 0 && FileExtension.Substring(0, 1) == ".")
|
||||||
{
|
{
|
||||||
fileExtension = fileExtension.Substring(1);
|
FileExtension = FileExtension.Substring(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
fileExtension = "";
|
FileExtension = "";
|
||||||
fileName = "";
|
FileName = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get data from file extension database
|
// Run the worker
|
||||||
FetchFromFileExtensionDB();
|
(new Worker1(this)).Run();
|
||||||
|
|
||||||
// Get data from timeline
|
|
||||||
FetchFromTimeline();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FetchFromFileExtensionDB()
|
|
||||||
{
|
|
||||||
var search = new Helper.FileExtensionDB();
|
|
||||||
search.Fetch(fileExtension);
|
|
||||||
foreach (Indicator ind in search.Indicators)
|
|
||||||
{
|
|
||||||
listView1.Items.Add(new ListViewItem(new string[] { ind.CreatedAt, ind.Content }, 0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FetchFromTimeline()
|
|
||||||
{
|
|
||||||
// Request a timeline
|
|
||||||
var search = new Helper.Timeline(Config.MASTODON_HOST, Config.MASTODON_ACCESS_TOKEN);
|
|
||||||
|
|
||||||
// fetch data by file magic
|
|
||||||
search.Fetch("0x" + fileMagic);
|
|
||||||
|
|
||||||
// if PE format (ImpHash)
|
|
||||||
if (fileMagic.StartsWith("4d5a"))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string imphash = Helper.ImpHash.Calculate(filePath);
|
|
||||||
search.Fetch(imphash);
|
|
||||||
|
|
||||||
string companyInfo = Helper.FileCompany.Read(filePath);
|
|
||||||
search.Fetch(companyInfo);
|
|
||||||
|
|
||||||
textBox1.Text = "ImpHash=" + imphash + "; CompanyInfo=" + companyInfo;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
textBox1.Text = ex.Message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// fetch data by file extension
|
|
||||||
if (fileExtension.Length > 0)
|
|
||||||
{
|
|
||||||
search.Fetch(fileExtension);
|
|
||||||
|
|
||||||
// if Office365 format
|
|
||||||
if (fileExtension.StartsWith("xls") || fileExtension.StartsWith("ppt") || fileExtension.StartsWith("doc"))
|
|
||||||
{
|
|
||||||
search.Fetch("office365");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if it contains ransomware keywords
|
|
||||||
if (fileName.ToLower().Contains("readme") || fileName.ToLower().Contains("decrypt"))
|
|
||||||
{
|
|
||||||
search.Fetch("ransomware");
|
|
||||||
}
|
|
||||||
|
|
||||||
// if IoC (Indicators of Compomise) mode
|
|
||||||
if (fileMagic == "58354f") // EICAR test file header
|
|
||||||
{
|
|
||||||
search.Fetch("ioc");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show the timeline
|
|
||||||
foreach (Indicator ind in search.Indicators)
|
|
||||||
{
|
|
||||||
listView1.Items.Add(new ListViewItem(new string[] { ind.CreatedAt, ind.Content }, 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string OpenFileDialog()
|
public string OpenFileDialog()
|
||||||
|
@ -159,6 +86,36 @@ namespace Catswords.DataType.Client
|
||||||
return filePath;
|
return filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddIndicator(DateTime dt, string Description, int ImageIndex)
|
||||||
|
{
|
||||||
|
if (listView1.InvokeRequired) {
|
||||||
|
listView1.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
listView1.Items.Add(new ListViewItem(new string[] { dt.ToString(), Description }, ImageIndex));
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
listView1.Items.Add(new ListViewItem(new string[] { dt.ToString(), Description }, ImageIndex));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowStatus(string status)
|
||||||
|
{
|
||||||
|
if (textBox1.InvokeRequired)
|
||||||
|
{
|
||||||
|
textBox1.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
textBox1.Text = status;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
textBox1.Text = status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
{
|
{
|
||||||
Process.Start("https://catswords.social/auth/sign_up");
|
Process.Start("https://catswords.social/auth/sign_up");
|
||||||
|
@ -166,8 +123,19 @@ namespace Catswords.DataType.Client
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Form newForm = new Form2(this);
|
Form form = new Form
|
||||||
newForm.Show();
|
{
|
||||||
|
Text = "Expert",
|
||||||
|
FormBorderStyle = FormBorderStyle.FixedSingle,
|
||||||
|
Icon = Properties.Resources.icon,
|
||||||
|
MaximizeBox = false,
|
||||||
|
MinimizeBox = false,
|
||||||
|
Width = 450,
|
||||||
|
Height = 560,
|
||||||
|
BackColor = System.Drawing.SystemColors.Window
|
||||||
|
};
|
||||||
|
form.Controls.Add(new UserControl2(this));
|
||||||
|
form.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace Catswords.DataType.Client
|
namespace Catswords.DataType.Client
|
||||||
{
|
{
|
||||||
partial class Form2
|
partial class UserControl2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
|
@ -48,6 +48,8 @@
|
||||||
this.labelTools = new System.Windows.Forms.Label();
|
this.labelTools = new System.Windows.Forms.Label();
|
||||||
this.button1 = new System.Windows.Forms.Button();
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
this.button2 = new System.Windows.Forms.Button();
|
this.button2 = new System.Windows.Forms.Button();
|
||||||
|
this.txtSsdeep = new System.Windows.Forms.TextBox();
|
||||||
|
this.labelSsdeep = new System.Windows.Forms.Label();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// labelTitle
|
// labelTitle
|
||||||
|
@ -63,7 +65,7 @@
|
||||||
//
|
//
|
||||||
// txtLocale
|
// txtLocale
|
||||||
//
|
//
|
||||||
this.txtLocale.Location = new System.Drawing.Point(129, 379);
|
this.txtLocale.Location = new System.Drawing.Point(129, 415);
|
||||||
this.txtLocale.Name = "txtLocale";
|
this.txtLocale.Name = "txtLocale";
|
||||||
this.txtLocale.Size = new System.Drawing.Size(284, 20);
|
this.txtLocale.Size = new System.Drawing.Size(284, 20);
|
||||||
this.txtLocale.TabIndex = 1;
|
this.txtLocale.TabIndex = 1;
|
||||||
|
@ -74,6 +76,7 @@
|
||||||
this.txtExtension.Name = "txtExtension";
|
this.txtExtension.Name = "txtExtension";
|
||||||
this.txtExtension.Size = new System.Drawing.Size(284, 20);
|
this.txtExtension.Size = new System.Drawing.Size(284, 20);
|
||||||
this.txtExtension.TabIndex = 1;
|
this.txtExtension.TabIndex = 1;
|
||||||
|
this.txtExtension.Text = "Calculating...";
|
||||||
//
|
//
|
||||||
// txtHashSha256
|
// txtHashSha256
|
||||||
//
|
//
|
||||||
|
@ -81,6 +84,7 @@
|
||||||
this.txtHashSha256.Name = "txtHashSha256";
|
this.txtHashSha256.Name = "txtHashSha256";
|
||||||
this.txtHashSha256.Size = new System.Drawing.Size(284, 20);
|
this.txtHashSha256.Size = new System.Drawing.Size(284, 20);
|
||||||
this.txtHashSha256.TabIndex = 1;
|
this.txtHashSha256.TabIndex = 1;
|
||||||
|
this.txtHashSha256.Text = "Calculating...";
|
||||||
//
|
//
|
||||||
// txtMagic
|
// txtMagic
|
||||||
//
|
//
|
||||||
|
@ -88,6 +92,7 @@
|
||||||
this.txtMagic.Name = "txtMagic";
|
this.txtMagic.Name = "txtMagic";
|
||||||
this.txtMagic.Size = new System.Drawing.Size(284, 20);
|
this.txtMagic.Size = new System.Drawing.Size(284, 20);
|
||||||
this.txtMagic.TabIndex = 1;
|
this.txtMagic.TabIndex = 1;
|
||||||
|
this.txtMagic.Text = "Calculating...";
|
||||||
//
|
//
|
||||||
// txtHashCrc32
|
// txtHashCrc32
|
||||||
//
|
//
|
||||||
|
@ -95,6 +100,7 @@
|
||||||
this.txtHashCrc32.Name = "txtHashCrc32";
|
this.txtHashCrc32.Name = "txtHashCrc32";
|
||||||
this.txtHashCrc32.Size = new System.Drawing.Size(284, 20);
|
this.txtHashCrc32.Size = new System.Drawing.Size(284, 20);
|
||||||
this.txtHashCrc32.TabIndex = 1;
|
this.txtHashCrc32.TabIndex = 1;
|
||||||
|
this.txtHashCrc32.Text = "Calculating...";
|
||||||
//
|
//
|
||||||
// txtHashSha1
|
// txtHashSha1
|
||||||
//
|
//
|
||||||
|
@ -102,6 +108,7 @@
|
||||||
this.txtHashSha1.Name = "txtHashSha1";
|
this.txtHashSha1.Name = "txtHashSha1";
|
||||||
this.txtHashSha1.Size = new System.Drawing.Size(284, 20);
|
this.txtHashSha1.Size = new System.Drawing.Size(284, 20);
|
||||||
this.txtHashSha1.TabIndex = 1;
|
this.txtHashSha1.TabIndex = 1;
|
||||||
|
this.txtHashSha1.Text = "Calculating...";
|
||||||
//
|
//
|
||||||
// txtHashMd5
|
// txtHashMd5
|
||||||
//
|
//
|
||||||
|
@ -109,11 +116,12 @@
|
||||||
this.txtHashMd5.Name = "txtHashMd5";
|
this.txtHashMd5.Name = "txtHashMd5";
|
||||||
this.txtHashMd5.Size = new System.Drawing.Size(284, 20);
|
this.txtHashMd5.Size = new System.Drawing.Size(284, 20);
|
||||||
this.txtHashMd5.TabIndex = 1;
|
this.txtHashMd5.TabIndex = 1;
|
||||||
|
this.txtHashMd5.Text = "Calculating...";
|
||||||
//
|
//
|
||||||
// labelLocale
|
// labelLocale
|
||||||
//
|
//
|
||||||
this.labelLocale.AutoSize = true;
|
this.labelLocale.AutoSize = true;
|
||||||
this.labelLocale.Location = new System.Drawing.Point(30, 383);
|
this.labelLocale.Location = new System.Drawing.Point(30, 419);
|
||||||
this.labelLocale.Name = "labelLocale";
|
this.labelLocale.Name = "labelLocale";
|
||||||
this.labelLocale.Size = new System.Drawing.Size(39, 13);
|
this.labelLocale.Size = new System.Drawing.Size(39, 13);
|
||||||
this.labelLocale.TabIndex = 0;
|
this.labelLocale.TabIndex = 0;
|
||||||
|
@ -188,12 +196,13 @@
|
||||||
this.txtInfoHash.Name = "txtInfoHash";
|
this.txtInfoHash.Name = "txtInfoHash";
|
||||||
this.txtInfoHash.Size = new System.Drawing.Size(284, 20);
|
this.txtInfoHash.Size = new System.Drawing.Size(284, 20);
|
||||||
this.txtInfoHash.TabIndex = 1;
|
this.txtInfoHash.TabIndex = 1;
|
||||||
|
this.txtInfoHash.Text = "Calculating...";
|
||||||
//
|
//
|
||||||
// labelTools
|
// labelTools
|
||||||
//
|
//
|
||||||
this.labelTools.AutoSize = true;
|
this.labelTools.AutoSize = true;
|
||||||
this.labelTools.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.labelTools.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.labelTools.Location = new System.Drawing.Point(31, 418);
|
this.labelTools.Location = new System.Drawing.Point(31, 452);
|
||||||
this.labelTools.Name = "labelTools";
|
this.labelTools.Name = "labelTools";
|
||||||
this.labelTools.Size = new System.Drawing.Size(34, 15);
|
this.labelTools.Size = new System.Drawing.Size(34, 15);
|
||||||
this.labelTools.TabIndex = 6;
|
this.labelTools.TabIndex = 6;
|
||||||
|
@ -202,7 +211,7 @@
|
||||||
// button1
|
// button1
|
||||||
//
|
//
|
||||||
this.button1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.button1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.button1.Location = new System.Drawing.Point(129, 418);
|
this.button1.Location = new System.Drawing.Point(129, 452);
|
||||||
this.button1.Name = "button1";
|
this.button1.Name = "button1";
|
||||||
this.button1.Size = new System.Drawing.Size(284, 23);
|
this.button1.Size = new System.Drawing.Size(284, 23);
|
||||||
this.button1.TabIndex = 3;
|
this.button1.TabIndex = 3;
|
||||||
|
@ -213,7 +222,7 @@
|
||||||
// button2
|
// button2
|
||||||
//
|
//
|
||||||
this.button2.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.button2.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.button2.Location = new System.Drawing.Point(129, 447);
|
this.button2.Location = new System.Drawing.Point(129, 481);
|
||||||
this.button2.Name = "button2";
|
this.button2.Name = "button2";
|
||||||
this.button2.Size = new System.Drawing.Size(284, 23);
|
this.button2.Size = new System.Drawing.Size(284, 23);
|
||||||
this.button2.TabIndex = 7;
|
this.button2.TabIndex = 7;
|
||||||
|
@ -221,6 +230,23 @@
|
||||||
this.button2.UseVisualStyleBackColor = true;
|
this.button2.UseVisualStyleBackColor = true;
|
||||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||||
//
|
//
|
||||||
|
// txtSsdeep
|
||||||
|
//
|
||||||
|
this.txtSsdeep.Location = new System.Drawing.Point(129, 378);
|
||||||
|
this.txtSsdeep.Name = "txtSsdeep";
|
||||||
|
this.txtSsdeep.Size = new System.Drawing.Size(284, 20);
|
||||||
|
this.txtSsdeep.TabIndex = 9;
|
||||||
|
this.txtSsdeep.Text = "Calculating...";
|
||||||
|
//
|
||||||
|
// labelSsdeep
|
||||||
|
//
|
||||||
|
this.labelSsdeep.AutoSize = true;
|
||||||
|
this.labelSsdeep.Location = new System.Drawing.Point(30, 383);
|
||||||
|
this.labelSsdeep.Name = "labelSsdeep";
|
||||||
|
this.labelSsdeep.Size = new System.Drawing.Size(50, 13);
|
||||||
|
this.labelSsdeep.TabIndex = 8;
|
||||||
|
this.labelSsdeep.Text = "SSDEEP";
|
||||||
|
//
|
||||||
// Form2
|
// Form2
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
@ -228,7 +254,9 @@
|
||||||
this.BackColor = System.Drawing.SystemColors.Window;
|
this.BackColor = System.Drawing.SystemColors.Window;
|
||||||
this.BackgroundImage = global::Catswords.DataType.Client.Properties.Resources.document_paperclip_list_paper_icon_219544;
|
this.BackgroundImage = global::Catswords.DataType.Client.Properties.Resources.document_paperclip_list_paper_icon_219544;
|
||||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||||
this.ClientSize = new System.Drawing.Size(441, 488);
|
this.ClientSize = new System.Drawing.Size(441, 526);
|
||||||
|
this.Controls.Add(this.txtSsdeep);
|
||||||
|
this.Controls.Add(this.labelSsdeep);
|
||||||
this.Controls.Add(this.button2);
|
this.Controls.Add(this.button2);
|
||||||
this.Controls.Add(this.labelTools);
|
this.Controls.Add(this.labelTools);
|
||||||
this.Controls.Add(this.button1);
|
this.Controls.Add(this.button1);
|
||||||
|
@ -249,14 +277,8 @@
|
||||||
this.Controls.Add(this.labelInfoHash);
|
this.Controls.Add(this.labelInfoHash);
|
||||||
this.Controls.Add(this.labelLocale);
|
this.Controls.Add(this.labelLocale);
|
||||||
this.Controls.Add(this.labelExtension);
|
this.Controls.Add(this.labelExtension);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
|
||||||
this.Icon = global::Catswords.DataType.Client.Properties.Resources.icon;
|
|
||||||
this.KeyPreview = true;
|
|
||||||
this.MaximizeBox = false;
|
|
||||||
this.MinimizeBox = false;
|
|
||||||
this.Name = "Form2";
|
this.Name = "Form2";
|
||||||
this.Text = "Expert";
|
this.Text = "Expert";
|
||||||
this.TopMost = true;
|
|
||||||
this.Load += new System.EventHandler(this.Form2_Load);
|
this.Load += new System.EventHandler(this.Form2_Load);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
@ -285,5 +307,7 @@
|
||||||
private System.Windows.Forms.Label labelTools;
|
private System.Windows.Forms.Label labelTools;
|
||||||
private System.Windows.Forms.Button button1;
|
private System.Windows.Forms.Button button1;
|
||||||
private System.Windows.Forms.Button button2;
|
private System.Windows.Forms.Button button2;
|
||||||
|
private System.Windows.Forms.TextBox txtSsdeep;
|
||||||
|
private System.Windows.Forms.Label labelSsdeep;
|
||||||
}
|
}
|
||||||
}
|
}
|
102
Catswords.DataType.Client/UserControl2.cs
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
using Catswords.DataType.Client.Helper;
|
||||||
|
using Catswords.DataType.Client.Model;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.Design;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client
|
||||||
|
{
|
||||||
|
public partial class UserControl2 : UserControl
|
||||||
|
{
|
||||||
|
private UserControl1 Parent;
|
||||||
|
private HashInfo CalculatedHashInfo = new HashInfo();
|
||||||
|
|
||||||
|
public UserControl2(UserControl1 parent)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Parent = parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Form2_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
new Task(() =>
|
||||||
|
{
|
||||||
|
var hasher = new FileHasher(Parent.FilePath);
|
||||||
|
|
||||||
|
txtExtension.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
txtExtension.Text = hasher.GetExtension();
|
||||||
|
CalculatedHashInfo.Extension = txtExtension.Text;
|
||||||
|
}));
|
||||||
|
|
||||||
|
txtMagic.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
txtMagic.Text = hasher.GetMagic();
|
||||||
|
CalculatedHashInfo.Extension = txtMagic.Text;
|
||||||
|
}));
|
||||||
|
|
||||||
|
txtHashMd5.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
txtHashMd5.Text = hasher.GetMD5();
|
||||||
|
CalculatedHashInfo.MD5 = txtHashMd5.Text;
|
||||||
|
}));
|
||||||
|
|
||||||
|
txtHashSha1.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
txtHashSha1.Text = hasher.GetSHA1();
|
||||||
|
CalculatedHashInfo.SHA1 = txtHashSha1.Text;
|
||||||
|
}));
|
||||||
|
|
||||||
|
txtHashCrc32.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
txtHashCrc32.Text = hasher.GetCRC32();
|
||||||
|
CalculatedHashInfo.CRC32 = txtHashCrc32.Text;
|
||||||
|
}));
|
||||||
|
|
||||||
|
txtHashSha256.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
txtHashSha256.Text = hasher.GetSHA256();
|
||||||
|
CalculatedHashInfo.SHA256 = txtHashSha256.Text;
|
||||||
|
}));
|
||||||
|
|
||||||
|
txtInfoHash.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
txtInfoHash.Text = hasher.GetInfoHash();
|
||||||
|
CalculatedHashInfo.InfoHash = txtInfoHash.Text;
|
||||||
|
}));
|
||||||
|
|
||||||
|
txtSsdeep.Invoke(new MethodInvoker(delegate
|
||||||
|
{
|
||||||
|
txtSsdeep.Text = hasher.GetSSDEEP();
|
||||||
|
CalculatedHashInfo.SSDEEP = txtSsdeep.Text;
|
||||||
|
}));
|
||||||
|
|
||||||
|
CalculatedHashInfo.CreatedAt = DateTime.Now;
|
||||||
|
CalculatedHashInfo.UpdatedAt = CalculatedHashInfo.CreatedAt;
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ByteViewer bv = new ByteViewer();
|
||||||
|
bv.SetFile(Parent.FilePath); // or SetBytes
|
||||||
|
|
||||||
|
Form newForm = new Form();
|
||||||
|
newForm.Size = new System.Drawing.Size(650, 600);
|
||||||
|
newForm.Text = "ByteViewer";
|
||||||
|
newForm.Icon = Properties.Resources.icon;
|
||||||
|
newForm.MinimizeBox = false;
|
||||||
|
newForm.MaximizeBox = false;
|
||||||
|
newForm.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||||
|
newForm.Controls.Add(bv);
|
||||||
|
newForm.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Process.Start("https://www.virustotal.com/gui/file/" + CalculatedHashInfo.SHA256);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
167
Catswords.DataType.Client/Worker1.cs
Normal file
|
@ -0,0 +1,167 @@
|
||||||
|
using Catswords.DataType.Client.Helper;
|
||||||
|
using Catswords.DataType.Client.Model;
|
||||||
|
using MetadataExtractor;
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Catswords.DataType.Client
|
||||||
|
{
|
||||||
|
public class Worker1
|
||||||
|
{
|
||||||
|
private UserControl1 Parent;
|
||||||
|
|
||||||
|
public Worker1(UserControl1 parent)
|
||||||
|
{
|
||||||
|
Parent = parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FromFileExtension()
|
||||||
|
{
|
||||||
|
var search = new FileExtensionDatabase();
|
||||||
|
search.Fetch(Parent.FileExtension);
|
||||||
|
foreach (TimelineMessage ind in search.Indicators)
|
||||||
|
{
|
||||||
|
Parent.AddIndicator(ind.CreatedAt, ind.Content, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FromTimeline()
|
||||||
|
{
|
||||||
|
// Request a timeline
|
||||||
|
var search = new Timeline(Config.MASTODON_HOST, Config.MASTODON_ACCESS_TOKEN);
|
||||||
|
|
||||||
|
// fetch data by file magic
|
||||||
|
search.Fetch("0x" + Parent.FileMagic);
|
||||||
|
|
||||||
|
// if PE format (ImpHash)
|
||||||
|
if (Parent.FileMagic.StartsWith("4d5a"))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string imphash = ImpHash.Calculate(Parent.FilePath);
|
||||||
|
search.Fetch(imphash);
|
||||||
|
|
||||||
|
string organization = (new PeOrganizationExtractor(Parent.FilePath)).GetString();
|
||||||
|
search.Fetch(organization);
|
||||||
|
Parent.AddIndicator(DateTime.Now, "This file are distributed by " + organization, 4);
|
||||||
|
Parent.ShowStatus("ImpHash=" + imphash + "; Organization=" + organization);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Parent.ShowStatus(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// fetch data by file extension
|
||||||
|
if (Parent.FileExtension.Length > 0)
|
||||||
|
{
|
||||||
|
search.Fetch(Parent.FileExtension);
|
||||||
|
|
||||||
|
// if Office365 format
|
||||||
|
if (Parent.FileExtension.StartsWith("xls") || Parent.FileExtension.StartsWith("ppt") || Parent.FileExtension.StartsWith("doc"))
|
||||||
|
{
|
||||||
|
if (Parent.FileExtension == "xlsx" || Parent.FileExtension == "pptx" || Parent.FileExtension == "docx")
|
||||||
|
{
|
||||||
|
FromOpenXML();
|
||||||
|
}
|
||||||
|
|
||||||
|
search.Fetch("msoffice");
|
||||||
|
search.Fetch("office365");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if it contains ransomware keywords
|
||||||
|
if (Parent.FileName.ToLower().Contains("readme") || Parent.FileName.ToLower().Contains("decrypt"))
|
||||||
|
{
|
||||||
|
search.Fetch("ransomware");
|
||||||
|
}
|
||||||
|
|
||||||
|
// if IoC (Indicators of Compomise) mode
|
||||||
|
if (Parent.FileMagic == "58354f") // EICAR test file header
|
||||||
|
{
|
||||||
|
search.Fetch("malware");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show the timeline
|
||||||
|
foreach (TimelineMessage ind in search.Messages)
|
||||||
|
{
|
||||||
|
Parent.AddIndicator(ind.CreatedAt, ind.Content, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FromAndroidManifest()
|
||||||
|
{
|
||||||
|
if (Parent.FileExtension == "apk")
|
||||||
|
{
|
||||||
|
var extractor = new ApkManifestExtractor(Parent.FilePath);
|
||||||
|
extractor.Open();
|
||||||
|
foreach (AndroidPermission perm in extractor.GetPermissions())
|
||||||
|
{
|
||||||
|
Parent.AddIndicator(perm.CreatedAt, perm.Name + ' ' + perm.Description, 2);
|
||||||
|
}
|
||||||
|
extractor.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FromOpenXML()
|
||||||
|
{
|
||||||
|
var extractor = new OpenXMLExtractor(Parent.FilePath);
|
||||||
|
extractor.Open();
|
||||||
|
|
||||||
|
var metadata = extractor.GetMetadata();
|
||||||
|
Parent.AddIndicator(DateTime.Now, "Author: " + metadata.Author, 3);
|
||||||
|
Parent.AddIndicator(DateTime.Now, "Title: " + metadata.Title, 3);
|
||||||
|
Parent.AddIndicator(DateTime.Now, "Subject: " + metadata.Subject, 3);
|
||||||
|
Parent.AddIndicator(DateTime.Now, "Category: " + metadata.Category, 3);
|
||||||
|
Parent.AddIndicator(DateTime.Now, "Description: " + metadata.Description, 3);
|
||||||
|
Parent.AddIndicator(DateTime.Now, "Created: " + metadata.CreatedAt.ToString(), 3);
|
||||||
|
Parent.AddIndicator(DateTime.Now, "Last updated: " + metadata.UpdatedAt.ToString(), 3);
|
||||||
|
Parent.AddIndicator(DateTime.Now, "Last updated by: " + metadata.LastUpdatedBy, 3);
|
||||||
|
Parent.AddIndicator(DateTime.Now, "Last printed: " + metadata.LastPrintedAt, 3);
|
||||||
|
extractor.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FromLinks()
|
||||||
|
{
|
||||||
|
var extractor = new LinkExtractor(Parent.FilePath);
|
||||||
|
var strings = extractor.GetStrings();
|
||||||
|
foreach (string str in strings)
|
||||||
|
{
|
||||||
|
Parent.AddIndicator(DateTime.Now, str, 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FromExif()
|
||||||
|
{
|
||||||
|
var extractor = new ExifTagExtractor(Parent.FilePath);
|
||||||
|
var tags = extractor.GetTags();
|
||||||
|
foreach (ExifTag tag in tags)
|
||||||
|
{
|
||||||
|
Parent.AddIndicator(DateTime.Now, $"{tag.Name} ({tag.Section}): {tag.Description}", 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FormCfbf()
|
||||||
|
{
|
||||||
|
var extractor = new CfbfExtractor(Parent.FilePath);
|
||||||
|
var parts = extractor.GetParts();
|
||||||
|
foreach (CfbfPartInfo part in parts)
|
||||||
|
{
|
||||||
|
Parent.AddIndicator(DateTime.Now, $"CFBF: {part.Content} ({part.ContentType}, {part.URI})", 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Run()
|
||||||
|
{
|
||||||
|
new Task(() =>
|
||||||
|
{
|
||||||
|
FromFileExtension(); // Get data from file extension database
|
||||||
|
FromAndroidManifest(); // Get data from Android manifest
|
||||||
|
FromTimeline(); // Get data from timeline
|
||||||
|
FromLinks(); // Get links from file
|
||||||
|
FromExif(); // Get EXIF tags from file
|
||||||
|
FormCfbf(); // Get CFBF (aka. OLE) parts from file
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,12 +1,15 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="BencodeNET" version="4.0.0" targetFramework="net48" />
|
|
||||||
<package id="Crc32.NET" version="1.2.0" targetFramework="net48" />
|
<package id="Crc32.NET" version="1.2.0" targetFramework="net48" />
|
||||||
|
<package id="MetadataExtractor" version="2.8.1" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
||||||
<package id="System.IO.Pipelines" version="4.6.0" targetFramework="net48" />
|
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net48" />
|
||||||
<package id="System.Memory" version="4.5.3" targetFramework="net48" />
|
<package id="System.IO.Packaging" version="8.0.0" targetFramework="net48" />
|
||||||
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net48" />
|
<package id="System.IO.Pipelines" version="8.0.0" targetFramework="net48" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net48" />
|
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net48" />
|
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
|
||||||
|
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
|
||||||
|
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
|
||||||
|
<package id="XmpCore" version="6.1.10.1" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
BIN
Catswords.DataType.Client/socialonthefile.snk
Normal file
|
@ -10,8 +10,9 @@ Social on the file - File reputation checker with Social media timeline
|
||||||
* Torrent InfoHash support
|
* Torrent InfoHash support
|
||||||
|
|
||||||
## Related projects
|
## Related projects
|
||||||
* [github.com/Mastodon/Mastodon](https://github.com/Mastodon/Mastodon)
|
* [Catswords FileType Directory](https://exts.kr)
|
||||||
* [github.com/gnh1201/CatswordsTab](https://github.com/gnh1201/CatswordsTab)
|
* [github.com/gnh1201/CatswordsTab](https://github.com/gnh1201/CatswordsTab)
|
||||||
|
* [github.com/Mastodon/Mastodon](https://github.com/Mastodon/Mastodon)
|
||||||
|
|
||||||
## Contact me
|
## Contact me
|
||||||
- abuse@catswords.net
|
- abuse@catswords.net
|
||||||
|
|
|
@ -5,6 +5,10 @@ VisualStudioVersion = 17.8.34322.80
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Catswords.DataType.Client", "Catswords.DataType.Client\Catswords.DataType.Client.csproj", "{72A9E640-F785-4202-9CEA-BEC46A9B09B8}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Catswords.DataType.Client", "Catswords.DataType.Client\Catswords.DataType.Client.csproj", "{72A9E640-F785-4202-9CEA-BEC46A9B09B8}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SsdeepNET", "..\..\..\OneDrive\문서\GitHub\SsdeepNET\Source\SsdeepNET\SsdeepNET.csproj", "{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AndroidXml", "..\..\..\OneDrive\문서\GitHub\androidxmldotnet\AndroidXml\AndroidXml.csproj", "{607EEB2C-6B7C-409E-959E-3B458A109426}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -27,6 +31,30 @@ Global
|
||||||
{72A9E640-F785-4202-9CEA-BEC46A9B09B8}.Release|x64.Build.0 = Release|Any CPU
|
{72A9E640-F785-4202-9CEA-BEC46A9B09B8}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{72A9E640-F785-4202-9CEA-BEC46A9B09B8}.Release|x86.ActiveCfg = Release|Any CPU
|
{72A9E640-F785-4202-9CEA-BEC46A9B09B8}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{72A9E640-F785-4202-9CEA-BEC46A9B09B8}.Release|x86.Build.0 = Release|Any CPU
|
{72A9E640-F785-4202-9CEA-BEC46A9B09B8}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{B1244C5A-CDEB-4D1D-8807-BF40251ABCAB}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{607EEB2C-6B7C-409E-959E-3B458A109426}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
1
SsdeepNET
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d784d516ee0a39be5deca0cd56fd2ebc7bca5aec
|
1
androidxmldotnet
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 58401c6c90a41c43fdcc610259e13ffcf520fe69
|