Re: :Component::Client::FTP problem
I have dropped by at #poe, but they didn't know either. below is the main file I hope it gets through as it should... The try function is called in the irc::irc_public() function This is the third version I'm building of ReaperBot. The first one could only do one thing at a time. Then I build the second one, which uses forking, but sometimes the database gets fucked up cause different processes read/write the same file, so here I am, writing it in POE and got stuck :( thanks Bart #!/usr/bin/perl -w use strict; use POE qw (Session Component::IRC); use Time::HiRes qw (gettimeofday); use try; my $nickname = 'ReaprBot2'; my $username = 'ReaperBot'; my $ircname = 'ReaperBot, by daReaper'; my $server = 'irc.scholieren.com'; my $port = 6667; my $channel = '#ftp4RB'; our database; my leeches; readDB(); sub irc::_start { my ($kernel, $object) = _[KERNEL, OBJECT]; $kernel-post('irc', 'register', 'all'); $kernel-post('irc', 'connect', { Debug = 1, Nick = $nickname, Server = $server, Port = $port, Username = $username, Ircname = $ircname, } ); } sub irc::irc_001 { my $kernel = $_[KERNEL]; $kernel-post('irc', 'join', $channel); } sub irc::irc_connect { print Connected to server\n; } sub irc::irc_public { my ($kernel, $who, $chan, $msg) = _[KERNEL, ARG0 .. ARG2]; if ($msg =~ /^\[#?FTP4Warez\]/i) { addAd($kernel, $msg, $who); } if ($msg =~ /\@try ?(.+)?/i) { if ($1) { try-try($kernel, $1, $who); } } } POE::Component::IRC-new('irc') or die n! $!\n; POE::Session-new('irc' = [qw(_start irc_001 irc_public irc_connect)]); $poe_kernel-run(); sub readDB { open (DATABASE, ftp4db.txt); my $counter = 0; while (DATABASE) { chomp; my entry = split (/\t/); for (my $x = 0; $x entry; $x++) { $database[$counter][$x] = $entry[$x]; } $counter ++; } close DATABASE; } sub writeDB { open (DATABASE, ftp4db.txt); for (my $x = 0; $x database; $x++) { for (my $y = 0; $y {$database[$x]}; $y++) { print DATABASE $database[$x][$y]\t; } print DATABASE \n; } close (DATABASE); } sub addAd { my ($kernel, $msg, $who) = _; my ($nick, $ident, $host) = split(/!|/, $who); my ftpsite; while ($msg =~ /]]+/) { $msg =~ s/]]+/]/; } while ($msg =~ /\[\[+/) { $msg =~ s/\[\[+/\[/; } while ($msg) { if ($msg =~ s/[^[]*\[([^\]]*)\]//) { push ftpsite, $1; } else { $msg =~ s/ ?\[?//; push ftpsite, $msg; $msg = ; } } my %ftp = getInfo(ftpsite); if ($ftp{download}[0] $ftp{look}[0] $ftp{address} $ftp{port}) { if (!$ftp{request}) { $ftp{request} = - } if (!$ftp{other}) { $ftp{other} = - } if (!$ftp{upload}) { $ftp{upload}[0] = -; $ftp{upload}[1] = - } $ftp{owner} = $nick; insertDB(%ftp); } } sub getInfo { my ftpsite = _; my %info; my $counter = 0; shift ftpsite; foreach(ftpsite) { if ($counter == 0) { $info{name} = $_; } elsif (/^(port(:)?( )?)?(\d*)$/i) { $info{port} = $4; } elsif (/^(([^ ]*)|({?your nick}?))\/(([^ ]*)|({?your nick}?))$/i) { my $user = $1; my $pass = $4; if ($user =~ /upload/i || $pass =~ /upload/i) { $info{upload}[0] = $user; $info{upload}[1] = $pass; } elsif ($user =~ /look|browse/i || $pass =~ /look|browse/i) { $info{look}[0] = $user; $info{look}[1] = $pass; } elsif (!$info{download}[0]) { $info{download}[0] = $user; $info{download}[1] = $pass; } } elsif (/^(ip:[
RE: :Component::Client::FTP problem
I have dropped by at #poe, but they didn't know either. it's a good place to hang out anyway :) I see the call to try but if I recall the error was with the try module, not its caller, so that was the code you needed to show. if Rocco's suggestion didn't work then come back to #poe. -Original Message- From: Bart van den Burg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 10:42 AM To: [EMAIL PROTECTED] Subject: Re: :Component::Client::FTP problem I have dropped by at #poe, but they didn't know either. below is the main file I hope it gets through as it should... The try function is called in the irc::irc_public() function This is the third version I'm building of ReaperBot. The first one could only do one thing at a time. Then I build the second one, which uses forking, but sometimes the database gets fucked up cause different processes read/write the same file, so here I am, writing it in POE and got stuck :( thanks Bart #!/usr/bin/perl -w use strict; use POE qw (Session Component::IRC); use Time::HiRes qw (gettimeofday); use try; my $nickname = 'ReaprBot2'; my $username = 'ReaperBot'; my $ircname = 'ReaperBot, by daReaper'; my $server = 'irc.scholieren.com'; my $port = 6667; my $channel = '#ftp4RB'; our @database; my @leeches; readDB(); sub irc::_start { my ($kernel, $object) = @_[KERNEL, OBJECT]; $kernel-post('irc', 'register', 'all'); $kernel-post('irc', 'connect', { Debug = 1, Nick = $nickname, Server = $server, Port = $port, Username = $username, Ircname = $ircname, } ); } sub irc::irc_001 { my $kernel = $_[KERNEL]; $kernel-post('irc', 'join', $channel); } sub irc::irc_connect { print Connected to server\n; } sub irc::irc_public { my ($kernel, $who, $chan, $msg) = @_[KERNEL, ARG0 .. ARG2]; if ($msg =~ /^\[#?FTP4Warez\]/i) { addAd($kernel, $msg, $who); } if ($msg =~ /\@try ?(.+)?/i) { if ($1) { try-try($kernel, $1, $who); } } } POE::Component::IRC-new('irc') or die n! $!\n; POE::Session-new('irc' = [qw(_start irc_001 irc_public irc_connect)]); $poe_kernel-run(); sub readDB { open (DATABASE, ftp4db.txt); my $counter = 0; while (DATABASE) { chomp; my @entry = split (/\t/); for (my $x = 0; $x @entry; $x++) { $database[$counter][$x] = $entry[$x]; } $counter ++; } close DATABASE; } sub writeDB { open (DATABASE, ftp4db.txt); for (my $x = 0; $x @database; $x++) { for (my $y = 0; $y @{$database[$x]}; $y++) { print DATABASE $database[$x][$y]\t; } print DATABASE \n; } close (DATABASE); } sub addAd { my ($kernel, $msg, $who) = @_; my ($nick, $ident, $host) = split(/!|@/, $who); my @ftpsite; while ($msg =~ /]]+/) { $msg =~ s/]]+/]/; } while ($msg =~ /\[\[+/) { $msg =~ s/\[\[+/\[/; } while ($msg) { if ($msg =~ s/[^[]*\[([^\]]*)\]//) { push @ftpsite, $1; } else { $msg =~ s/ ?\[?//; push @ftpsite, $msg; $msg = ; } } my %ftp = getInfo(@ftpsite); if ($ftp{download}[0] $ftp{look}[0] $ftp{address} $ftp{port}) { if (!$ftp{request}) { $ftp{request} = - } if (!$ftp{other}) { $ftp{other} = - } if (!$ftp{upload}) { $ftp{upload}[0] = -; $ftp{upload}[1] = - } $ftp{owner} = $nick; insertDB(%ftp); } } sub getInfo { my @ftpsite = @_; my %info; my $counter = 0; shift @ftpsite; foreach(@ftpsite) { if ($counter == 0) { $info{name} = $_; } elsif (/^(port(:)?( )?)?(\d*)$/i) { $info{port} = $4; } elsif (/^(([^ ]*)|({?your nick}?))\/(([^ ]*)|({?your nick}?))$/i) { my $user = $1; my $pass = $4; if ($user =~ /upload/i || $pass =~ /upload/i) { $info{upload}[0] = $user; $info{upload}[1] = $pass; } elsif ($user =~ /look|browse/i || $pass =~
Perl/POE Job in Washington DC Area (Reston VA)
I am forwarding this email to the list for a collegue. I previously posted it to [EMAIL PROTECTED] We are urgently seeking to fill this position; so if you are interested, please respond quickly. The job is a full-time position in Reston VA. BTW, I work at AOL, with the group that runs the AOL Web Proxy. I have been here a year and I think it is an excellent place to work, with alot of people to learn from. We need a Perl programmer. We are looking for experience with sockets, non-blocking IO, DBI, and whatever other knowlege you can bring to the table. Perl is not a scripting language to us; it is the Swiss- Army-Chainsaw RAD Programming language we all know and love. -- Forwarded message -- From: Brian Harvell [EMAIL PROTECTED] Subject: Systems Programmer needed I apologize up front if this is totally inappropriate. I'm on the dc-sage list and these come across every so often and people don't seem to mind. I have an open position for a systems programmer with a concentration on perl. I have included the job listing below. If you are interested please send your resume directly to [EMAIL PROTECTED] Thanks Brian Job Responsibilities: AOL's Internet Access Team is a small, highly focused group of Systems Administrators and Systems Programmers responsible for architecting, deploying, maintaining, and scaling the world's largest internet cache. The team runs thousands of Unix systems located in multiple sites throughout the world, systems which handle billions of web requests per day. The team members activities include long-term planning of new remote data centers, in-depth weekly system performance analyses and performance tuning, problem troubleshooting, scaling to accommodate growth demands, evaluation and integration of new software. An additional Unix Systems Programmer is needed to assist in development of monitoring tools, data analysis, systems administration support tools, system architecture planning, and other tasks. Skills Required: Several years of perl/shell programming in a unix environment, unix systems administration background, web server configuration and maintenance, CGI scripting and familiarity with HTML and the HTTP protocol, good communication skills. Skills Desired: Unix performance monitoring and tuning, system and network troubleshooting, data analysis experience, C, C++, Java -- Brian Harvell[EMAIL PROTECTED] http://ToolBoy.com/ echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc