Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use JSON;
- use Data::Dumper;
- use LWP::UserAgent;
- use strict;
- my $file = 'StartboxWeb-2-97-CKSQUARE.bin';
- my $json = JSON->new->allow_nonref;
- my $browser = LWP::UserAgent->new(
- agent => 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
- timeout => 8,
- max_redirect => 0,
- );
- my $req = $browser->post( 'http://192.168.1.49/mpfsupload',
- ['file' => [$file]],
- 'Content_Type' => 'multipart/form-data',
- );
- #my $data = $json->decode( $req->content );
- #print Dumper($data);
- #my $req2 = $browser->post( 'http://192.168.1.49/mpfsupload',
- # 'Content' => 'id='.$data->{id}.'&origname='.$data->{origname}.'&p='.$data->{p}
- #);
- #print $req2->content;
- #my ($id) = $req2->content =~ m/ href="http:\/\/www.upload-thai.com\/dl\/([^"]+?)" /ig;
- #print 'http://www.upload-thai.com/dl/'.$id;
- print Dumper($req);
- sleep();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement