#!/bin/bash COUNTER=1 check(){ if wget --timeout=1.5 --spider https://${i} 2>/dev/null then python3 lar.py https://${i}/ id.binary elif wget --timeout=1.5 --spider http://${i} 2>/dev/null then python3 lar.py http://${i}/ id.binary else echo "- [EXTERNAL] ${i} - [ERROR]" fi } banner(){ read -p "List: " lis read -p "Thread: " THREADS } banner for i in `cat $lis`; do FAST=$(expr $COUNTER % $THREADS) if [[ $FAST == 0 && $COUNTER > 0 ]]; then sleep 1 fi check & COUNTER=$((COUNTER+1)) done wait