403Webshell
Server IP : 172.67.220.81  /  Your IP : 216.73.216.210
Web Server : Apache
System : Linux semi1.us.cloudlogin.co 5.10.244-xeon-hst #1 SMP Sun Sep 14 17:09:20 UTC 2025 x86_64
User : xessglobal ( 271017)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : ON
Directory :  /bin/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /bin/tinyrepl
#!/usr/bin/perl

use strictures 1;
use Eval::WithLexicals;
use Term::ReadLine;
use Data::Dumper;
use Getopt::Long;

GetOptions(
  "plugin=s" => \my @plugins
);

$SIG{INT} = sub { warn "SIGINT\n" };

{ package Data::Dumper; no strict 'vars';
  $Terse = $Indent = $Useqq = $Deparse = $Sortkeys = 1;
  $Quotekeys = 0;
}

my $eval = @plugins
 ? Eval::WithLexicals->with_plugins(@plugins)->new
 : Eval::WithLexicals->new;

my $read = Term::ReadLine->new('Perl REPL');
while (1) {
  my $line = $read->readline('re.pl$ ');
  exit unless defined $line;
  my @ret; eval {
    local $SIG{INT} = sub { die "Caught SIGINT" };
    @ret = $eval->eval($line); 1;
  } or @ret = ("Error!", $@);
  print Dumper @ret;
}

__END__

=head1 NAME

tinyrepl - Tiny REPL

=head1 SYNOPSIS

    $ tinyrepl
    re.pl$ "s" x 5
    "sssss"
    re.pl$ exit

    $ tinyrepl --plugin HintPersistence

=head1 DESCRIPTION

tinyrepl is a minimal pure-Perl REPL.  It is just a small wrapper
around L<Eval::WithLexicals>.

=head1 OPTIONS

=over 4

=item C<--plugin=>

Loads a plugin into the REPL. See L<Eval::WithLexicals/with_plugins>.

=back

=head1 SUPPORT

See L<Eval::WithLexicals> for support and contact information.

=head1 AUTHORS

See L<Eval::WithLexicals> for authors.

=head1 COPYRIGHT AND LICENSE

See L<Eval::WithLexicals> for the copyright and license.

=cut

Youez - 2016 - github.com/yon3zu
LinuXploit