You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cacert-webdb/cacertupload.pl

36 lines
863 B
Perl

#!/usr/bin/perl
use LWP::UserAgent;
$ua = LWP::UserAgent->new(agent => 'Translingo Client 1.0');
use HTTP::Request::Common qw(POST);
$ua->cookie_jar({});
my $req = POST 'http://www.translingo.org/login.php',
[
];
# ggf. Referer faken
$req->referer('http://www.translingo.org/');
$ua->request($req)->as_string;
# 1.Test - Umgebung
my $req = POST 'http://www.translingo.org/login.php',
[
username => 'support@cacert.org',
password => 'ilccSSAMNIemU',
submit => 'Login',
];
# ggf. Referer faken
$req->referer('http://www.translingo.org/');
$ua->request($req)->as_string;
# 2.Test - FileUpload
my $req = POST 'http://www.translingo.org/upload.php',
Content_Type => 'form-data',
Content => [
project => '1',
fileformat => '1',
pofile => ["messages.po" => "messages.po", 'Content_Type' => "application/x-gettext"],
];
print $ua->request($req)->as_string;