in reply to How to Post s Comment in Perl?

The PeerAddr passed to IO::Socket::INET needs to be a host name or IP address. Not a URL.

But you seem to be using an altogther wrong layer of abstraction. Perl provides tonnes of awesome modules for dealing with HTTP and the Web, so why diddle around with stuff at the TCP/IP level?

use Web::Magic -sub => 'web'; web('http://members.sitegadgets.com/scripts/signbook.cgi') -> POST({ sgchecksum => 554, username => 'sony10' 1 => 'Perl Exploit WORKED BABE!', 2 => 'Awesome@exploit.com', 3 => 'Perl Exploit WORKED BABE!', }) -> Referer('http://members.sitegadgets.com/sony10/signbook.html') -> User_Agent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1 +) Gecko/20100101 Firefox/9.0.1') -> assert_success -> assert_type(qw[text/html application/xhtml+xml]) -> do_request;

Replies are listed 'Best First'.
Re^2: How to Post s Comment in Perl?
by Anonymous Monk on Mar 05, 2012 at 23:47 UTC
    Web::Magic, its for trolls and spammers too :p