| Server IP : 216.92.14.13 / Your IP : 216.73.216.171 Web Server : Apache System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : rmlac2fmr ( 1040637) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/bin/ |
Upload File : |
#!/usr/local/bin/perl
use strict;
use warnings;
use JSON::RPC::Simple;
use Data::Dumper;
my $debug = 0;
# If the first arg is -d (for debug)
# We should really use something like GetOpt::Long but we'll switch to that
# when this script evolves into a more complex being
if (defined $ARGV[0] && $ARGV[0] eq "-d") {
shift; # remove -d so checks below works
$debug = 1;
}
if (@ARGV < 2) {
print "Usage: jsonrpc-simple <URL> <method> [<arg1> <value1>] ...\n";
exit -1;
}
if (@ARGV & 1) {
print "Odd number of keys and values.. can't continue\n";
exit -1;
}
my $url = shift;
my $client = JSON::RPC::Simple->connect($url, {
debug => $debug
});
my $method = shift;
print Dumper($client->$method({@ARGV}));