hmaverickadams / Beginner-Network-Pentesting

Notes for Beginner Network Pentesting Course
5.68k stars 1.6k forks source link

Need your help, Your Python code not running well with me #2

Closed Ahmed-Nagdy closed 4 years ago

Ahmed-Nagdy commented 4 years ago

!/bin/bash

for ip in ‘seq 2 254’; do ping -c 1 $1.$ip | grep “64 Bytes” | cut -d " " -f 4 | tr -d “:” & done

The result for that code as you know it should be shown all IPs for up running machines.

But the current situation show to me this error message: ping: 192.168.1.seq: Name or service not known

01

sickWill commented 4 years ago

It's not a python code it's just bash. And, the problem you have it's this : for ip in / here is the problem / ' seq, bla bla bla '. You must use ( `` ) these to solve it.

hmaverickadams commented 4 years ago

Typo in your script. Closing as resolved.