Remove SharpShell and update standalone version
|
@ -3,4 +3,12 @@
|
|||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -33,11 +33,37 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<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">
|
||||
<HintPath>..\packages\Crc32.NET.1.2.0\lib\net20\Crc32.NET.dll</HintPath>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.IO.Pipelines, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.4.6.0\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
@ -49,16 +75,26 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Config.cs" />
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Form2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form2.Designer.cs">
|
||||
<DependentUpon>Form2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helper\FileCompute.cs" />
|
||||
<Compile Include="Helper\FileExtensionDB.cs" />
|
||||
<Compile Include="Helper\FileCompany.cs" />
|
||||
<Compile Include="Helper\FileMagic.cs" />
|
||||
<Compile Include="Helper\ImpHash.cs" />
|
||||
<Compile Include="Helper\Timeline.cs" />
|
||||
<Compile Include="Model\ComputeModel.cs" />
|
||||
<Compile Include="Model\Indicator.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
@ -71,6 +107,9 @@
|
|||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form2.resx">
|
||||
<DependentUpon>Form2.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
|
@ -101,5 +140,44 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\image1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\icon.ico" />
|
||||
</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>
|
||||
<None Include="Resources\message_bubble_conversation_speech_communication_talk_chat_icon_219299.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\data_96285.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\data_database_icon_177024.png" />
|
||||
</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>
|
||||
<None Include="Resources\document_paperclip_list_paper_icon_219544.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
9
Catswords.DataType.Client/Config.cs
Normal file
|
@ -0,0 +1,9 @@
|
|||
namespace Catswords.DataType.Client
|
||||
{
|
||||
public class Config
|
||||
{
|
||||
public static string SEARCH_URL = "http://utilhome.cafe24.com/extlist.xml?q=";
|
||||
public static string MASTODON_HOST = "catswords.social";
|
||||
public static string MASTODON_ACCESS_TOKEN = "HDVTEfLswvSJZq5MRpim2tp7DifTcgKbMl0mBM5-uHw";
|
||||
}
|
||||
}
|
1
Catswords.DataType.Client/Form1.Designer.cs
generated
|
@ -40,6 +40,7 @@
|
|||
this.MinimizeBox = false;
|
||||
this.Name = "Form1";
|
||||
this.Text = "Catswords.DataType.Client";
|
||||
this.Icon = Properties.Resources.icon;
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
289
Catswords.DataType.Client/Form2.Designer.cs
generated
Normal file
|
@ -0,0 +1,289 @@
|
|||
namespace Catswords.DataType.Client
|
||||
{
|
||||
partial class Form2
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.labelTitle = new System.Windows.Forms.Label();
|
||||
this.txtLocale = new System.Windows.Forms.TextBox();
|
||||
this.txtExtension = new System.Windows.Forms.TextBox();
|
||||
this.txtHashSha256 = new System.Windows.Forms.TextBox();
|
||||
this.txtMagic = new System.Windows.Forms.TextBox();
|
||||
this.txtHashCrc32 = new System.Windows.Forms.TextBox();
|
||||
this.txtHashSha1 = new System.Windows.Forms.TextBox();
|
||||
this.txtHashMd5 = new System.Windows.Forms.TextBox();
|
||||
this.labelLocale = new System.Windows.Forms.Label();
|
||||
this.labelExtension = new System.Windows.Forms.Label();
|
||||
this.labelSha256 = new System.Windows.Forms.Label();
|
||||
this.labelHead32 = new System.Windows.Forms.Label();
|
||||
this.labelCrc32 = new System.Windows.Forms.Label();
|
||||
this.labelSha1 = new System.Windows.Forms.Label();
|
||||
this.labelMd5 = new System.Windows.Forms.Label();
|
||||
this.labelInfoHash = new System.Windows.Forms.Label();
|
||||
this.txtInfoHash = new System.Windows.Forms.TextBox();
|
||||
this.labelTools = new System.Windows.Forms.Label();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelTitle
|
||||
//
|
||||
this.labelTitle.AutoSize = true;
|
||||
this.labelTitle.BackColor = System.Drawing.Color.Transparent;
|
||||
this.labelTitle.Font = new System.Drawing.Font("Arial", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelTitle.Location = new System.Drawing.Point(136, 65);
|
||||
this.labelTitle.Name = "labelTitle";
|
||||
this.labelTitle.Size = new System.Drawing.Size(105, 34);
|
||||
this.labelTitle.TabIndex = 0;
|
||||
this.labelTitle.Text = "Expert";
|
||||
//
|
||||
// txtLocale
|
||||
//
|
||||
this.txtLocale.Location = new System.Drawing.Point(129, 379);
|
||||
this.txtLocale.Name = "txtLocale";
|
||||
this.txtLocale.Size = new System.Drawing.Size(284, 20);
|
||||
this.txtLocale.TabIndex = 1;
|
||||
//
|
||||
// txtExtension
|
||||
//
|
||||
this.txtExtension.Location = new System.Drawing.Point(129, 308);
|
||||
this.txtExtension.Name = "txtExtension";
|
||||
this.txtExtension.Size = new System.Drawing.Size(284, 20);
|
||||
this.txtExtension.TabIndex = 1;
|
||||
//
|
||||
// txtHashSha256
|
||||
//
|
||||
this.txtHashSha256.Location = new System.Drawing.Point(129, 272);
|
||||
this.txtHashSha256.Name = "txtHashSha256";
|
||||
this.txtHashSha256.Size = new System.Drawing.Size(284, 20);
|
||||
this.txtHashSha256.TabIndex = 1;
|
||||
//
|
||||
// txtMagic
|
||||
//
|
||||
this.txtMagic.Location = new System.Drawing.Point(129, 236);
|
||||
this.txtMagic.Name = "txtMagic";
|
||||
this.txtMagic.Size = new System.Drawing.Size(284, 20);
|
||||
this.txtMagic.TabIndex = 1;
|
||||
//
|
||||
// txtHashCrc32
|
||||
//
|
||||
this.txtHashCrc32.Location = new System.Drawing.Point(129, 200);
|
||||
this.txtHashCrc32.Name = "txtHashCrc32";
|
||||
this.txtHashCrc32.Size = new System.Drawing.Size(284, 20);
|
||||
this.txtHashCrc32.TabIndex = 1;
|
||||
//
|
||||
// txtHashSha1
|
||||
//
|
||||
this.txtHashSha1.Location = new System.Drawing.Point(129, 166);
|
||||
this.txtHashSha1.Name = "txtHashSha1";
|
||||
this.txtHashSha1.Size = new System.Drawing.Size(284, 20);
|
||||
this.txtHashSha1.TabIndex = 1;
|
||||
//
|
||||
// txtHashMd5
|
||||
//
|
||||
this.txtHashMd5.Location = new System.Drawing.Point(129, 132);
|
||||
this.txtHashMd5.Name = "txtHashMd5";
|
||||
this.txtHashMd5.Size = new System.Drawing.Size(284, 20);
|
||||
this.txtHashMd5.TabIndex = 1;
|
||||
//
|
||||
// labelLocale
|
||||
//
|
||||
this.labelLocale.AutoSize = true;
|
||||
this.labelLocale.Location = new System.Drawing.Point(30, 383);
|
||||
this.labelLocale.Name = "labelLocale";
|
||||
this.labelLocale.Size = new System.Drawing.Size(39, 13);
|
||||
this.labelLocale.TabIndex = 0;
|
||||
this.labelLocale.Text = "Locale";
|
||||
//
|
||||
// labelExtension
|
||||
//
|
||||
this.labelExtension.AutoSize = true;
|
||||
this.labelExtension.Location = new System.Drawing.Point(30, 311);
|
||||
this.labelExtension.Name = "labelExtension";
|
||||
this.labelExtension.Size = new System.Drawing.Size(53, 13);
|
||||
this.labelExtension.TabIndex = 0;
|
||||
this.labelExtension.Text = "Extension";
|
||||
//
|
||||
// labelSha256
|
||||
//
|
||||
this.labelSha256.AutoSize = true;
|
||||
this.labelSha256.Location = new System.Drawing.Point(30, 275);
|
||||
this.labelSha256.Name = "labelSha256";
|
||||
this.labelSha256.Size = new System.Drawing.Size(47, 13);
|
||||
this.labelSha256.TabIndex = 0;
|
||||
this.labelSha256.Text = "SHA256";
|
||||
//
|
||||
// labelHead32
|
||||
//
|
||||
this.labelHead32.AutoSize = true;
|
||||
this.labelHead32.Location = new System.Drawing.Point(30, 239);
|
||||
this.labelHead32.Name = "labelHead32";
|
||||
this.labelHead32.Size = new System.Drawing.Size(36, 13);
|
||||
this.labelHead32.TabIndex = 0;
|
||||
this.labelHead32.Text = "Magic";
|
||||
//
|
||||
// labelCrc32
|
||||
//
|
||||
this.labelCrc32.AutoSize = true;
|
||||
this.labelCrc32.Location = new System.Drawing.Point(30, 204);
|
||||
this.labelCrc32.Name = "labelCrc32";
|
||||
this.labelCrc32.Size = new System.Drawing.Size(41, 13);
|
||||
this.labelCrc32.TabIndex = 0;
|
||||
this.labelCrc32.Text = "CRC32";
|
||||
//
|
||||
// labelSha1
|
||||
//
|
||||
this.labelSha1.AutoSize = true;
|
||||
this.labelSha1.Location = new System.Drawing.Point(30, 169);
|
||||
this.labelSha1.Name = "labelSha1";
|
||||
this.labelSha1.Size = new System.Drawing.Size(35, 13);
|
||||
this.labelSha1.TabIndex = 0;
|
||||
this.labelSha1.Text = "SHA1";
|
||||
//
|
||||
// labelMd5
|
||||
//
|
||||
this.labelMd5.AutoSize = true;
|
||||
this.labelMd5.Location = new System.Drawing.Point(30, 135);
|
||||
this.labelMd5.Name = "labelMd5";
|
||||
this.labelMd5.Size = new System.Drawing.Size(30, 13);
|
||||
this.labelMd5.TabIndex = 0;
|
||||
this.labelMd5.Text = "MD5";
|
||||
//
|
||||
// labelInfoHash
|
||||
//
|
||||
this.labelInfoHash.AutoSize = true;
|
||||
this.labelInfoHash.Location = new System.Drawing.Point(30, 348);
|
||||
this.labelInfoHash.Name = "labelInfoHash";
|
||||
this.labelInfoHash.Size = new System.Drawing.Size(50, 13);
|
||||
this.labelInfoHash.TabIndex = 0;
|
||||
this.labelInfoHash.Text = "InfoHash";
|
||||
//
|
||||
// txtInfoHash
|
||||
//
|
||||
this.txtInfoHash.Location = new System.Drawing.Point(129, 343);
|
||||
this.txtInfoHash.Name = "txtInfoHash";
|
||||
this.txtInfoHash.Size = new System.Drawing.Size(284, 20);
|
||||
this.txtInfoHash.TabIndex = 1;
|
||||
//
|
||||
// labelTools
|
||||
//
|
||||
this.labelTools.AutoSize = true;
|
||||
this.labelTools.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
this.labelTools.Location = new System.Drawing.Point(31, 418);
|
||||
this.labelTools.Name = "labelTools";
|
||||
this.labelTools.Size = new System.Drawing.Size(34, 15);
|
||||
this.labelTools.TabIndex = 6;
|
||||
this.labelTools.Text = "Tools";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
this.button1.Location = new System.Drawing.Point(129, 418);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(284, 23);
|
||||
this.button1.TabIndex = 3;
|
||||
this.button1.Text = "View on ByteViewer...";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
this.button2.Location = new System.Drawing.Point(129, 447);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(284, 23);
|
||||
this.button2.TabIndex = 7;
|
||||
this.button2.Text = "View on VirusTotal...";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// Form2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.BackgroundImage = global::Catswords.DataType.Client.Properties.Resources.document_paperclip_list_paper_icon_219544;
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.ClientSize = new System.Drawing.Size(441, 488);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.labelTools);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.txtInfoHash);
|
||||
this.Controls.Add(this.txtLocale);
|
||||
this.Controls.Add(this.txtExtension);
|
||||
this.Controls.Add(this.labelTitle);
|
||||
this.Controls.Add(this.txtHashSha256);
|
||||
this.Controls.Add(this.labelMd5);
|
||||
this.Controls.Add(this.txtMagic);
|
||||
this.Controls.Add(this.labelSha1);
|
||||
this.Controls.Add(this.txtHashCrc32);
|
||||
this.Controls.Add(this.labelCrc32);
|
||||
this.Controls.Add(this.txtHashSha1);
|
||||
this.Controls.Add(this.labelHead32);
|
||||
this.Controls.Add(this.txtHashMd5);
|
||||
this.Controls.Add(this.labelSha256);
|
||||
this.Controls.Add(this.labelInfoHash);
|
||||
this.Controls.Add(this.labelLocale);
|
||||
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.Text = "Expert";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.Form2_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label labelTitle;
|
||||
private System.Windows.Forms.TextBox txtLocale;
|
||||
private System.Windows.Forms.TextBox txtExtension;
|
||||
private System.Windows.Forms.TextBox txtHashSha256;
|
||||
private System.Windows.Forms.TextBox txtMagic;
|
||||
private System.Windows.Forms.TextBox txtHashCrc32;
|
||||
private System.Windows.Forms.TextBox txtHashSha1;
|
||||
private System.Windows.Forms.TextBox txtHashMd5;
|
||||
private System.Windows.Forms.Label labelLocale;
|
||||
private System.Windows.Forms.Label labelExtension;
|
||||
private System.Windows.Forms.Label labelSha256;
|
||||
private System.Windows.Forms.Label labelHead32;
|
||||
private System.Windows.Forms.Label labelCrc32;
|
||||
private System.Windows.Forms.Label labelSha1;
|
||||
private System.Windows.Forms.Label labelMd5;
|
||||
private System.Windows.Forms.Label labelInfoHash;
|
||||
private System.Windows.Forms.TextBox txtInfoHash;
|
||||
private System.Windows.Forms.Label labelTools;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
}
|
||||
}
|
54
Catswords.DataType.Client/Form2.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
188
Catswords.DataType.Client/Helper/FileCompute.cs
Normal file
|
@ -0,0 +1,188 @@
|
|||
using BencodeNET.Parsing;
|
||||
using BencodeNET.Torrents;
|
||||
using Catswords.DataType.Client.Model;
|
||||
using Force.Crc32;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Catswords.DataType.Client.Helper
|
||||
{
|
||||
public class FileCompute
|
||||
{
|
||||
public static ComputeModel Compute(string filename)
|
||||
{
|
||||
string extension = GetExtension(filename);
|
||||
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)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Path.GetExtension(filename).Length > 0)
|
||||
{
|
||||
return Path.GetExtension(filename).Substring(1).ToUpper();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetMD5(string filename)
|
||||
{
|
||||
string checksum = "";
|
||||
|
||||
using (MD5 hasher = MD5.Create())
|
||||
{
|
||||
using (FileStream stream = File.OpenRead(filename))
|
||||
{
|
||||
byte[] hash = hasher.ComputeHash(stream);
|
||||
checksum = BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
||||
}
|
||||
}
|
||||
|
||||
return checksum;
|
||||
}
|
||||
|
||||
private static string GetSHA1(string filename)
|
||||
{
|
||||
string checksum = "";
|
||||
|
||||
using (SHA1 hasher = SHA1.Create())
|
||||
{
|
||||
using (FileStream stream = File.OpenRead(filename))
|
||||
{
|
||||
byte[] hash = hasher.ComputeHash(stream);
|
||||
checksum = BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
||||
}
|
||||
}
|
||||
|
||||
return checksum;
|
||||
}
|
||||
|
||||
private static string GetCRC32(string filename)
|
||||
{
|
||||
string checksum = "";
|
||||
|
||||
using (FileStream stream = File.OpenRead(filename))
|
||||
{
|
||||
MemoryStream ms = new MemoryStream();
|
||||
stream.CopyTo(ms);
|
||||
checksum = string.Format("{0:x}", Crc32Algorithm.Compute(ms.ToArray()));
|
||||
}
|
||||
|
||||
return checksum;
|
||||
}
|
||||
|
||||
private static string GetSHA256(string filename)
|
||||
{
|
||||
string checksum = "";
|
||||
|
||||
using (SHA256 hasher = SHA256.Create())
|
||||
{
|
||||
using (FileStream stream = File.OpenRead(filename))
|
||||
{
|
||||
var hash = hasher.ComputeHash(stream);
|
||||
checksum = BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
||||
}
|
||||
}
|
||||
|
||||
return checksum;
|
||||
}
|
||||
|
||||
public static byte[] GetFileBytes(string filename, int count = 32)
|
||||
{
|
||||
byte[] buffer = new byte[count];
|
||||
|
||||
using (var stream = File.OpenRead(filename))
|
||||
{
|
||||
int offset = 0;
|
||||
while (offset < count)
|
||||
{
|
||||
try
|
||||
{
|
||||
int read = stream.Read(buffer, offset, count - offset);
|
||||
if (read == 0)
|
||||
throw new System.IO.EndOfStreamException();
|
||||
offset += read;
|
||||
}
|
||||
catch (EndOfStreamException)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
System.Diagnostics.Debug.Assert(offset == count);
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
private static string GetMAGIC(string filename)
|
||||
{
|
||||
return FileMagic.Read(filename);
|
||||
}
|
||||
|
||||
private static string GetInfoHash(string filename, string extension)
|
||||
{
|
||||
string checksum = "";
|
||||
|
||||
if (extension == "TORRENT")
|
||||
{
|
||||
BencodeParser parser = new BencodeParser();
|
||||
Torrent torrent = parser.Parse<Torrent>(filename);
|
||||
checksum = BitConverter.ToString(torrent.GetInfoHashBytes()).Replace("-", "").ToLowerInvariant();
|
||||
}
|
||||
|
||||
return checksum;
|
||||
}
|
||||
|
||||
public static string GetHexView(byte[] Data)
|
||||
{
|
||||
string output = "";
|
||||
|
||||
StringBuilder strb = new StringBuilder();
|
||||
StringBuilder text = new StringBuilder();
|
||||
char[] ch = new char[1];
|
||||
for (int x = 0; x < Data.Length; x += 16)
|
||||
{
|
||||
text.Length = 0;
|
||||
strb.Length = 0;
|
||||
for (int y = 0; y < 16; ++y)
|
||||
{
|
||||
if ((x + y) > (Data.Length - 1))
|
||||
break;
|
||||
ch[0] = (char)Data[x + y];
|
||||
strb.AppendFormat("{0,0:X2} ", (int)ch[0]);
|
||||
if (((int)ch[0] < 32) || ((int)ch[0] > 127))
|
||||
ch[0] = '.';
|
||||
text.Append(ch);
|
||||
}
|
||||
text.Append("\r\n");
|
||||
while (strb.Length < 52)
|
||||
strb.Append(" ");
|
||||
strb.Append(text.ToString());
|
||||
output += strb.ToString();
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
69
Catswords.DataType.Client/Helper/FileExtensionDB.cs
Normal file
|
@ -0,0 +1,69 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
14
Catswords.DataType.Client/Model/ComputeModel.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
namespace Catswords.DataType.Client.Model
|
||||
{
|
||||
public class ComputeModel
|
||||
{
|
||||
public string Path { get; set; }
|
||||
public string Extension { get; set; }
|
||||
public string MD5 { get; set; }
|
||||
public string SHA1 { get; set; }
|
||||
public string MAGIC { get; set; }
|
||||
public string CRC32 { get; set; }
|
||||
public string SHA256 { get; set; }
|
||||
public string InfoHash { get; set; }
|
||||
}
|
||||
}
|
|
@ -60,6 +60,36 @@ namespace Catswords.DataType.Client.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap data_database_icon_177024 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("data_database_icon_177024", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap document_paperclip_list_paper_icon_219544 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("document_paperclip_list_paper_icon_219544", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// (아이콘)과(와) 유사한 System.Drawing.Icon 형식의 지역화된 리소스를 찾습니다.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Icon icon {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icon", resourceCulture);
|
||||
return ((System.Drawing.Icon)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||
/// </summary>
|
||||
|
@ -69,5 +99,15 @@ namespace Catswords.DataType.Client.Properties {
|
|||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap message_bubble_conversation_speech_communication_talk_chat_icon_219299 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("message_bubble_conversation_speech_communication_talk_chat_icon_219299", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,19 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="data_database_icon_177024" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\data_database_icon_177024.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="document_paperclip_list_paper_icon_219544" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\document_paperclip_list_paper_icon_219544.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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>
|
||||
</data>
|
||||
<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>
|
||||
</data>
|
||||
</root>
|
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 5.7 KiB |
BIN
Catswords.DataType.Client/Resources/data_96285.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 8.2 KiB |
BIN
Catswords.DataType.Client/Resources/fediverse.1024x1020.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
Catswords.DataType.Client/Resources/fediverse.256x255.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
Catswords.DataType.Client/Resources/icon.ico
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
Catswords.DataType.Client/Resources/icon_32.ico
Normal file
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 7.0 KiB |
BIN
Catswords.DataType.Client/Resources/officedatabase_103574.png
Normal file
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.2 KiB |
13
Catswords.DataType.Client/UserControl1.Designer.cs
generated
|
@ -35,6 +35,7 @@
|
|||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listView1
|
||||
|
@ -101,6 +102,16 @@
|
|||
this.linkLabel1.Text = "Write a review to this file";
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(280, 411);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(85, 23);
|
||||
this.button1.TabIndex = 12;
|
||||
this.button1.Text = "Expert...";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// UserControl1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -108,6 +119,7 @@
|
|||
this.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.BackgroundImage = global::Catswords.DataType.Client.Properties.Resources.image1;
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.listView1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
|
@ -129,5 +141,6 @@
|
|||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using Catswords.DataType.Client.Model;
|
||||
using System;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
@ -9,15 +11,28 @@ namespace Catswords.DataType.Client
|
|||
{
|
||||
public partial class UserControl1 : UserControl
|
||||
{
|
||||
private string filePath;
|
||||
private string fileMagic;
|
||||
private string fileName;
|
||||
private string fileExtension;
|
||||
private ImageList imageList = new ImageList();
|
||||
private Form parent;
|
||||
|
||||
public string filePath;
|
||||
public string fileMagic;
|
||||
public string fileName;
|
||||
public string fileExtension;
|
||||
|
||||
public UserControl1(Form parent)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// set parent form
|
||||
this.parent = parent;
|
||||
|
||||
// Set image size
|
||||
imageList.Images.Add(Properties.Resources.data_database_icon_177024);
|
||||
imageList.Images.Add(Properties.Resources.message_bubble_conversation_speech_communication_talk_chat_icon_219299);
|
||||
|
||||
// set image list
|
||||
listView1.SmallImageList = imageList;
|
||||
|
||||
// Store the file path.
|
||||
filePath = OpenFileDialog();
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
|
@ -53,8 +68,27 @@ namespace Catswords.DataType.Client
|
|||
fileName = "";
|
||||
}
|
||||
|
||||
// Get data from file extension database
|
||||
FetchFromFileExtensionDB();
|
||||
|
||||
// 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("catswords.social", "HDVTEfLswvSJZq5MRpim2tp7DifTcgKbMl0mBM5-uHw");
|
||||
var search = new Helper.Timeline(Config.MASTODON_HOST, Config.MASTODON_ACCESS_TOKEN);
|
||||
|
||||
// fetch data by file magic
|
||||
search.Fetch("0x" + fileMagic);
|
||||
|
@ -105,7 +139,7 @@ namespace Catswords.DataType.Client
|
|||
// Show the timeline
|
||||
foreach (Indicator ind in search.Indicators)
|
||||
{
|
||||
listView1.Items.Add(new ListViewItem(new string[] { ind.CreatedAt, ind.Content }));
|
||||
listView1.Items.Add(new ListViewItem(new string[] { ind.CreatedAt, ind.Content }, 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,5 +163,11 @@ namespace Catswords.DataType.Client
|
|||
{
|
||||
Process.Start("https://catswords.social/auth/sign_up");
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Form newForm = new Form2(this);
|
||||
newForm.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BencodeNET" version="4.0.0" targetFramework="net48" />
|
||||
<package id="Crc32.NET" version="1.2.0" 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.IO.Pipelines" version="4.6.0" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.5.3" targetFramework="net48" />
|
||||
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net48" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net48" />
|
||||
</packages>
|
|
@ -1,5 +1,5 @@
|
|||
# SocialOnTheFile
|
||||
Social on the file - Mastodon integration to Windows File Property Sheet
|
||||
Social on the file - File reputation checker with Social media timeline
|
||||
|
||||
## Screenshot
|
||||
![Screenshot](screenshot.png)
|
||||
|
@ -10,7 +10,6 @@ Social on the file - Mastodon integration to Windows File Property Sheet
|
|||
|
||||
## Related projects
|
||||
* [github.com/Mastodon/Mastodon](https://github.com/Mastodon/Mastodon)
|
||||
* [github.com/dwmkerr/sharpshell](https://github.com/dwmkerr/sharpshell)
|
||||
* [github.com/gnh1201/CatswordsTab](https://github.com/gnh1201/CatswordsTab)
|
||||
|
||||
## Contact me
|
||||
|
|
|
@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34322.80
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SocialOnTheFile", "SocialOnTheFile\SocialOnTheFile.csproj", "{35CC3E28-05C8-478B-B5A2-15FCE468CE34}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Catswords.DataType.Client", "Catswords.DataType.Client\Catswords.DataType.Client.csproj", "{72A9E640-F785-4202-9CEA-BEC46A9B09B8}"
|
||||
EndProject
|
||||
Global
|
||||
|
@ -17,18 +15,6 @@ Global
|
|||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Debug|x64.Build.0 = Debug|x64
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Debug|x86.Build.0 = Debug|x86
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Release|x64.ActiveCfg = Release|x64
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Release|x64.Build.0 = Release|x64
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Release|x86.ActiveCfg = Release|x86
|
||||
{35CC3E28-05C8-478B-B5A2-15FCE468CE34}.Release|x86.Build.0 = Release|x86
|
||||
{72A9E640-F785-4202-9CEA-BEC46A9B09B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{72A9E640-F785-4202-9CEA-BEC46A9B09B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{72A9E640-F785-4202-9CEA-BEC46A9B09B8}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
|
|
@ -1,101 +0,0 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace SocialOnTheFile.Helper
|
||||
{
|
||||
public static class FileCompany
|
||||
{
|
||||
static public string Read(string filePath)
|
||||
{
|
||||
// 회사 정보 추출
|
||||
string[] companies = new string[] {
|
||||
GetCompanyInfo(filePath),
|
||||
GetProductName(filePath),
|
||||
GetCopyrightInfo(filePath),
|
||||
GetOrganization(filePath)
|
||||
};
|
||||
foreach (string company in companies)
|
||||
{
|
||||
if (company != null && !company.Equals(string.Empty))
|
||||
{
|
||||
return company;
|
||||
}
|
||||
}
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
public static string GetOrganization(string filePath)
|
||||
{
|
||||
string organization = string.Empty;
|
||||
|
||||
// 서명된 파일인 경우 인증서 정보 추출
|
||||
X509Certificate2 certificate = GetCertificateInfo(filePath);
|
||||
if (certificate != null)
|
||||
{
|
||||
// Subject 필드에서 O (Organization) 값을 찾아 회사 정보 추출
|
||||
string[] fields = certificate.Subject.Split(',');
|
||||
|
||||
foreach (string field in fields)
|
||||
{
|
||||
string[] keyValue = field.Trim().Split('=');
|
||||
|
||||
if (keyValue.Length == 2 && keyValue[0].Trim().Equals("O", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
organization = keyValue[1].Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return organization;
|
||||
}
|
||||
|
||||
public static string GetCompanyInfo(string filePath)
|
||||
{
|
||||
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(filePath);
|
||||
return versionInfo.CompanyName;
|
||||
}
|
||||
|
||||
public static string GetProductName(string filePath)
|
||||
{
|
||||
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(filePath);
|
||||
return versionInfo.ProductName;
|
||||
}
|
||||
|
||||
public static string GetCopyrightInfo(string filePath)
|
||||
{
|
||||
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(filePath);
|
||||
return versionInfo.LegalCopyright;
|
||||
}
|
||||
|
||||
static X509Certificate2 GetCertificateInfo(string filePath)
|
||||
{
|
||||
// GetCertificateInfo 구현
|
||||
try
|
||||
{
|
||||
// 파일에 디지털 서명이 있는지 확인
|
||||
Assembly assembly = Assembly.LoadFile(filePath);
|
||||
X509Certificate2 certificate = new X509Certificate2(assembly.Location);
|
||||
|
||||
// 서명이 유효한지 확인 (옵션)
|
||||
X509Chain chain = new X509Chain();
|
||||
chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; // 여러 인증서를 사용하는 경우 인증서 연쇄를 무시할 수 있습니다.
|
||||
|
||||
if (chain.Build(certificate))
|
||||
{
|
||||
return certificate;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace SocialOnTheFile.Helper
|
||||
{
|
||||
public static class FileMagic
|
||||
{
|
||||
public static string Error = string.Empty;
|
||||
|
||||
public static string Read(string filePath)
|
||||
{
|
||||
string hexString = "";
|
||||
|
||||
try
|
||||
{
|
||||
// 파일 열기
|
||||
using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
// 첫 3 바이트 읽기
|
||||
byte[] buffer = new byte[3] { 0x00, 0x00, 0x00 };
|
||||
int bytesRead = fs.Read(buffer, 0, 3);
|
||||
|
||||
// 16진수로 변환하여 출력
|
||||
hexString = BitConverter.ToString(buffer).Replace("-", string.Empty).ToLower();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
hexString = "000000";
|
||||
Error = ex.Message;
|
||||
}
|
||||
|
||||
return hexString;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace SocialOnTheFile.Helper
|
||||
{
|
||||
public static class ImpHash
|
||||
{
|
||||
public static string Calculate(string filePath)
|
||||
{
|
||||
string imphash = "";
|
||||
|
||||
using (FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
using (BinaryReader binaryReader = new BinaryReader(fileStream))
|
||||
{
|
||||
// DOS Header 크기만큼 스킵
|
||||
binaryReader.BaseStream.Seek(0x3C, SeekOrigin.Begin);
|
||||
int peHeaderOffset = binaryReader.ReadInt32();
|
||||
|
||||
// PE Header로 이동
|
||||
binaryReader.BaseStream.Seek(peHeaderOffset, SeekOrigin.Begin);
|
||||
|
||||
// Signature 확인
|
||||
uint signature = binaryReader.ReadUInt32();
|
||||
if (signature != 0x00004550) // "PE\0\0"
|
||||
{
|
||||
throw new InvalidOperationException("Invalid PE file");
|
||||
}
|
||||
|
||||
// Optional Header에서 Import Table Offset 찾기
|
||||
binaryReader.BaseStream.Seek(20, SeekOrigin.Current); // COFF 파일 헤더 크기만큼 스킵
|
||||
ushort optionalHeaderSize = binaryReader.ReadUInt16();
|
||||
binaryReader.BaseStream.Seek(42, SeekOrigin.Current); // ImageBase 크기만큼 스킵
|
||||
|
||||
int importTableOffset = peHeaderOffset + 24 + optionalHeaderSize;
|
||||
binaryReader.BaseStream.Seek(importTableOffset, SeekOrigin.Begin);
|
||||
|
||||
// Import Table에서 imphash 생성
|
||||
StringBuilder imphashBuilder = new StringBuilder();
|
||||
while (true)
|
||||
{
|
||||
uint lookupTableRVA = binaryReader.ReadUInt32();
|
||||
if (lookupTableRVA == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
binaryReader.BaseStream.Seek(12, SeekOrigin.Current); // 다른 필드들을 스킵
|
||||
binaryReader.BaseStream.Seek(4, SeekOrigin.Current); // 항상 0인 TimeDateStamp 필드를 스킵
|
||||
|
||||
imphashBuilder.Append(lookupTableRVA.ToString("X8"));
|
||||
}
|
||||
|
||||
// MD5 해시 생성
|
||||
using (MD5 md5 = MD5.Create())
|
||||
{
|
||||
byte[] hashBytes = md5.ComputeHash(Encoding.ASCII.GetBytes(imphashBuilder.ToString()));
|
||||
imphash = BitConverter.ToString(hashBytes).Replace("-", string.Empty).ToLower();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return imphash;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,90 +0,0 @@
|
|||
using Newtonsoft.Json.Linq;
|
||||
using SocialOnTheFile.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocialOnTheFile.Helper
|
||||
{
|
||||
public class Timeline
|
||||
{
|
||||
public string ApiBaseUrl;
|
||||
public string AccessToken;
|
||||
public List<Indicator> Indicators;
|
||||
public string ResponseText;
|
||||
|
||||
public Timeline(string host, string access_token)
|
||||
{
|
||||
ApiBaseUrl = $"https://{host}/api/v1/timelines/tag";
|
||||
AccessToken = access_token;
|
||||
Indicators = new List<Indicator>();
|
||||
}
|
||||
|
||||
public static string RemoveHtmlTags(string input)
|
||||
{
|
||||
// 정규 표현식을 사용하여 HTML 태그 제거
|
||||
string pattern = "<.*?>";
|
||||
string replacement = "";
|
||||
Regex regex = new Regex(pattern);
|
||||
string result = regex.Replace(input, replacement);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string FormatDateTime(string dateString)
|
||||
{
|
||||
string formattedDateTime = "";
|
||||
|
||||
// 날짜와 시간을 파싱
|
||||
if (DateTime.TryParseExact(dateString, "MM/dd/yyyy HH:mm:ss", null, System.Globalization.DateTimeStyles.None, out DateTime parsedDateTime))
|
||||
{
|
||||
// UTC에서 로컬 시간으로 변환
|
||||
DateTime localTime = parsedDateTime.ToLocalTime();
|
||||
|
||||
// 현재 스레드의 문화권에 따라 날짜와 시간 출력
|
||||
formattedDateTime = localTime.ToString();
|
||||
}
|
||||
|
||||
return formattedDateTime;
|
||||
}
|
||||
|
||||
public void Fetch(string q)
|
||||
{
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {AccessToken}");
|
||||
|
||||
try
|
||||
{
|
||||
// 데이터 요청
|
||||
Task<HttpResponseMessage> responseTask = client.GetAsync($"{ApiBaseUrl}/{q}");
|
||||
responseTask.Wait();
|
||||
|
||||
// 응답 본문 저장
|
||||
HttpResponseMessage response = responseTask.Result;
|
||||
Task<string> readAsStringTask = response.Content.ReadAsStringAsync();
|
||||
readAsStringTask.Wait();
|
||||
ResponseText = readAsStringTask.Result;
|
||||
|
||||
// JSON 파싱
|
||||
JArray statuses = JArray.Parse(ResponseText);
|
||||
|
||||
foreach (var status in statuses)
|
||||
{
|
||||
string createdAt = status["created_at"].Value<string>();
|
||||
string content = status["content"].Value<string>();
|
||||
|
||||
Indicators.Add(new Indicator
|
||||
{
|
||||
CreatedAt = FormatDateTime(createdAt),
|
||||
Content = RemoveHtmlTags(content)
|
||||
});
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
namespace SocialOnTheFile.Model
|
||||
{
|
||||
public class Indicator
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string CreatedAt { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
||||
// 이러한 특성 값을 변경하세요.
|
||||
[assembly: AssemblyTitle("SocialOnTheFile")]
|
||||
[assembly: AssemblyDescription("SocialOnTheFile")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Catswords Research")]
|
||||
[assembly: AssemblyProduct("SocialOnTheFile")]
|
||||
[assembly: AssemblyCopyright("(C) 2023, Catswords Research.")]
|
||||
[assembly: AssemblyTrademark("SocialOnTheFile")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
|
||||
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
|
||||
[assembly: ComVisible(true)]
|
||||
|
||||
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||
[assembly: Guid("35cc3e28-05c8-478b-b5a2-15fce468ce34")]
|
||||
|
||||
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||
//
|
||||
// 주 버전
|
||||
// 부 버전
|
||||
// 빌드 번호
|
||||
// 수정 버전
|
||||
//
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
73
SocialOnTheFile/Properties/Resources.Designer.cs
generated
|
@ -1,73 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 도구를 사용하여 생성되었습니다.
|
||||
// 런타임 버전:4.0.30319.42000
|
||||
//
|
||||
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||
// 이러한 변경 내용이 손실됩니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SocialOnTheFile.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
|
||||
/// </summary>
|
||||
// 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
|
||||
// 클래스에서 자동으로 생성되었습니다.
|
||||
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
|
||||
// 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SocialOnTheFile.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
|
||||
/// 재정의합니다.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap image1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("image1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<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>
|
||||
</data>
|
||||
</root>
|
Before Width: | Height: | Size: 4.2 KiB |
|
@ -1,135 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{35CC3E28-05C8-478B-B5A2-15FCE468CE34}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>SocialOnTheFile</RootNamespace>
|
||||
<AssemblyName>SocialOnTheFile</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RegisterForComInterop>true</RegisterForComInterop>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>signature.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="SharpShell, Version=2.7.2.0, Culture=neutral, PublicKeyToken=f14dc899472fe6fb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpShell.2.7.2\lib\net40-client\SharpShell.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Helper\FileCompany.cs" />
|
||||
<Compile Include="Helper\ImpHash.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SocialOnTheFileSheet.cs" />
|
||||
<Compile Include="Helper\FileMagic.cs" />
|
||||
<Compile Include="Helper\Timeline.cs" />
|
||||
<Compile Include="Model\Indicator.cs" />
|
||||
<Compile Include="SocialOnTheFilePage.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SocialOnTheFilePage.Designer.cs">
|
||||
<DependentUpon>SocialOnTheFilePage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SocialOnTheFilePage.resx">
|
||||
<DependentUpon>SocialOnTheFilePage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="signature.snk" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\image1.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
133
SocialOnTheFile/SocialOnTheFilePage.Designer.cs
generated
|
@ -1,133 +0,0 @@
|
|||
namespace SocialOnTheFile
|
||||
{
|
||||
partial class SocialOnTheFilePage
|
||||
{
|
||||
/// <summary>
|
||||
/// 필수 디자이너 변수입니다.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 사용 중인 모든 리소스를 정리합니다.
|
||||
/// </summary>
|
||||
/// <param name="disposing">관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 구성 요소 디자이너에서 생성한 코드
|
||||
|
||||
/// <summary>
|
||||
/// 디자이너 지원에 필요한 메서드입니다.
|
||||
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.listView1 = new System.Windows.Forms.ListView();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(123, 63);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(118, 42);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// listView1
|
||||
//
|
||||
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.columnHeader2});
|
||||
this.listView1.HideSelection = false;
|
||||
this.listView1.Location = new System.Drawing.Point(13, 126);
|
||||
this.listView1.Name = "listView1";
|
||||
this.listView1.Size = new System.Drawing.Size(347, 277);
|
||||
this.listView1.TabIndex = 3;
|
||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||
this.listView1.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.Text = "CreatedAt";
|
||||
this.columnHeader1.Width = 120;
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Content";
|
||||
this.columnHeader2.Width = 200;
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.AutoSize = true;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(10, 417);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(122, 13);
|
||||
this.linkLabel1.TabIndex = 4;
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Text = "Write a review to this file";
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(127, 46);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(118, 16);
|
||||
this.label2.TabIndex = 5;
|
||||
this.label2.Text = "Conversations with";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.BackColor = System.Drawing.Color.White;
|
||||
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox1.Location = new System.Drawing.Point(11, 446);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ReadOnly = true;
|
||||
this.textBox1.Size = new System.Drawing.Size(349, 13);
|
||||
this.textBox1.TabIndex = 6;
|
||||
//
|
||||
// SocialOnTheFilePage
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.BackgroundImage = global::SocialOnTheFile.Properties.Resources.image1;
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.listView1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.DoubleBuffered = true;
|
||||
this.Name = "SocialOnTheFilePage";
|
||||
this.Size = new System.Drawing.Size(491, 477);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ListView listView1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
}
|
||||
}
|
|
@ -1,149 +0,0 @@
|
|||
using SharpShell.Attributes;
|
||||
using SharpShell.SharpPropertySheet;
|
||||
using SocialOnTheFile.Model;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SocialOnTheFile
|
||||
{
|
||||
[ComVisible(true)]
|
||||
[COMServerAssociation(AssociationType.AllFiles)]
|
||||
public partial class SocialOnTheFilePage: SharpPropertyPage
|
||||
{
|
||||
private string filePath;
|
||||
private string fileMagic;
|
||||
private string fileName;
|
||||
private string fileExtension;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SocialOnTheFilePage"/> class.
|
||||
/// </summary>
|
||||
public SocialOnTheFilePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Set the page title.
|
||||
PageTitle = "FileToots";
|
||||
|
||||
// Note: You can also set the icon to be used:
|
||||
// PageIcon = Properties.Resources.SomeIcon;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the page is initialised.
|
||||
/// </summary>
|
||||
/// <param name="parent">The parent property sheet.</param>
|
||||
protected override void OnPropertyPageInitialised(SharpPropertySheet parent)
|
||||
{
|
||||
// Store the file path.
|
||||
filePath = parent.SelectedItemPaths.First();
|
||||
|
||||
// Get first 4 bytes from the file.
|
||||
fileMagic = Helper.FileMagic.Read(filePath);
|
||||
|
||||
// Show file magic to the label
|
||||
label1.Text = "#0x" + fileMagic;
|
||||
if (Helper.FileMagic.Error != string.Empty)
|
||||
{
|
||||
textBox1.Text = Helper.FileMagic.Error;
|
||||
}
|
||||
|
||||
// Get file name and file extension
|
||||
try
|
||||
{
|
||||
fileExtension = Path.GetExtension(filePath);
|
||||
fileName = Path.GetFileName(filePath);
|
||||
if (fileExtension.Length > 0 && fileExtension.Substring(0, 1) == ".")
|
||||
{
|
||||
fileExtension = fileExtension.Substring(1);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
fileExtension = "";
|
||||
fileName = "";
|
||||
}
|
||||
|
||||
// Request a timeline
|
||||
var search = new Helper.Timeline("catswords.social", "HDVTEfLswvSJZq5MRpim2tp7DifTcgKbMl0mBM5-uHw");
|
||||
|
||||
// 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 }));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when apply is pressed on the property sheet, or the property
|
||||
/// sheet is dismissed with the OK button.
|
||||
/// </summary>
|
||||
protected override void OnPropertySheetApply()
|
||||
{
|
||||
// code here
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when OK is pressed on the property sheet.
|
||||
/// </summary>
|
||||
protected override void OnPropertySheetOK()
|
||||
{
|
||||
// code here
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
Process.Start("https://catswords.social/");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
using SharpShell.Attributes;
|
||||
using SharpShell.SharpPropertySheet;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SocialOnTheFile
|
||||
{
|
||||
/// <summary>
|
||||
/// The ResourcesPropertySheet is a shell extension to show the managed
|
||||
/// and unmanaged resources containing in binary files.
|
||||
/// </summary>
|
||||
[ComVisible(true)]
|
||||
[COMServerAssociation(AssociationType.AllFiles)]
|
||||
public class SocialOnTheFileSheet : SharpPropertySheet
|
||||
{
|
||||
/// <summary>
|
||||
/// Determines whether this instance can show a shell property sheet, given the specified selected file list.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// <c>true</c> if this instance should show a shell property sheet for the specified file list; otherwise, <c>false</c>.
|
||||
/// </returns>
|
||||
protected override bool CanShowSheet()
|
||||
{
|
||||
// We will only show the resources pages if we have ONE file selected.
|
||||
return SelectedItemPaths.Count() == 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the pages.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// The property sheet pages.
|
||||
/// </returns>
|
||||
protected override IEnumerable<SharpPropertyPage> CreatePages()
|
||||
{
|
||||
// Create the property sheet page.
|
||||
var page = new SocialOnTheFilePage();
|
||||
|
||||
// Return the pages we've created.
|
||||
return new[] { page };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SharpShell" publicKeyToken="f14dc899472fe6fb" culture="neutral" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||
<package id="SharpShell" version="2.7.2" targetFramework="net472" />
|
||||
</packages>
|
BIN
screenshot.png
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 326 KiB |