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.47
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 /
libpoe-perl /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
README.samples
165
B
-rw-r--r--
create.perl
7.81
KB
-rw-r--r--
fakelogin.perl
5.22
KB
-rw-r--r--
forkbomb.perl
5.95
KB
-rw-r--r--
names.perl
10.81
KB
-rw-r--r--
objmaps.perl
4.5
KB
-rw-r--r--
objsessions.perl
4.29
KB
-rw-r--r--
packagesessions.perl
3.97
KB
-rw-r--r--
queue.perl
4.11
KB
-rw-r--r--
selects.perl
13.31
KB
-rw-r--r--
sessions.perl
7.56
KB
-rw-r--r--
signals.perl
4.33
KB
-rw-r--r--
tcp_watermarks.perl
4.88
KB
-rw-r--r--
thrash.perl
16.92
KB
-rw-r--r--
watermarks.perl
5.97
KB
-rw-r--r--
wheels2.perl
4.81
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : fakelogin.perl
#!/usr/bin/perl -w # This is a fake login prompt I wrote after noticing that someone's # IRC 'bot was probing telnet whenever I joined a particular channel. # It wasn't originally going to be a POE test, but it turns out to be # a good exercise for wheel event renaming. use strict; use lib '../lib'; use IO::Socket; use POE qw( Wheel::SocketFactory Wheel::ReadWrite Driver::SysRW Filter::Line Filter::Stream ); #============================================================================== # This is the login state group. #------------------------------------------------------------------------------ # Enter the "login" prompt state. Prompt user, and wait for input. sub login_login_start { my ($session, $heap) = @_[SESSION, HEAP]; print "Session ", $session->ID, " - entering login state\n"; # switch the output filter to stream $heap->{wheel}->set_output_filter( POE::Filter::Stream->new ); # switch the input event to login_input $heap->{wheel}->event( InputEvent => 'login_input' ); # display the prompt $heap->{wheel}->put('login: '); } sub login_login_input { my ($kernel, $session, $heap, $input) = @_[KERNEL, SESSION, HEAP, ARG0]; print "Session ", $session->ID, " - received login input\n"; if ($input ne '') { $kernel->yield('password_start'); } else { $kernel->yield('login_start'); } } #============================================================================== # This is the password state group. sub login_password_start { my ($session, $heap) = @_[SESSION, HEAP]; print "Session ", $session->ID, " - entering password state\n"; # switch output filter to stream $heap->{wheel}->set_output_filter( POE::Filter::Stream->new ); # switch input event to password_input $heap->{wheel}->event( InputEvent => 'password_input' ); # display the prompt $heap->{wheel}->put('Password: '); } sub login_password_input { my ($kernel, $session, $heap, $input) = @_[KERNEL, SESSION, HEAP, ARG0]; print "Session ", $session->ID, " - received password input\n"; # switch output filter to line $heap->{wheel}->set_output_filter( POE::Filter::Line->new ); # display the response $heap->{wheel}->put('Login incorrect'); # move to the login state $kernel->yield('login_start'); } sub login_error { my ($session, $heap, $operation, $errnum, $errstr) = @_[SESSION, HEAP, ARG0, ARG1, ARG2]; $errstr = 'Client closed connection' unless $errnum; print( "Session ", $session->ID, ": login: $operation error $errnum: $errstr\n" ); delete $heap->{wheel}; } #============================================================================== # This is the main entry point for the login session. sub login_session_start { my ($kernel, $session, $heap, $handle, $peer_addr, $peer_port) = @_[KERNEL, SESSION, HEAP, ARG0, ARG1, ARG2]; print "Session ", $session->ID, " - received connection\n"; # start reading and writing $heap->{wheel} = POE::Wheel::ReadWrite->new( 'Handle' => $handle, 'Driver' => POE::Driver::SysRW->new, 'Filter' => POE::Filter::Line->new, 'ErrorEvent' => 'error', ); # hello, world!\n $heap->{wheel}->put('FreeBSD (localhost) (ttyp2)', '', ''); $kernel->yield('login_start'); } sub login_session_create { my ($handle, $peer_addr, $peer_port) = @_[ARG0, ARG1, ARG2]; POE::Session->create( inline_states => { _start => \&login_session_start, # general error handler error => \&login_error, # login prompt states login_start => \&login_login_start, login_input => \&login_login_input, # password prompt states password_start => \&login_password_start, password_input => \&login_password_input, }, # start parameters args => [ $handle, $peer_addr, $peer_port], ); undef; } #============================================================================== package main; my $port = shift; if (not defined $port) { print( "*** This program listens on port 23 by default. You can change\n", "*** the port by putting a new one on the command line. For\n", "*** example, to listen on port 10023:\n", "*** $0 10023\n", ); $port = 23; } POE::Session->create( inline_states => { '_start' => sub { my $heap = $_[HEAP]; $heap->{wheel} = POE::Wheel::SocketFactory->new( BindPort => $port, SuccessEvent => 'socket_ok', FailureEvent => 'socket_error', Reuse => 'yes', ); }, 'socket_error' => sub { my ($session, $heap, $operation, $errnum, $errstr) = @_[SESSION, HEAP, ARG0, ARG1, ARG2]; print( "Session ", $session->ID, ": listener: $operation error $errnum: $errstr\n" ); }, 'socket_ok' => \&login_session_create, }, ); $poe_kernel->run(); __END__
Close