This block will ping an IP address. Does anybody have the code?
Last edited by waveOSBeta (2010-07-23 16:19:04)
Offline
You could try, in the method of code, to somehow execute the link block method with the path to the IPv4 ping utility and the entered IP. This would only work under Windows, though. (I have no idea how to write the code, this is just a suggestion.)
Last edited by meowmeow55 (2010-07-23 16:24:25)
Offline
send a block of data to an ip to determine whether that ip is on the network.
Offline
I dont get it, so you want to see if the IP is connected?
Offline
Epic idea -
ping ip (variable)
if ip active
join mesh on (variable)
Offline
A pinging block like the ping function in cmd?
No.
People could do this to do a Denial of Service attack to a site. Maybe.
Offline
Yeah, that'd be great for things like chat to check if the entered IP is available.
BTW, is my idea possible?
Offline
Hmm that block can be used if squeak uses a function like C++s system block
all u have to do is declare an fstream that will take the data from out and then type the block like
int Ping(char* ip)
{
char Pinger[15]={"ping "};
strcat(Ping,ip);
int ping = StreamIN(system(Pinger);
return ping;
}
Though its the C++ code and i havent explained the StreamIN function but its just a sketch of how to make it on sqeuk if there exists Fstream and System operation functions.
And btw
for creating a DDOS attack mate u need a faster language then scratch
.
Last edited by fanofcena (2010-07-26 05:48:00)
Offline
Um with some modding to the sourse its easy as you get a variable to hold your IP adress and then use the block to see if its connected. Ill make a panther project to act as a demo...
Offline
Here:
http://www.mediafire.com/file/6d66gr9zph22y80/Ping IP.pt
3 Scripts...
Offline
oh, you need to see the project
Offline
Couldn't you just make an 'active' variable, and check if it's 1? If it's not connected, it would be 0, by default.
Offline