Exemplo n.º 1
0
 public void UpdateStrings(int length)
 {
     Strings.Clear();
     foreach (StringInfo stringInfo in AllStrings.Where(x => x.Length >= length))
     {
         Strings.Add(stringInfo);
     }
 }
Exemplo n.º 2
0
 private void BtnGenerateListOfHashes_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("This will take a lot of time and will use a lot of RAM. Do you want to continue?", "Generate list of hashes", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         var getAllParts = new AllStrings();
         getAllParts.GetStrings();
         GC.Collect();
     }
 }
Exemplo n.º 3
0
        public void AppendString(ExtractedString extractedString)
        {
            if (!Chache.Contains(extractedString.Value))
            {
                Chache.Add(extractedString.Value);

                AllStrings.Add(new StringInfo(extractedString.Value, extractedString.Encoding, Chache.Count));
            }
        }
Exemplo n.º 4
0
        public static List <RaiderResult> UnhashFromFile(Endianness unhashingEndianness, HashFactory hashFactory, uint[] arrayFromFile, CaseOptions caseOption)
        {
            var allStrings = new AllStrings().ReadHashesFile(hashFactory, caseOption);
            var listBox    = new List <RaiderResult>();
            var isKnown    = false;

            void AddResult(uint hash)
            {
                if (allStrings.TryGetValue(hash, out var result))
                {
                    isKnown = true;
                }
                else
                {
                    if (hash == 0 || hash == uint.MaxValue)
                    {
                        result  = "--------";
                        isKnown = true;
                    }
                    else
                    {
                        result  = "HASH_UNKNOWN";
                        isKnown = false;
                    }
                }

                listBox.Add(new RaiderResult()
                {
                    Hash = hash, Value = result, IsKnown = isKnown
                });
            }

            if (unhashingEndianness == Endianness.BigEndian)
            {
                foreach (var hash in arrayFromFile)
                {
                    AddResult(hash);
                }
            }
            else
            {
                foreach (var hash in arrayFromFile)
                {
                    AddResult(hash.Reverse());
                }
            }

            return(listBox);
        }
Exemplo n.º 5
0
        private void CheckFile()
        {
            Sender.GenericMessageBoxDuringBruteForce("Raid info", $"Hashes identified: {Hashes.Count}");
            var allParts = new AllStrings().ReadHashesFile(HashFactory, CaseOption);
            var results  = new List <RaiderResult>();

            foreach (var hash in Hashes)
            {
                if (allParts.TryGetValue(hash, out var result))
                {
                    results.Add(new RaiderResult {
                        Hash = hash, Value = result, IsKnown = true
                    });
                }
                else
                {
                    results.Add(new RaiderResult {
                        Hash = hash, Value = "HASH_UNKNOWN", IsKnown = false
                    });
                }
            }

            Sender.UpdateFormDuringBruteforce(results);
        }
Exemplo n.º 6
0
 public void Clear()
 {
     Chache.Clear();
     Strings.Clear();
     AllStrings.Clear();
 }
Exemplo n.º 7
0
 public void AppendString(StringInfo value)
 {
     AllStrings.Add(value);
 }