Pārlūkot izejas kodu

Bugfix echo, nmap hostgroup limit, kill error

Yann Weber 7 gadus atpakaļ
vecāks
revīzija
79d4fa7342
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4
    4
      ping_radar.sh

+ 4
- 4
ping_radar.sh Parādīt failu

@@ -14,7 +14,7 @@
14 14
 #
15 15
 #You should have received a copy of the GNU General Public License
16 16
 #along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
-
17
+alias echo='/bin/echo -e'
18 18
 
19 19
 REFRESH=2
20 20
 HOSTS_FILES="$HOME/.hosts_scanner"
@@ -32,7 +32,7 @@ clean_exit() {
32 32
 	for pid in $(echo $pids)
33 33
 	do
34 34
 		echo killing $pid
35
-		kill $pid 2>/dev/null
35
+		kill $pid
36 36
 	done
37 37
 	for pid in $(echo $pids)
38 38
 	do
@@ -55,7 +55,7 @@ clean_cidr() {
55 55
 	for pid in $(echo $cidr_pids $cidr_nmap_pid)
56 56
 	do
57 57
 		echo CIDR killing $pid
58
-		kill $pid 2>/dev/null
58
+		kill $pid
59 59
 		wait $pid
60 60
 		echo CIDR $pid killed
61 61
 	done
@@ -123,7 +123,7 @@ cidr_scan() {
123 123
 
124 124
 	test -z "$4" && delay=5 || delay=$4
125 125
 	cidr_nmap_res=$(mktemp -t ping_radar_cidr_nmap.XXXXXXXX)
126
-	nmap_cmd="nmap -sP -oG $cidr_nmap_res --max-rate=15 $1"
126
+	nmap_cmd="nmap -sP -oG $cidr_nmap_res --max-rate=15 --max-hostgroup=5 $1"
127 127
 
128 128
 	trap clean_cidr 15
129 129
 

Notiek ielāde…
Atcelt
Saglabāt