<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hi <br><br>I am trying to modify a small program i found off the internet as follows... I can get the 'tracert' to work and it gives me all the info back. However, when i replace the tracert with 'ping', the commamd prompt shows 'testing' and the script freezes... any suggestions as why it is doing that.<br><br>import os<br>import sys <br>xyz = 1<br><br>while xyz==1:<br> ip = raw_input("command >> ")<br> zx = open("log.txt", "a")<br> <br> if ip.lower()=="exit":<br> ask = raw_input("Are you sure you want to exit? (Y\\N) ")<br> <br>
if ask.lower()=="y":<br> sys.exit()<br> elif ask.lower()=="n":<br> print("That's what I thought.")<br> else:<br> print("Wrong choice. Retard.")<br> <br> elif ip.lower()=="range":<br> stin = raw_input("Enter function: ")<br> sec = raw_input("Enter the first 3 sections: ")<br> b = raw_input("Enter beginning number: ")<br> intb=int(b)<br> e = int(raw_input("Enter ending number:
"))<br> <br> while intb<=e:<br> print (stin + ' ' + sec + '.' + b )<br> z = os.system(stin + ' ' + sec + '.' + b )<br> print z<br> <br> if z==0:<br> print(""+str(sec)+"."+str(b)+" is online.")<br> zx.write(""+str(sec)+"."+str(b)+" is online.\n")<br> elif z==1:<br> print("Either "+str(sec)+"."+str(b)+" is offline, or ping
request has been blocked.")<br> zx.write("Either "+str(sec)+"."+str(b)+" is offline, or ping request has been blocked.\n")<br><br> intb = intb + 1<br> b=str(intb)<br><br> else:<br> <br> print("Wrong choice. Retard.")<br><br><br><br><br><br></div></div><br>
between 0000-00-00 and 9999-99-99
</body></html>