Overthewire Vortex Level0
Mit http://www.overthewire.org/ scheint es (eine weitere) interessante Seite, mit sogenannten Wargames zu geben.
"The wargames offered by the OverTheWire community can help you to learn and practice security concepts in the form of funfilled games" (http://www.overthewire.org)
Na dann mal los......;D
Hier meine Lösung für Level0
#!/usr/bin/perl use strict; use warnings; use IO::Socket::INET; my $socket; my $msg; # create socket $socket= IO::Socket::INET->new ( PeerAddr => 'vortex.labs.overthewire.org', PeerPort => '5842', Proto => 'tcp', ) or die "Could not connect.\n"; # receive message my $sum; my $i; for ( $i=0;$i<4;$i++ ) { $socket->recv($msg,4); $sum += unpack "I",$msg; } # send message back my $smsg; $smsg = pack "I", $sum; if ($socket->send($smsg)) { print "[+] Send message back '", $smsg,"'\n"; print "[+] ....done\n"; } # receive solution my $solution; $socket->recv($solution,1024); print "[+] Received solution '", $solution,"'\n"; # close socket close($socket);
Comments
Display comments as Linear | Threaded