Advertisement
Quantumzblue

TB02

Apr 1st, 2015
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1.  
  2. use JSON;
  3. use Data::Dumper;
  4. use LWP::UserAgent;
  5. use strict;
  6.  
  7.  
  8. my $file = 'StartboxWeb-2-97-CKSQUARE.bin';
  9.  
  10. my $json = JSON->new->allow_nonref;
  11. my $browser = LWP::UserAgent->new(
  12. agent => 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
  13. timeout => 8,
  14. max_redirect => 0,
  15. );
  16.  
  17. my $req = $browser->post( 'http://192.168.1.49/mpfsupload',
  18. ['file' => [$file]],
  19. 'Content_Type' => 'multipart/form-data',
  20. );
  21. #my $data = $json->decode( $req->content );
  22. #print Dumper($data);
  23.  
  24. #my $req2 = $browser->post( 'http://192.168.1.49/mpfsupload',
  25. # 'Content' => 'id='.$data->{id}.'&origname='.$data->{origname}.'&p='.$data->{p}
  26. #);
  27. #print $req2->content;
  28. #my ($id) = $req2->content =~ m/ href="http:\/\/www.upload-thai.com\/dl\/([^"]+?)" /ig;
  29.  
  30. #print 'http://www.upload-thai.com/dl/'.$id;
  31. print Dumper($req);
  32. sleep();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement