It is currently Wed Jun 19, 2019 3:19 pm


All times are UTC




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 9:20 pm 
Offline

Joined: Thu Jun 24, 2010 3:58 pm
Posts: 411
Location: [email protected]
New PuTTY patch used to fix the well known issue from Dynamips, that is killing the CPU before you press a enter inside the console (more saying, to save your CPU from blowing up ;)) )

Jeremy please create a new %(whatever) used to indicate something like REG-EX "(Console|AUX) - (Dynamips|Qemu|Pemu)" used to create a decent PuTTY title (see my ugly example below used inside console_wrapper)


New putty CLI usage:
Code:
putty_gns3.exe -sr -wt "%d - Console port - [%h:%p]" -telnet %h %p

PuTTY patch used to automatically press a enter key inside the console.... ;)) [making putty a hacked bot]
So, because "it will be ugly" to let it statically defined all the time I've add a CLI argument for that "-sr" from send '\r' ;)
Code:
------------------PUTTY.H-----------------------
Line 527
/* Telnet options */
int telnet_push_enter;         /* used to push a '\r' inside the socket */
------------------CMDLINE.C-----------------------
Line 288
if (!strcmp(p, "-wt")) {
   RETURN(2);
   SAVEABLE(0);
   strncpy(cfg->wintitle, value, sizeof(cfg->wintitle));
   cfg->wintitle[sizeof(cfg->wintitle) - 1] = '\0';
   cfg->no_remote_wintitle = 1;
}
if (!strcmp(p, "-sr")) {
   RETURN(1);
   UNAVAILABLE_IN(TOOLTYPE_FILETRANSFER | TOOLTYPE_NONNETWORK);
   SAVEABLE(0);
   cfg->telnet_push_enter = 1;
}
------------------TELNET.C-----------------------
Line 766
/*
* Push a enter key inside the telnet socket
*/
if (telnet->cfg.telnet_push_enter) {
   telnet->bufsize = sk_write(telnet->s, "\r", 1);
}

AHK Code used by me to determine how to name the window from dst TCP port...
Code:
CreateTitle()
   {
    global HOST, PORT, NAME

    If      ((PORT >= 2000) && (PORT <= 2499))
      {
       Return NAME " - Console Port - Dynamips - [" HOST ":" PORT "]"
      }
    Else If ((PORT >= 2500) && (PORT <= 2999))
      {
       Return NAME " - AUX Port - Dynamips - [" HOST ":" PORT "]"
      }
    Else If ((PORT >= 3000) && (PORT <= 3499))
      {
       Return NAME " - Console Port - QEMU - [" HOST ":" PORT "]"
      }
    Else
      {
       Return NAME " - Console Port - [" HOST ":" PORT "]"
      }
   }




Top
 Profile  
 
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 9:26 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Hi,

Concerning SecureCRT, looks like the /N argument has been introduced in last SecureCRT versions? I tested with 6.7.3 and it doesn't work :(

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 9:28 pm 
Offline

Joined: Thu Jun 24, 2010 3:58 pm
Posts: 411
Location: [email protected]
I've test only the last version "of course" - bloody TPB ;))


Top
 Profile  
 
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 9:30 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Quote:
New PuTTY patch used to fix the well known issue from Dynamips, that is killing the CPU before you press a enter inside the console (more saying, to save your CPU from blowing up ;)) )


Wow, that sounds great. Can you send me the new compiled version for Windows?

[EDIT] Nevermind, I overlooked it ;)

Thanks!

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 9:54 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Quote:
I've test only the last version "of course" - bloody TPB ;))


Apparently before SecureCRT 6.4 /NOMENU /NOTOOLBAR and /TITLEBAR params don't work either. I will not include these options by default but users can still manually add them in Preferences.

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 9:55 pm 
Offline

Joined: Thu Jun 24, 2010 3:58 pm
Posts: 411
Location: [email protected]
So, are you agreed to add a new option like %d used to build a nice title ;)


Top
 Profile  
 
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 10:07 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
/N parameter? No this is the same issue with older SecureCRTs.

What I'll add in our next release (which is supposed to be fixes only) is the press enter in the securecrt.vbs script + the patched Putty. I do not want to change things too much for now. The release after we could integrate your console wrapper and the script loading toolbar (or something similar). Would you like an account on redmine.gns3.net to propose your changes directly in our tracker? I think you have many ideas and that would save me some time ;)

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 10:15 pm 
Offline

Joined: Thu Jun 24, 2010 3:58 pm
Posts: 411
Location: [email protected]
grossmj wrote:
/N parameter? No this is the same issue with older SecureCRTs.
What I'll add in our next release (which is supposed to be fixes only) is the press enter in the securecrt.vbs script + the patched Putty. I do not want to change things too much for now. The release after we could integrate your console wrapper and the script loading toolbar (or something similar).

Ok, then the VBScript can deal all by it self (name+enter)
What about TeraTerm? It is working fine with ttermpro.exe /T /W="%d" %h:%p (/W="window title")

grossmj wrote:
Would you like an account on redmine.gns3.net to propose your changes directly in our tracker? I think you have many ideas and that would save me some time ;)

aaaaaaaaa, Why not! ;)

Thanks!


Top
 Profile  
 
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 10:19 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Quote:
What about TeraTerm? It is working fine with ttermpro.exe /T /W="%d" %h:%p (/W="window title")


I am testing it right now. If this works for me I'll integrate the change as well.

Quote:
aaaaaaaaa, Why not! ;)


Ok, I will let you know when this is done.

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Telnet Wrapper Script For GNS3 - Console/AUX + Other Stu
PostPosted: Tue May 08, 2012 10:27 pm 
Offline

Joined: Thu Jun 24, 2010 3:58 pm
Posts: 411
Location: [email protected]
tranzitwww wrote:
So, are you agreed to add a new option like %d used to build a nice title ;)
What I mean here is that GNS3 in terminal settings -> terminal command should have a new option that can be used by users like %h=ip %p=tcp port %n=hostname
called ex: %x="Dynamips - Console port", "Dynamips - AUX port", "Qemu - Console port" or "Pemu - Console port"...

Quote:
Ok, I will let you know when this is done.
Ok Thanks!




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO