2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2026-02-05 22:55:15 +01:00

small fixes for delay

firstly, test_cipher_on_target() will try at least 4 connections before
incurring the sleep, for aggressive rate limiter on server side it may be
too much, so sleep before every connection

secondly, because running external commands like sleep incurs a fork
penalty, we first check if it is necessary
This commit is contained in:
Hubert Kario
2014-10-28 16:44:43 +01:00
parent 71ba3c88b0
commit 11ce6187de
2 changed files with 12 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
parallel=10
max_bg=50
absolute_max_bg=100
absolute_max_bg=400
max_load_avg=50
if [ $(ulimit -u) -lt $((10*absolute_max_bg)) ]; then
@@ -32,7 +32,7 @@ function scan_host() {
if [ $? -gt 0 ]; then
return
fi
../cipherscan -json -servername $1 $2:443 > results/$1@$2
../cipherscan --delay 2 -json -servername $1 $2:443 > results/$1@$2
}
function scan_host_no_sni() {
@@ -44,7 +44,7 @@ function scan_host_no_sni() {
if [ $? -gt 0 ]; then
return
fi
../cipherscan -json $1:443 > results/$1
../cipherscan --delay 2 -json $1:443 > results/$1
}
function scan_hostname() {