Perl and telnet connection

Hi,
Sorry, I dont speak english very well. I want to create some program to check telnet connection. I base on old perl scripts "Telnet_Crack":
# CONNECTION.
sub connect {
print "\n\nATTEMPTING CONNECTION TO $HOST.";
$telnet = new Net::Telnet (Timeout => 5, Errmode => "return");
$telnet-> open("$HOST");
print "\n\nOK ... CONNECTED!!!\n\n";
# DO_IT.
sub do_it{
print "\nTRYING : USERNAME = $USER PASSWORD = $PASS";
&success if $telnet -> login($USER,$PASS);
$telnet -> close;
# SUCCESS.
sub success {
open (LOGFILE, ">>TELNET_CRACK") or die "\a\nERROR UNABLE TO OPEN TELNET_CRACK.\n $!";
print "\a\a\a";
print "\nUSERNAME: $USER has PASSWORD: $PASS on $HOST.\n\n\n\n\n";
print LOGFILE "\nUSERNAME: $USER has PASSWORD: $PASS on $HOST.\n\n";
close LOGFILE;
&quit;
But Telnet_Crack not working. Everything is ok in log:
Nov 9 14:07:07 jlug login[9086]: pam_unix(login:session): session opened for user us3r by (uid=0)
Nov 9 14:07:12 jlug xinetd[9004]: EXIT: telnet pid=9085 duration=6(sec)
Nov 9 14:07:12 jlug login[9086]: pam_unix(login:session): session closed for user us3r
But telnet_crack not execute success function. Maybe something is wrong with PAM? In gentoo Telnet_Crack work fine.. Of course, it's pretty good for users (dictionary attack doesnt work).
Maybe smb known, how i can check result from telnet login?

use Net::Telnet;
$telnet = new Net::Telnet ( Timeout=>10);
$telnet->open('10.2.60.156');
$telnet->login('user', 'pass') and &ok;
$telnet->close;
sub ok {
print "Success\n";
return 0;
I get timed-out waiting for password prompt at test3.pl line 5. Anybody known what  I must do?

Similar Messages

  • Log ssh and telnet connections

    Hi guys,
    if you want to log all ssh and telnet connections to your system, what entry do you put in /etc/syslog.conf file?
    Thank you

    Google is your friend:
    http://www.unix.com/solaris/128310-logging-incoming-connections-solaris-10-a.html

  • [HELP!] perl and unicode are not working

    I have a database that I know supports Unicode, I'm trying to read/write data using perl and I'm pulling my hair out! I have a table populated with some Unicode characters that I inserted using TOAD and this sql statement:
    insert into jay_test values (-101, 'Τη γλώσσα μου έδωσ');
    When I look at the data in TOAD everything looks great, when I read the data out using .NET it works great, when I read it out using PERL the result if a bunch of question marks.
    Here is the code:
    #!/usr/bin/perl -w
    <%
    use utf8;
    use DBD::Oracle;
    $Response->AddHeader("Content-Type","text/html; charset=utf-8;");
    my $dbh2 = DBI->connect($db, $user, $password, {AutoCommit => 1});
    my $x = $dbh2->ora_can_unicode();
    my $sth = $dbh2->prepare("SELECT i, j from jay_test order by i desc");
    $sth->execute();
    while (my ($i, $j) = $sth->fetchrow_array()) {
         debug("i = $i, j = $j");
         $html .= qq{
              <tr>
                   <td>$i</td>
                   <td>$j</td>
              </tr>
    The result is this:
    -101      ?? ?????? ??? ????
    As a note: the line "$dbh2->ora_can_unicode();" returns a value of 3, which means that Unicode should be fully supported.
    Anyone who can point me in the right direction will be my savior! Thanks in advance

    The OS is Red Hat Enterprise Linux Server release 5.4 (Tikanga)
    The Kernel is 2.6.18
    Database is 10g
    Toad is 10.1.1.8
    Here are the parameters that PERL is seeing:
    my $params = $dbh2->ora_nls_parameters();
    print_r($params); return;
    [Hash] {
         NLS_CALENDAR => GREGORIAN
         NLS_CHARACTERSET => AL32UTF8
         NLS_COMP => BINARY
         NLS_CURRENCY => $
         NLS_DATE_FORMAT => DD-MON-RR
         NLS_DATE_LANGUAGE => AMERICAN
         NLS_DUAL_CURRENCY => $
         NLS_ISO_CURRENCY => AMERICA
         NLS_LANGUAGE => AMERICAN
         NLS_LENGTH_SEMANTICS => BYTE
         NLS_NCHAR_CHARACTERSET => AL16UTF16
         NLS_NCHAR_CONV_EXCP => FALSE
         NLS_NUMERIC_CHARACTERS => .,
         NLS_SORT => BINARY
         NLS_TERRITORY => AMERICA
         NLS_TIMESTAMP_FORMAT => DD-MON-RR HH.MI.SSXFF AM
         NLS_TIMESTAMP_TZ_FORMAT => DD-MON-RR HH.MI.SSXFF AM TZR
         NLS_TIME_FORMAT => HH.MI.SSXFF AM
         NLS_TIME_TZ_FORMAT => HH.MI.SSXFF AM TZR
    Do i need to issue a PERL command to change one of these NLS params?
    I appreciate the help everyone, this issue is killing me!

  • Holding telnet connection id or ref.

    Hi.
    I am using builtin telnet connection from labview. Created 3 .net dll's open, readWrite and close. Using these dll's in teststand.  The problem is , how to pass the telent ref/id from 'open' step to 'readWrite'(next step in teststand). 
    When i use VI's directly the telnet Ref/id is just an Number(datatype) . I can store and pass it to next step by using a (number type) variable.
    But when i create .net dll it is a container. I have created a custom data type and using variable of this custom data type. The readWrite step throws an error not valid Ref/id.
    The id seems to be a pointer. I think it is invalid after the 'open' step  is executed.
    Please let me know how to handle?
    Thanks in advance.
    Test engineer

    Hi,
    Every time I have the same error. I looking for the /log, and all i OK, and /tmp the last file is one day before the Telnet fails.
      I see the logs and anywhere i can't see some error.
    If you want to see any log, I can can put it hear.
    Thanks a lot
    Xavier

  • TELNET: Failed to establish TELNET connection

    Hi,
    I've launched a NetShow job against several routers. The job result is successful but appears the following message:
    Deploy successful (TELNET: Failed to establish TELNET connection to 10.253.49.34  - Cause: Authentication failed on device 3 times. Primary Login Succeeded /  Primary Enable Succeeded )
    We have only access by ssh to the routers, no telnet is configured, so that message is OK. But, how could I configure CW to try only ssh connection mode to routers? Swiches use telnet instead of ssh...so I should configure only telnet as connection mode...
    Thanks in advance.

    You can set the protocol order for Configuration Management applications such as Archive Management, Config Editor, and NetConfig jobs to download configurations and to fetch configurations. For NetShow, you can set the protocol order to download configurations.
    You havent mentioned the LMS version as path to this feature would differ. I will provide navigation link for both lms 3 and 4.
    LMS 3.x :
    CiscoWorks LMS Portal > RME > Admin > Config Mgmt > Transport Settings
    LMS 4.x :
    Admin > Collection Settings: Config > Config Transport Settings
    -Thanks

  • [한글/Korean/IOX/ASR9k] IP-TELNETD-3-CON_TIMEOUT The telnet connection from x.x.x.x has been Timed out에 대한 설명

    IP-TELNETD-3-CON_TIMEOUT The telnet connection from x.x.x.x has been Timed out에 대한 설명에 대한 한글 자료입니다.
    비슷한 경우가 있는 경우에는 이 문서을 참조하신 후 SR을 열어 주시면 감사하겠습니다.

    You can power cycle the router and it should revert to the old IP address. But yes internally you should be able to telnet/ssh/or console with no issues. The secondary address with the proper NAT statement should work just fine! Here is a sample config:
    interface fastEthernet0/1
    ip address 2.2.2.2 255.255.255.0 secondary
    ip address 1.1.1.1 255.255.255.0

  • Perl and Ruby

    I was running OmniDiskSweeper to see what was taking up space on my iMac. I saw "Perl" and "Ruby". I'm wondering what they are, and do I need them?
    Thank you,
    Romelle

    Perl and Ruby come installed with Leopard 10.5; each has a different purpose and
    could be used by users and developers. Usually they use little space and don't need
    to be removed if looking for big space wasters on the computer.
    +Warning: OS X expects and sometimes relies on frameworks and software shipped+
    +with the system. It would be a very bad idea to remove the system Ruby (or Perl.)+
    You can't just drag items from the System to Trash; some will mess up the OS X if
    they are removed. There should be Developer pages about Perl and Ruby; the
    versions installed as part of OS X 10.5, are probably best left alone...!
    Sometimes, these obscure sounding things may have a connection to something you
    do, or have done, in your computer. If you use X11 (for open office, etc) some of these
    items may be helpful or required as support items. If you installed X11, you'd have to
    use Terminal to uninstall it; same as with Ruby. A small input error in Terminal, and the
    OS X may no longer work; so a re-install of OS X would be required. People who are
    developers, may replace an older Perl or Ruby, with a newer one, for a project; the OS
    looks for these to be there as part of its working system. Whether you do is secondary.
    Ruby is a programming and scripting language. An open source utility, of a sort.
    This kind of thing can be used with Xcode and Terminal, to customize the OS.
    Perl is used by the system, too; and anything you find from the original OS X install
    should be left alone... it helps scripting and other functions for the OS and the user.
    There are several different background things essential to OS X functions.
    • *An Introduction to Perl for Mac OS X:*
    http://www.mactech.com/articles/mactech/Vol.18/18.09/PerlforMacOSX/index.html
    • *An Introduction to Ruby for Mac OS X:*
    http://www.io.com/~jimm/writing/IntrotoRuby.html
    Some of these kinds of items would require careful consideration before removal;
    and for some users, who use and need them, there are newer versions. To remove
    Ruby, there is a command-line (terminal) level of access to handle it.
    Since parts of OS X are very integrated, one has to be careful if removing stuff.
    Software can use these items; so support for them is included with OS X 10.5.
    You may be able to search a Wiki site to get more detailed information on each.
    {However, as a matter of course, since they were installed with the original computer
    software, they should not be a concern in what may be a need to remove folders &
    files created by the user. A few dozen music files, and/or images can occupy much
    more hard disk drive space than a few support software files.}
    Have you archived music, photo, movie, and other files to an off-computer device?
    Large libraries of images and music can be moved from the computer and then
    the original files can be deleted; just be sure to double-check files in the new location
    before trashing them off the computer's internal hard disk drive.
    So, I'd not mess with anything in the OS X that was not user installed.
    And to have a complete bootable backup clone on externally enclosed
    hard disk drive, before attempting to change items in the computer' OS
    where you have originals without a backup, is really asking for troubles.
    But that's just my opinion:
    Full speed ahead and swat the mosquitoes.
    Good luck & happy computing!

  • How to implement SMTP Email ping / Telnet connection to a SMTP Server?

    Dear all,
    i want to implement an advanced email address check where a connection to target smtp server is performed and the reply from the server is read back.
    This program should check if the user exists and is accepted by the smtp server.
    An alternative/part of the solution could be to perform a TELNET connection to the smtp host and get the output without sending an email.
    Has anybody done this before?
    Thanks a lot in advance.
    Regards,
    Adam

    Adam,
    Check this program.
    Cheers,
    Thomas.
    REPORT ZTMG_TEST LINE-SIZE 132.
    * Test SAP FTP functions
    DATA: BEGIN OF MTAB_DATA OCCURS 0,
    LINE(132) TYPE C,
    END OF MTAB_DATA.
    DATA: MC_PASSWORD(20) TYPE C,
    MI_KEY TYPE I VALUE 26101957,
    MI_PWD_LEN TYPE I,
    MI_HANDLE TYPE I.
    START-OF-SELECTION.
    MC_PASSWORD = 'password'.
    DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.
    *-- FTP_CONNECT requires an encrypted password to work
    CALL 'AB_RFC_X_SCRAMBLE_STRING'
    ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
    ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
    ID 'DSTLEN' FIELD MI_PWD_LEN.
    CALL FUNCTION 'FTP_CONNECT'
    EXPORTING
    USER = 'userid'
    PASSWORD = MC_PASSWORD
    HOST = 'servername'
    RFC_DESTINATION = 'SAPFTP'
    IMPORTING
    HANDLE = MI_HANDLE
    EXCEPTIONS
    NOT_CONNECTED = 1
    OTHERS = 2.
    CHECK SY-SUBRC = 0.
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    HANDLE = MI_HANDLE
    COMMAND = 'dir'
    TABLES
    DATA = MTAB_DATA
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4.
    IF SY-SUBRC = 0.
    LOOP AT MTAB_DATA.
    WRITE: / MTAB_DATA.
    ENDLOOP.
    ELSE.
    * do some error checking.
    ENDIF.
    CALL FUNCTION 'FTP_DISCONNECT'
    EXPORTING
    HANDLE = MI_HANDLE
    EXCEPTIONS
    OTHERS = 1.

  • How do I do a telnet connection with a Switch using name or DNS?

    Hi guys, I am configuring a telnet connection but i dont know how to do with a name for example: suppose you have a sw names SW1, i want to do ping to that name and do a telnet connection with that name... I dont know if you can understand me, please can somebody help me?... Thanks.
    PD1: i have a DNS server
    PD2: it is just a practice in PKT.

    I want to show the topology, maybe you can undestand better. So, i cant connect PC6 with sw by telnet with also thename BOG_SN1_SW, but server an PC5 cant connect to BOG_SN1_SW.
    PD: all topology is in OSPF 

  • New FIOS customer with dropped VOIP calls and Internet connection

    I am a new FIOS customer. Got my 50/25 connection a week ago, switching from a TWC 6/1 connection. Ever since the new connection, I've had numerous issues.
    My VOIP (Ooma) connection constantly drops and re-connects during conversations
    I've had random Internet connection losses, which picks up again after a few minutes
    My home alarm starts chirping every once in a while
    I've contacted Verizon several times due to these problems and have received varying answers with no resolution of the problem.
    The first time I spoke with support, the tech logged into my router and changed the WiFi channel saying that would fix the problem. It didn’t.
    The second time I contacted them, the tech ran a bunch of diagnostics and said everything looked fine so it must be an IP address conflict with my devices, because I had a couple devices using static IP addresses. He said everythinf should be DHCP and the last two digits could not be higher than 99 (192.168.1.99). He said FIOS does not support 3-digit numbers at the end.
    So I changed all my devices to DHCP and ran some online VOIP tests. It showed a packet loss of 2-5% and MOS score of 1 (which is bad). I was still getting dropped connections, so I disconnected all devices and connected just one computer to the router and tested again. I was still getting packet loss.
    Then I called support a third time, this time the tech said there were no 2-digit IP restrictions and that he was detecting there was no UPS baterry backup for the ONT which was probably causing the problem, so he dispatched a field tech to my house.
    Today the field tech came (same guy as before), he took one look at the box and said it was too close to my Electric meter and the RF from the meter was causing interference to the FIOS connection and resulting in dropped connection.
    He moved the ONT to another location and said that should fix it.
    Well, I'm still seeing packet loss and low MOS score when I run the VOIP test.
    I don't know how much of what the techs are saying is true and how much is made up stuff.
    Has anyone had similar issues and have thoughts on solutions or likely causes for dropped VOIP calls and connections? Could RF be causing this?
    I thought going from a 6/1 Cable connection to a 50/25 FIOS connection would be awesome, but this has turned out to be a nightmare, and I may have to switch back to cable if the problem is not resolved.
    I would appreciate any help.
    Thanks!

    Don't know where the packet loss is happening. I ran the VOIP test on myspeed.visualware.com and it shows a packet loss of 2-5% at different times and a MOS score of 1.
    The report says MOS should be around 4 for good VOIP calls.
    The Verizon tech who came to the house just blamed the electric meter box for RF interference and move the ONT farther away.
    My concern is that I'm getting different answers from different techs at Verizon.
    Regarding IP addresses. The Router shows a DHCP range from 192.162.1.2 to 192.168.1.254 as available for devices on the network. So, if I need to assign a static IP to a device should I use a number below 99 or above 151?
    Thanks!

  • What is the better way to open and close connection in bean

    Hello, may i ask about the best way to open and close the connection?
    At the first, the connection code is store in Conn class bean. The JSP page will call a method in Process bean to process the query and update of database. the Process bean is using th Conn to connect to database.
    In my process bean, it have a method for each type of sql like select, insert, update, and delete for each tables. Each method will call the Conn to open and close the connection. The jsp page can simply call a method retrieve or update records.
    However, when calling the processUpdate method, it is a method that update a group of tables base on the query result of another group of tables and calculation. If I calling the query method in the same bean file, it will open and close the connection many times (more than 1000 times). After open and close the connection several times, the connection to mySQL will be fail.
    Currently, i include 2 method in Process that is only calling the Conn to open the connection and close connection. When calling the openConnection method, it will also set the boolean connected in the class to true and call Conn to open connection. When calling the closeConnection method, it will also set the boolean connected in the class to false and call Conn to close connection.
    After that, i add some change to the query method which is when the connected is false, it will open the connection by calling the Conn and close the connection themself. If the connected is true, it will not call the Conn to open and close the connection because it already connected to the database.
    Now, i when i calling the query method in jsp, it can open the connection and close the connection individually. When i call the processUpdate in the jsp, this method will calling the openConnection before calling the query and calling closeConnection at the end. It not only faster the process(less open and close), it also no cause the connect to mySQL fail error again. However, it also make the coding in the bean file more longer and complex.
    Is there have any better solution?

    Use connection pooling. This will put the connection management in the hands of the webserver, not your code. Check out this post:
    http://forum.java.sun.com/thread.jspa?threadID=741788&messageID=4252932#4252932

  • Open discoverer report in new browser window and without connections page

    Hi All,
    We are using Oracle 11g Discoverer 11.1.1.4.  Requirement is to open the discoverer report in a new browser window and without connections page.
    When we are running discoverer reports with this parameters we unwantedly get the connections page of the discoverer plus which we don't want.
    Went through the documentation given in this page and followed it still the issue persists, and i see couple of threads with my issue and no updates.
    This excerpt is from the documentation available in the link
    " _plus_popup=true and framedisplaystyle=embedded launches Discoverer Plus in a new pop-up browser window that contains the Plus applet embedded in it "
    http://www.art2dec.com/documentation/docs/oas10g1012/linux/bi.1012/b13918/urlstart.htm
    and Here is what we use to invoke our reports.
    http://ipaddress:port/discoverer/plus?cn=cf_123&_plus_popup=TRUE&framedisplaystyle=EMBEDDED&wb=disc_wb_1
    Request the forum users from PRO discoverer group to help me out of this issue and expect a good discussion on this.
    Thanks in advance

    Closing the thread
    We were able to achieve by changing the browser settings in the IE 8 Browser. Disabled Tabbed browsing.

  • I am using Windows 7 Pro, 64 bit on a brand new PC, and cannot connect to the iTunes store using iTunes version 10.  HELP!!

    Ok, so after purchasing a new computer, with windows 7 pro, 64 bit, I tried downloading the newest iTunes, which at the time was 10.2.1 (i believe).  After installation, everything seemed to work, except that iTunes was unable to securely connect to the internet, use home sharing, or validate my computer.
    As troubleshooting, I first ran msconfig, and then turned OFF all programs that boot at start up EXCEPT itunes and quicktime.  After a restart, i opened itunes again, and got the same result.  That led me to believe that iTunes was NOT being blocked by another program on my machine.  I am currently running itunes 10.7 successfully on a Windows 7 32 machine at work.  Anyhow, for grins, I tried to install version 9 on the new computer, and it installed perfectly, and immediately connected to the itunes store, leading me to believe that there is nothing wrong with my software configuration (not sure if this is a safe assumption or not).  I then tried to let iTunes update itself using the automated update function.  It tried to update itself to the most current version, then 10.6.  Again, iTunes was unable to connect to the iTunes store.  I HAVE tried disabling the anti-virus software (AVG), but that made no difference. 
    I have since gone back and reinstalled iTunes 9.  Here's the catch though.  When I reinstalled using version 9, I had to redo all my library files.  I'm about 1/2 way through my CD's, and now have a substantial library file going.  The last time I let iTunes update itself to 10.6, once I realized that it was not going to connect to the store, I uninstalled iTunes, and reinstalled ver. 9.  However, when I did this, it told me it could no longer open the library file, because it was a newer .itl or .xml (i believe it was one of those two extensions) library file.  At that point, I basically started everything over again, using version 9, and have been importing CD's like a madman at night.
    Here are my questions:
    1) Is there a way to make a copy of the files that store my library info, so that if my upgrade to ver 10 IS NOT SUCCESSFUL, I can restore ver 9, but still have all of the album art work, playlists (when I import music, I create a playlist with the artists' name, and store things that way), etc. in tact? 
    2) What else can I try (firewall settings, internet options, etc.) to try and get version to to successfully install?  I would really like to get all the benfits of the newer versions.
    3) When I tried to get apple tech support before, they wanted me to pay a ridiculous 69$ fee for phone support.  I just bought an iphone 5....this should entitle me to a fresh 90 days of phone support, right?  The reason I ask here is that I could hardly understand the "tech" that answered the phone when I called for tech support last time, and to be honest, it really ****** me off that they wanted to try and milk me for another 69 bucks....I've purchased every iPhone since the 3Gs came out (pre-ordered at that), and have nearly gone broke purchasing music from their iTunes store....heck, maybe they're doing me me a favor not letting me into the store, huh?
    Any help or ideas would be greatly appreciated,
    -Brian

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • We just added a new printer and bluetooth connection to our iMac.  Now iTunes does not recognize our iPads as devices.  Have already tried restarting everything.  Any other suggestions?

    We just added a new printer and bluetooth connection to our iMac.  Now iTunes does not recognize our iPads as devices.  Have already tried restarting everything.  Any other suggestions?

    You can try the steps recommended here: http://www.apple.com/support/ipad/assistant/itunes/

  • What is the diff.b/w UD connect and DB Connect

    Hai,
              can any one expalin diff.b/w UD connect and DB connect...
    Regards

    Hi Lakshmi,
    please check the threads below
    UD and DB Connect
    DB connection,UD Connect Document
    Also this
    http://help.sap.com/saphelp_nw04s/helpdata/en/a6/c0e51914e842e19bda39dbbe4fe78c/frameset.htm
    hope this helps!
    Regards
    Chandru

Maybe you are looking for

  • Web Service Connector Export Issue

    Hi, Version: Crystal Xcelsius Designer 4.5 I have a Crystal Xcelsius dashboard with a Web Service Connector component on it, as well as some graph components. When I "Preview" the file, the display works fine and the graph is filled with data obtaine

  • No Material Master replication from R/3 to CRM

    Hallo guys, i've got no replication of material master, haven't tried any other object except customizing but customizing is triggered from CRM and was replicated fine. Can anybody help me how can i debug the replication process from R/3? Thanks for

  • Operating reference system will not boot.

    hi! bought the iphone 4s in Italy and it does not work. Operating reference system will not boot. Change of firmware and restore did not help. How can I change it while in Russia. Can I send in the mail store??

  • Is there a table/report that shows a list of the original tcodes vs tcodes?

    How to I find out the calling tcode of a transaction other than using SE93? e.g ABUM 's original tcode is AB01. Is there a table/report that shows a list of the original tcodes vs tcodes?

  • Hi people,please help! iphone playing up!

    hi peops i have an iphone 3GS and its playing up....ie: when texting i get multiple letters and sometimes a tab comes up with different forgien letters,if i press delete it will mostly delete my message if i dont quickly press another letter or the s