View BMPartialPatternSearch.cs
public class BMPartialPatternSearch
{
public int MinimumSearchLength;
public BMPartialPatternSearch(int min = 5)
{
MinimumSearchLength = min;
}
public(byte[] partialPattern, int idx) SearchPartial(byte[] pattern, byte[] searchArray)
{
var bm = new BoyerMoore(pattern);
View BoyerMoore.cs
public class BoyerMoore
{
private int[] _jumpTable;
private byte[] _pattern;
private int _patternLength;
public BoyerMoore()
{
}
public BoyerMoore(byte[] pattern)
{
View TextBinaryFileId.cs
public class TextBinaryFileId
{
private readonly BoyerMoore _boyerMoore4Null = new BoyerMoore(new byte[] {0, 0, 0, 0});
public Dictionary<string, string> BinaryFiles = new Dictionary<string, string>();
public Dictionary<string, Encoding> EncodingFiles = new Dictionary<string, Encoding>();
public Dictionary<string, double> TextFiles = new Dictionary<string, double>();
public bool IsBlockText(byte[] BinData, double ConfidenceThreshold = 25)
{
if(BinData.Length == 0)
return false;
View SmallHashSet.cs
public class SmallHashSet<T>
{
private int[] _hashBuckets;
private uint _hashCode;
public Data[] Datas;
public SmallHashSet() : this(4096)
{
}
public SmallHashSet(int size)
{
View ProgressReport.cs
public class ProgressReport
{
public readonly Dictionary<string, object> GValues = new Dictionary<string, object>();
public List<string> ErrorLog = new List<string>();
public void Set(string name, object value)
{
if(!GValues.ContainsKey(name))
GValues.Add(name, value);
else GValues[name] = value;
}
View TBuffer.cs
public class TBuffer<T>
{
private readonly int _size;
private Murmur3.Result[] _hashes;
private bool _hashesUpToDate;
public T[] Things;
public TBuffer(int size)
{
_size = size;
Things = new T[size];
View MurMur3.cs
public class Murmur3 : HashAlgorithm
{
private ulong _h1;
private ulong _h2;
private ulong _length;
public Result Res;
public Murmur3() : this(new Result {H1 = 0, H2 = 0})
{
}
public Murmur3(Result seed)
View UniHashStatic.cs
[Serializable]
public static class UniHashStatic
{
private static readonly FNV1a64 _hash64;
private static readonly Sha3 _hash1600;
private static readonly Murmur3 _hash128;
private static readonly SHA256Managed _hash256;
private static readonly SHA512Managed _hash512;
static UniHashStatic()
{
View CustomGroupBox.cs
public class CustomGroupBox : Panel
{
public enum BorderStyles
{
GroupBox = 0,
Panel
}
public enum HeaderMode
{
None = 0,
View GetProcessorInfo.cs
private static Dictionary<string, string> GetProcessorInfo()
{
ManagementObjectCollection moc;
var Processor = new Dictionary<string, string>();
try
{
moc = new ManagementObjectSearcher("select * from Win32_Processor").Get();
}
catch