Warning: opendir(/var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/sh/3.0.83.2/scripts/): failed to open dir: No such file or directory in /var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php on line 26

Warning: Invalid argument supplied for foreach() in /var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php on line 170
Skip to content

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);

 

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment


To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA 1CAPTCHA 2CAPTCHA 3CAPTCHA 4CAPTCHA 5


Textile-formatting allowed
You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
Form options
Imprint | Contact | Privacy Statement

Warning: opendir(/var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/sh/3.0.83.2/scripts/): failed to open dir: No such file or directory in /var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php on line 26

Warning: Invalid argument supplied for foreach() in /var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php on line 170