Compare commits

..

No commits in common. "main" and "latest" have entirely different histories.
main ... latest

2 changed files with 4 additions and 21 deletions

View File

@ -22,11 +22,7 @@ namespace SharpScan
[Option('p', "ports", Required = false, Separator = ',', HelpText = "TCP port to scan, coma separated")]
public IEnumerable<string> Ports { get; set; }
<<<<<<< HEAD
[Option('t', "timeout", Required = false, Default = 50, HelpText = "Timeout in milliseconds to check a port")]
=======
[Option('t', "timeout", Required = false, Default = 100, HelpText = "Timeout in milliseconds to check a port")]
>>>>>>> 7b1f2f3d9b6b72a7494eccbf5415b94a9ea5235e
[Option('t', "timeout", Required = false, Default = 500, HelpText = "Timeout in milliseconds to check a port")]
public int Timeout { get; set; }
[Option('d', "delay", Required = false, Default = 0, HelpText = "Delay in milliseconds between 2 scan request")]
@ -249,8 +245,6 @@ namespace SharpScan
Stopwatch chronometre = new Stopwatch();
chronometre.Start();
int jittler_value = (delay * 30) / 100;
Console.WriteLine($"jittler_value: {jittler_value}");
int percent = 0;
foreach ((string address, int port) in cibles)
@ -264,20 +258,9 @@ namespace SharpScan
results.Add((address, port));
}
// Le jitter peut être négatif, ou positif, on laisse le choix à l'aléa
// Sleep delay value
r = new Random();
if (r.Next(0, 2) == 0)
{
sleep_value = delay - r.Next(0, jittler_value);
}
else
{
sleep_value = delay + r.Next(0, jittler_value);
}
Console.WriteLine($"sleep: {sleep_value}");
sleep_value = r.Next(delay, delay + (jittler * delay / 100));
Thread.Sleep(sleep_value);
cpt += 1;

View File

@ -10,7 +10,7 @@ Copyright © 2025
-p, --ports TCP port to scan, coma separated
-t, --timeout (Default: 100) Timeout in milliseconds to check a port
-t, --timeout (Default: 500) Timeout in milliseconds to check a port
-d, --delay (Default: 0) Delay in milliseconds between 2 scan request