mirror of git://git.qorg11.net/lainsafe.git
Finally, you don't have to type https:// (or http://) in the --server
feature. By default, this corrects the URL to https, so if your lainsafe instance is running in port 80 (Tor, or something) (altough is very possible you copypasted the onion address so it contains the http:// thing). That's a TODO. I'll fix it one of these days.
This commit is contained in:
parent
706d73d151
commit
d1908fe776
Binary file not shown.
|
@ -109,14 +109,17 @@ $file = $ARGV[@ARGV-1];
|
|||
|
||||
die "File does not exist\n" unless -e $file;
|
||||
|
||||
my $url_to_upload = $DEFAULT_SERVER . "/upload.cgi";
|
||||
|
||||
my $req;
|
||||
|
||||
# Fake user agent
|
||||
$ua->agent("Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0");
|
||||
|
||||
# modify url if necessary
|
||||
substr($DEFAULT_SERVER, 0, 0, 'https://') unless $DEFAULT_SERVER =~ /^(http|https):\/\//;
|
||||
# check if server is running lainsafe
|
||||
|
||||
my $url_to_upload = $DEFAULT_SERVER . "/upload.cgi";
|
||||
if (!$ua->get($url_to_upload)->is_success) {
|
||||
print "$url_to_upload is not running lainsafe. (--get-response to check the error)\n";
|
||||
print $ua->get($url_to_upload)->decoded_content if $get_response;
|
||||
|
|
Loading…
Reference in New Issue