Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Perl LWP 403 ?

Name: Anonymous 2007-02-04 18:23

So yeah.. here's the script

#!/usr/bin/perl

use LWP::UserAgent; $ua = new LWP::UserAgent;
my $req = new HTTP::Request('POST','http://img.4chan.org/b/res/1234567890.html';); # random
$req->content_type('application/x-www-form-urlencoded');
$req->content('com=iamtesting');
my $res = $ua->request($req);
print $res->as_string;

I get a 403.
The thread exists though.
what am i doing wrong ?
I checked and "com" is the comment variable.

Name: Anonymous 2007-02-04 18:32

you need to change the useragent string.

Name: Anonymous 2007-02-04 18:51

oh for fucks sake that was the problem?
i've though of it also, but cbf to try lol.
anyways thanks

Name: Anonymous 2007-02-05 14:19

So ok my script now is ..
-----
#!/usr/bin/perl

use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20070126 Ubuntu/dapper-security Firefox/1.5.0.");
my $req = new HTTP::Request('POST','http://dat.4chan.org/b/imgboard.php';); # random
$req->content_type('application/x-www-form-urlencoded');
$req->content('resto=20112038com=YHALOTHAR');
my $res = $ua->request($req);
print $res->as_string;
----

It doesn't work.. I figured out that resto= is the thread number, and com is for the comment..
But what is wrong? It still doesn't work

Name: Anonymous 2007-02-05 14:22

>>4 here
i noticed an error ('resto=20112038&com=YHALOTHAR'); i was missing the &...
still doesn't work though

Name: Anonymous 2007-02-06 13:28

>>4
$req->content('resto=20112038com=YHALOTHAR');

Needs moar ampersand

$req->content('resto=20112038&com=YHALOTHAR');

try that

Name: Anonymous 2007-02-06 13:30

>>4
use curl

Name: Anonymous 2007-02-06 13:54

>>1
$you = $fag;

Name: Anonymous 2007-02-06 13:59

$you = $perlfag;
fix'd

Name: Anonymous 2009-01-14 13:56

I AM AN EXPERT PROGRAMMER

Name: Anonymous 2010-06-25 14:51

WARNING: NECRO POST

Name: Anonymous 2011-02-03 1:44

Name: Anonymous 2011-02-03 1:50

Name: Sgt.Kabu뿙ࡧkiman詯릟 2012-05-28 22:18

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List