Exemplo n.º 1
0
        private void StartNetRanges(MetadataExtractCore.ThreadSafeList <NetRange> lstNetranges)
        {
            try
            {
                OnStartEvent(null);
                OnLogEvent(new EventsThreads.ThreadStringEventArgs("Starting Shodan search by netrange"));

                foreach (var nr in lstNetranges)
                {
                    GetShodanInformation(nr);
                }
            }
            catch (ThreadAbortException)
            {
                OnLogEvent(new EventsThreads.ThreadStringEventArgs("Shodan search aborted"));
                OnEndEvent(new EventsThreads.ThreadEndEventArgs(EventsThreads.ThreadEndEventArgs.EndReasonEnum.Stopped));
            }
            catch (Exception e)
            {
                OnLogEvent(new EventsThreads.ThreadStringEventArgs($"Shodan search aborted error: {e.Message}"));
                OnEndEvent(
                    new EventsThreads.ThreadEndEventArgs(EventsThreads.ThreadEndEventArgs.EndReasonEnum.ErrorFound));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Inicia el reconocimiento de IPs por netranges sin hacerlo asincronamente
 /// </summary>
 public void StartRecognitionNetRangeNoAsync(MetadataExtractCore.ThreadSafeList <NetRange> lstNetranges)
 {
     StartNetRanges(lstNetranges);
 }