Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

IP address matching and telnet connections

by Anonymous Monk
on Sep 14, 2001 at 02:03 UTC ( [id://112319]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I really need HELP Please!

I had done a program that search user IP address but I do need another program to add something like :

If the IP Address found, my program need to be able to connect directly to telnet using the IP address that I found from the datafile.

I was able to connect directly to telnet but the problem is the connection is to one machine and did not connect to the specific IP address that I found in my first program.

I would appreciate your help.
Thanks

2001-09-14 Edit by Corion : Changed title from MATCHING USER ID WITH USER IP ADDRESS and CONNECT DIRECTLY TO TELNET USING MATCHING IP ADDRESS, added formatting

  • Comment on IP address matching and telnet connections

Replies are listed 'Best First'.
Re: IP address matching and telnet connections
by jlongino (Parson) on Sep 14, 2001 at 02:52 UTC
    You really don't give enough information here. You say you want to telnet to the IPs you've found. What are you trying to do once you've initiated the connection? Do you just want to get as far as the login prompt and then close the connection? Are you trying to actually login and do something? If so, you're going to need logins and passwords.

    We'll try to help if we can get more info. Some samples of your code will help too.

    @a=split??,'just lose the ego and get involved!';
    for(split??,'afqtw{|~'){print $a[ord($_)-97]}
      Or maybe the plan was to get to the login and potentially try to crack the password...I don't think I would trust this either way.

      _______________________________________________________
      s&&q+\+blah+&oe&&s<hlab>}map{s}&&q+}}+;;s;\+;;g;y;ahlb;veaD;&&print;
        Damain, I had "NO" intention to crack password or whatever you think of. I don't have to do such a thing because I have access to every folders! This program is for those who do not know how to use system command. Thank you for your reply.
      Thank you for the reply. My program is to be able to use telnet in window without using all these UNIX commands to change directories or retrieve folders/files and etc. First, My program is to use HTML FORM to get user IP address using search user ID(query to database file).when I do search --I found user IP address and NEXT, once I found the user IP address, I need to use the user IP to open telnet using the IP address--using HTML FORM such as: Please enter user IP address: If I enter the IP address for instance 10.0.0.0, then I would be able to connect directly to the IP address 10.0.0.0. NEXT, after getting connected to the IP address 10.0.0.0, (it means connected to the telnet) thru' window. I need to be able to create another HTML form to be able to enter query instead of command. I do need to enter password or anythingelse because this program is restricted to specific personnel. What I means is the people did not know how to use all these UNIX command such as change directories and retrieve file/folders. SO I need to get something to be able to do it in HTML form, replacing the system command. such as: Please choose: option 1: write option 2: read option 3: quit these option must be in the drop down menu in the HTML form.When I choose option 1, I would be able to write into the file and soforth. I had done some part of the program but my biggest problem is to use HTML FORM to enter user IP address and get connected. I would appreciate your help. Thanks
        If I understand your situation correctly, this is almost exactly what Cisco provides in part of their web interface to their low-end routers.

        It will take me a while, but when I get a chance will check the HTML to see if is legal for me to publicly reproduce.   If so, I'll post here.   I *think* it might do what you want. (or I may just be fullabeans {grin})
            cheers,
            Don
            striving toward Perl Adept
            (it's pronounced "why-bick")

        Update: After a bit of pondering, I don't think the Cisco code/markup would help you, since it executes on each local device and requires a webserver running locally as well.   You appear to want a CGI interface to telnet to *other* hosts, which is a little different matter.   Unless you employ rhosts or the like, you'll have to pass user ID and Password to do this.

        As jlongino suggests, you may want to look into the CPAN modules CGI.pm and Net::Telnet.

Re: IP address matching and telnet connections
by jlongino (Parson) on Sep 15, 2001 at 01:59 UTC
    If you are trying to communicate with Cisco routers, you might want to look at Net::Telnet::Cisco. If you're not into Cisco's, you can always use Net::Telnet and grow your own.

    A search on this site for Net::Telnet produces some links that may be useful as well. Maybe Using Net::Telnet::Cisco or Using Net::Telnet::Cisco toTelnet from Host to Host.

    @a=split??,'just lose the ego and get involved!';
    for(split??,'afqtw{|~'){print $a[ord($_)-97]}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://112319]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found