Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.13
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
libterm-readline-gnu-perl /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
fileman
8.29
KB
-rw-r--r--
perlsh
11.76
KB
-rw-r--r--
pftp
10.21
KB
-rw-r--r--
ptksh+
2.83
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ptksh+
#!/usr/bin/perl -w # # POD documentation after __END__ # This program is contributed by Achim Bohnet. It demonstrates how to # use the callback functions in the GNU Readline Library. This script # is essentially equivalent with executing the following lines in # `eg/perlsh'; # $PerlSh::term->tkRunning(1); # use Tk; # $mw = MainWindow->new(); # # Hiroo Hayashi require 5.003_92; use Tk; # Bug: Require script does not work with all possibilities of # missing/existing new MainWindow and MainLoop. Therefore # I have disabled it. # Mainloop in script would be the end. No readline :-( #require shift @ARGV if (@ARGV); package Tk::RL; use Tk; use Term::ReadLine; $name = 'ptksh+'; $mw = MainWindow->new() unless ($mw = Tk::Exists 'MainWindow'); $mw->title($name); $mw->iconname($name); $mw->protocol('WM_DELETE_WINDOW' => \&quit); ##### Gnu Readline Stuff ##### my $term = new Term::ReadLine $name; my $attribs = $term->Attribs; $term->callback_handler_install("$name> ", \&doline); $mw->fileevent(STDIN,'readable', $attribs->{callback_read_char}); sub quit { $mw->fileevent(STDIN,'readable',''); $term->callback_handler_remove(); $mw->destroy; } my $outstream = $attribs->{outstream}; sub doline { my $line = shift; if (defined $line) { if ($line =~ /^p\s(.*)$/) { $line = "print $1, \"!\\n\";"; } eval "{package main; $line }"; print $outstream "$@\n" if $@; $term->add_history($line) if $line ne ""; $attribs->{line_buffer} = ''; # needed for eval errors } else { quit() unless defined $line; } } # To test if Tk is not blocked: Tk::RL::tk_active<return> sub tk_active { print STDERR "I'm working behing the scene\n"; $mw->after(1500,\&tk_active); } #$mw->after(1500,\&tk_active); package main; # be gentle if 'required' script defined $mw; $mw = $Tk::RL::mw if not defined $mw; MainLoop; print "\n"; __END__ =head1 NAME ptksh+ - Simple perl/Tk shell that uses the Gnu Readline features =head1 SYNOPSIS % ptksh+ ptksh+> $b=$mw->Button(-text=>'hello',-command=>sub{print STDERR 'hello'}) ptksh+> $b->pack; ptksh+> ... ptksh+> ^D % =head1 DESCRIPTION This (very) simple perl/Tk shell allows you to enter perl/Tk commands interactively. Additionally it supports command line editing and keeps a history of previously entered commands. It requires C<Term-Readline-Gnu> to be installed. You can exit ptksh+ with ^D or using your Window Manager 'Close' item. =head1 SEE ALSO Term::Readline, Term::Readline::Gnu, Tk, perldebug =head1 AUTHOR Achim Bohnet <F<ach@mpe.mpg.de>>, URL:L<http://www.xray.mpe.mpg.de/~ach/> Copyright (c) 1996-1997 Achim Bohnet. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
Close