Find Jobs
Hire Freelancers

Perl telnet script

$30-250 USD

In Progress
Posted about 13 years ago

$30-250 USD

Paid on delivery
Hi, I need a custom PERL script that opens a telnet connection to another application, executes a command and interpretes the result. The first line in the script should be #!/path/to/perl -w followed by use strict;. Clean and good code is therefore required and warnings about uninitialized variables or else are not accepted. The script has to run on CentOS 5.5 which comes with an older version of perl which is 5.8.8. Only the use of one addtional module is allowed which is Net::Telnet (Version 3.03-5) as available on CentOS 5.5. The script shall take three command line parameters: ip, port and common_name It establishes the connection to ip and port and sends the command "kill <common_name>". The resulting line gets interpreted. If the connection with the identifier <common_name> could be killed by the remote service you give back the exit code 0, if you couldn't connect via telnet the code 1, if the connection couldn't be killed 2, if the result of your command times out 3. The remote application that is contacted via telnet is the openvpn management console. Examples: Common name found, connection killed (example with telnet client): ##################################################################### [TEST]tunnel1 etc # telnet localhost 4242 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. INFO:OpenVPN Management Interface Version 1 -- type 'help' for more info kill sgloeckner SUCCESS: common name 'sgloeckner' found, 1 client(s) killed quit Connection closed by foreign host. ##################################################################### Common name not found, connection not killed (example with telnet client): ##################################################################### [TEST]tunnel1 etc # telnet localhost 4242 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. INFO:OpenVPN Management Interface Version 1 -- type 'help' for more info kill sgloeckner ERROR: common name 'sgloeckner' not found quit Connection closed by foreign host. ##################################################################### As in all our biddings - since we're an incorporated german company - the service provider has to be able to issue a valid invoice for his work - either with local tax payer id or vat code (if it's a company). Best regards, Sebastian
Project ID: 986987

About the project

7 proposals
Remote project
Active 13 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of GERMANY
Fentange, Germany
5.0
53
Member since Dec 10, 2008

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.