403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/bin/yamlpp-events
#!/usr/bin/perl
use strict;
use warnings;

use Encode;
use YAML::PP::Parser;
use YAML::PP::Common;
use Getopt::Long;
Getopt::Long::Configure('bundling');
GetOptions(
    'help|h' => \my $help,
    'module|M=s' => \my $module,
) or usage(1);

usage(0) if $help;

$module ||= 'YAML::PP';
if ($module eq 'YAML::PP') {
    $module = 'YAML::PP::Parser';
}
elsif ($module eq 'YAML::PP::LibYAML') {
    require YAML::PP::LibYAML::Parser;
    $module = 'YAML::PP::LibYAML::Parser';
}
elsif ($module eq 'YAML::PP::Ref') {
    require YAML::PP::Ref;
    $module = 'YAML::PP::Ref::Parser';
}

my ($file) = @ARGV;

my $parser = $module->new(
    receiver => sub {
      my ($self, undef, $event) = @_;
      print encode_utf8(YAML::PP::Common::event_to_test_suite($event, { flow => 1 })), "\n";
    },
    $file ? (reader => YAML::PP::Reader::File->new) : (),
);
if ($file) {
    $parser->parse_file($file);
}
else {
    my $yaml;
    $yaml = do { local $/; <STDIN> };
    $yaml = decode_utf8($yaml);
    $parser->parse_string($yaml);
}

sub usage {
    my ($rc) = @_;
    print <<"EOM";
Usage:

    $0 [options] < file
    $0 [options] file

Options:
    --module -M  Module to use for parsing. YAML::PP (default),
                 YAML::PP::LibYAML or YAML::PP::Ref
EOM
    exit $rc;
}

Youez - 2016 - github.com/yon3zu
LinuXploit