View difference between Paste ID: A9pVsFxN and TmVvg98x
SHOW: | | - or go back to the newest paste.
1
diff -rup putty-src-orig\CMDLINE.C putty-src\CMDLINE.C
2
--- putty-src-orig\CMDLINE.C	Thu Dec 23 17:32:28 2010
3
+++ putty-src\CMDLINE.C	Fri Jun 22 20:23:55 2012
4
@@ -6,6 +6,9 @@
5
 #include <stdio.h>
6
 #include <assert.h>
7
 #include <stdlib.h>
8
+/***************Patch GNS3 PuTTY *******************/
9
+#include <time.h>
10
+/***************************************************/
11
 #include "putty.h"
12
 
13
 /*
14
@@ -165,6 +168,12 @@ static int cmdline_check_unavailable(int
15
 int cmdline_process_param(char *p, char *value, int need_save, Config *cfg)
16
 {
17
     int ret = 0;
18
+	/***************Patch GNS3 PuTTY *******************/
19
+    char       buf[80];
20
+    time_t     now = time(0);
21
+    struct tm  tstruct;
22
+    tstruct = *localtime(&now);
23
+	/***************************************************/
24
 
25
     if (!strcmp(p, "-load")) {
26
 	RETURN(2);
27
@@ -226,6 +235,73 @@ int cmdline_process_param(char *p, char 
28
 	strncpy(cfg->username, value, sizeof(cfg->username));
29
 	cfg->username[sizeof(cfg->username) - 1] = '\0';
30
     }
31
+	/***************Patch GNS3 PuTTY *******************/
32
+    if (!strcmp(p, "-wt")) {
33
+    RETURN(2);
34
+    SAVEABLE(0);
35
+    strncpy(cfg->wintitle, value, sizeof(cfg->wintitle));
36
+    cfg->wintitle[sizeof(cfg->wintitle) - 1] = '\0';
37
+    cfg->no_remote_wintitle = 1; //No remote title
38
+	cfg->win_name_always    = 1; //Don't change the title when is minimized
39
+    }
40
+	if (!strcmp(p, "-gns3")) {
41
+	RETURN(2);
42
+	SAVEABLE(0);
43
+	cfg->close_on_exit      = 1; //Never, Don't close the window
44
+	cfg->warn_on_close      = 0; //No warn before closing the window
45
+	cfg->beep               = 0; //No beeps (Iritating!)
46
+	cfg->alt_f4             = 1; //Allow Alt+F4 to close the window
47
+	cfg->alt_space          = 1; //Allow Alt+Space to display the system menu
48
+	cfg->blinktext          = 1; //Allow text blinking effect
49
+	cfg->no_remote_resize   = 1; //No remote resize
50
+	cfg->savelines          = 2500; //Scroll Lines Buffer
51
+	cfg->push_one_enter     = 1; //Push a enter key on telnet/serial console
52
+	cfg->no_annoying_msgbox = 1; //Replace MsgBox errors with a message in the title
53
+	cfg->reconnect_after_error = atoi(value); //Automatically reconnect a inactive session on error after x seconds
54
+	}
55
+    if (!strcmp(p, "-skin")) {
56
+    RETURN(2);
57
+    SAVEABLE(0);
58
+	switch(atoi(value))
59
+		{
60
+		case 1: //night theme
61
+			cfg->colours[0][0] = 15;  cfg->colours[0][1] = 15;  cfg->colours[0][2] = 15;  //Defauld Foreground
62
+			cfg->colours[2][0] = 255; cfg->colours[2][1] = 255; cfg->colours[2][2] = 255; //Defauld Background
63
+			break;
64
+		case 2: //desert theme
65
+			cfg->colours[0][0] = 255; cfg->colours[0][1] = 255; cfg->colours[0][2] = 255; //Defauld Foreground
66
+			cfg->colours[2][0] = 51;  cfg->colours[2][1] = 51;  cfg->colours[2][2] = 51;  //Defauld Background
67
+			break;
68
+		case 3: //matrix theme
69
+			cfg->colours[0][0] = 27;  cfg->colours[0][1] = 255; cfg->colours[0][2] = 27;  //Defauld Foreground
70
+			cfg->colours[2][0] = 30;  cfg->colours[2][1] = 30;  cfg->colours[2][2] = 30;  //Defauld Background
71
+			break;
72
+		case 4: //Gold theme
73
+			cfg->colours[0][0] = 255; cfg->colours[0][1] = 190; cfg->colours[0][2] = 27;  //Defauld Foreground
74
+			cfg->colours[2][0] = 51;  cfg->colours[2][1] = 51;  cfg->colours[2][2] = 51;  //Defauld Background
75
+			break;
76
+		default: //default theme
77
+			cfg->colours[0][0] = 187; cfg->colours[0][1] = 187; cfg->colours[0][2] = 187; //Defauld Foreground
78
+			cfg->colours[2][0] = 0;   cfg->colours[2][1] = 0;   cfg->colours[2][2] = 0;   //Defauld Background
79
+			break;
80
+		}
81
+	}
82
+	if (!strcmp(p, "-log")) { //don't use "/, \, |, *, ?, <, >, :" in -wt variable! :D
83
+    RETURN(2);
84
+    SAVEABLE(0);
85
+    strftime(buf, sizeof(buf), "%d.%b.%y_%H.%M.%S", &tstruct);
86
+	if(!strlen(cfg->wintitle)){
87
+		sprintf(cfg->logfilename.path, "%s\\%s_%s.log\0", value, buf, cfg->host);     // ex: C:\dir\14.Jun.12_21.40.29_127.0.0.1.log
88
+		}
89
+	else{
90
+		sprintf(cfg->logfilename.path, "%s\\%s_%s.log\0", value, buf, cfg->wintitle); // ex: C:\dir\14.Jun.12_21.40.29_R1.log
91
+	}
92
+	cfg->logtype  = 1; //printable output
93
+    cfg->logflush = 1; //flush log file
94
+    cfg->logxfovr = 0; //append (anyway the log is created with the current date/time and will be imposible to have a append event)
95
+    }
96
+	/***************************************************/
97
+
98
     if (!strcmp(p, "-loghost")) {
99
 	RETURN(2);
100
 	UNAVAILABLE_IN(TOOLTYPE_NONNETWORK);
101
diff -rup putty-src-orig\CONFIG.C putty-src\CONFIG.C
102
--- putty-src-orig\CONFIG.C	Fri Jan 14 19:57:00 2011
103
+++ putty-src\CONFIG.C	Fri Jun 22 19:39:52 2012
104
@@ -2385,4 +2385,34 @@ void setup_config_box(struct controlbox 
105
 			  sshbug_handler, I(offsetof(Config,sshbug_maxpkt2)));
106
 	}
107
     }
108
+	/***************Patch GNS3 PuTTY *******************/
109
+    /*
110
+     * The GNS3 panel.
111
+     */
112
+    str = dupprintf("Advanced options for GNS3 usage", appname);
113
+    ctrl_settitle(b, "GNS3", str);
114
+    sfree(str);
115
+	
116
+	s = ctrl_getset(b, "GNS3", "adv-options1", NULL);
117
+    ctrl_radiobuttons(s, "Push a enter key inside a telnet/serial console:", 'p', 2,
118
+			  HELPCTX(no_help),
119
+			  dlg_stdradiobutton_handler,
120
+			  I(offsetof(Config, push_one_enter)),
121
+			  "Yes", I(1),
122
+			  "No", I(0),
123
+			  NULL);
124
+	s = ctrl_getset(b, "GNS3", "adv-options2", NULL);
125
+    ctrl_radiobuttons(s, "Replace all MsgBox errors with a message in title bar:", 'm', 2,
126
+			  HELPCTX(no_help),
127
+			  dlg_stdradiobutton_handler,
128
+			  I(offsetof(Config, no_annoying_msgbox)),
129
+			  "Yes", I(1),
130
+			  "No", I(0),
131
+			  NULL);
132
+	s = ctrl_getset(b, "GNS3", "adv-options3", "Seconds between auto-restarts (0 to turn off)");
133
+    ctrl_editbox(s, "Automatically reconnect a inactive session after:", 'r', 11,
134
+			  HELPCTX(no_help),
135
+			  dlg_stdeditbox_handler, I(offsetof(Config,reconnect_after_error)),
136
+		     I(-1));
137
+	/***************************************************/
138
 }
139
diff -rup putty-src-orig\PUTTY.H putty-src\PUTTY.H
140
--- putty-src-orig\PUTTY.H	Sat Jun 25 18:37:32 2011
141
+++ putty-src\PUTTY.H	Tue Jun 19 23:56:46 2012
142
@@ -1,5 +1,6 @@
143
 #ifndef PUTTY_PUTTY_H
144
 #define PUTTY_PUTTY_H
145
+#define SECURITY_WIN32
146
 
147
 #include <stddef.h>		       /* for wchar_t */
148
 
149
@@ -523,6 +524,11 @@ struct config_tag {
150
     char ssh_nc_host[512];	       /* host to connect to in `nc' mode */
151
     int ssh_nc_port;		       /* port to connect to in `nc' mode */
152
     /* Telnet options */
153
+	/***************Patch GNS3 PuTTY *******************/
154
+	int push_one_enter;            /* used to pust a '\r' inside the socket */
155
+	int no_annoying_msgbox;        /* used to replace msgbox errors with messages in title window */
156
+	int reconnect_after_error;     /* used to automatically reconnect a telnet/serial session on error after x seconds */
157
+	/***************************************************/
158
     char termtype[32];
159
     char termspeed[32];
160
     char ttymodes[768];		       /* MODE\tVvalue\0MODE\tA\0\0 */
161
@@ -773,6 +779,9 @@ int char_width(Context ctx, int uc);
162
 void do_scroll(Context, int, int, int);
163
 #endif
164
 void set_title(void *frontend, char *);
165
+/***************Patch GNS3 PuTTY *******************/
166
+void set_title_plus_error(void *frontend, char *error);
167
+/***************************************************/
168
 void set_icon(void *frontend, char *);
169
 void set_sbar(void *frontend, int, int, int);
170
 Context get_ctx(void *frontend);
171
diff -rup putty-src-orig\SETTINGS.C putty-src\SETTINGS.C
172
--- putty-src-orig\SETTINGS.C	Tue Sep 13 08:35:56 2011
173-
+++ putty-src\SETTINGS.C	Thu Jun 21 21:31:11 2012
173+
+++ putty-src\SETTINGS.C	Sat Jun 30 15:20:53 2012
174
@@ -475,6 +475,11 @@ void save_open_settings(void *sesskey, C
175
     write_setting_s(sesskey, "WinTitle", cfg->wintitle);
176
     write_setting_i(sesskey, "TermWidth", cfg->width);
177
     write_setting_i(sesskey, "TermHeight", cfg->height);
178
+	/***************Patch GNS3 PuTTY *******************/
179
+    write_setting_i(sesskey, "GNS3PushOneEnter", cfg->push_one_enter); //Save the values in regs :D
180
+    write_setting_i(sesskey, "GNS3NoMsgBoxError", cfg->no_annoying_msgbox);
181
+    write_setting_i(sesskey, "GNS3AutoReconnect", cfg->reconnect_after_error);
182
+	/***************************************************/
183
     write_setting_fontspec(sesskey, "Font", cfg->font);
184
     write_setting_i(sesskey, "FontQuality", cfg->font_quality);
185
     write_setting_i(sesskey, "FontVTMode", cfg->vtmode);
186
@@ -792,8 +797,13 @@ void load_open_settings(void *sesskey, C
187
     gppi(sesskey, "DisableBidi", 0, &cfg->bidi);
188
     gppi(sesskey, "WinNameAlways", 1, &cfg->win_name_always);
189
     gpps(sesskey, "WinTitle", "", cfg->wintitle, sizeof(cfg->wintitle));
190
-    gppi(sesskey, "TermWidth", 80, &cfg->width);
191-
-    gppi(sesskey, "TermHeight", 24, &cfg->height);
191+
192
+    gppi(sesskey, "TermWidth", 110, &cfg->width); //default was 80
193
     gppi(sesskey, "TermHeight", 24, &cfg->height);
194-
+    gppi(sesskey, "TermHeight", 29, &cfg->height); //default was 24
194+
195
+    gppi(sesskey, "GNS3NoMsgBoxError", 0, &cfg->no_annoying_msgbox); //default is unused
196
+    gppi(sesskey, "GNS3AutoReconnect", 0, &cfg->reconnect_after_error); //default is unused
197
+	/***************************************************/
198
     gppfont(sesskey, "Font", &cfg->font);
199
     gppi(sesskey, "FontQuality", FQ_DEFAULT, &cfg->font_quality);
200
     gppi(sesskey, "FontVTMode", VT_UNICODE, (int *) &cfg->vtmode);
201
diff -rup putty-src-orig\TELNET.C putty-src\TELNET.C
202
--- putty-src-orig\TELNET.C	Mon Nov 24 17:51:42 2008
203
+++ putty-src\TELNET.C	Mon Jun 18 20:10:54 2012
204
@@ -765,6 +765,16 @@ static const char *telnet_init(void *fro
205
      */
206
     update_specials_menu(telnet->frontend);
207
 
208
+	/***************Patch GNS3 PuTTY *******************/
209
+	/*
210
+	 * Push a enter key inside the telnet socket
211
+	 */
212
+    if (telnet->cfg.push_one_enter) {
213
+    logevent(telnet->frontend, "client:\t *** Press a '\\r' inside the Telnet socket ***");
214
+	telnet->bufsize = sk_write(telnet->s, "\r", 1);
215
+	}
216
+	/***************************************************/
217
+
218
     /*
219
      * loghost overrides realhost, if specified.
220
      */
221
diff -rup putty-src-orig\VERSION.C putty-src\VERSION.C
222
--- putty-src-orig\VERSION.C	Sat Nov 26 17:45:52 2011
223
+++ putty-src\VERSION.C	Sat Jun 30 16:05:11 2012
224-
+++ putty-src\VERSION.C	Fri Jun 22 21:36:55 2012
224+
225
 char sshver[] = "PuTTY-Custom-r" STR(SVN_REV);
226
 
227
 #else
228
-
229
-char ver[] = "Unidentified build, " __DATE__ " " __TIME__;
230
-char sshver[] = "PuTTY-Local: " __DATE__ " " __TIME__;
231
+/***************Patch GNS3 PuTTY *******************/
232
+char ver[] = "GNS3 build 0.62.1, " __DATE__ " " __TIME__;
233
+//char ver[] = "GNS3 build 0.62.1 [Standalone] , " __DATE__ " " __TIME__;
234
+char sshver[] = "PuTTY-GNS3-0.62.1";
235
+/***************************************************/
236
 
237
 #endif
238
 
239
diff -rup putty-src-orig\WINDOWS\PUTTY.RC putty-src\WINDOWS\Putty.rc
240
--- putty-src-orig\WINDOWS\PUTTY.RC	Tue Oct 04 15:13:28 2005
241
+++ putty-src\WINDOWS\Putty.rc	Sat Jun 30 16:03:07 2012
242-
+++ putty-src\WINDOWS\Putty.rc	Fri Jun 22 20:42:26 2012
242+
@@ -1,10 +1,247 @@
243-
@@ -1,10 +1,246 @@
243+
244
+//
245
+#include "resource.h"
246
+
247
+#define APSTUDIO_READONLY_SYMBOLS
248
+/////////////////////////////////////////////////////////////////////////////
249
+//
250
+// Generated from the TEXTINCLUDE 2 resource.
251
+//
252
 #include "rcstuff.h"
253
+#include "win_res.h"
254
+
255
+/////////////////////////////////////////////////////////////////////////////
256
+#undef APSTUDIO_READONLY_SYMBOLS
257
+
258
+/////////////////////////////////////////////////////////////////////////////
259
+// English (U.S.) resources
260
+
261
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
262
+#ifdef _WIN32
263
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
264
+#pragma code_page(1252)
265
+#endif //_WIN32
266
+
267
+/////////////////////////////////////////////////////////////////////////////
268
+//
269
+// Icon
270
+//
271
+
272
+// Icon with lowest ID value placed first to ensure application icon
273
+// remains consistent on all systems.
274
+IDI_MAINICON            ICON                    "putty.ico"
275
+IDI_CFGICON             ICON                    "puttycfg.ico"
276
+
277
+/////////////////////////////////////////////////////////////////////////////
278
+//
279
+// Dialog
280
+//
281
+
282
+IDD_ABOUTBOX DIALOGEX 140, 40, 309, 321
283
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
284
+    WS_SYSMENU
285
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
286
+BEGIN
287
+    DEFPUSHBUTTON   "&Close",IDOK,253,303,48,14
288
+    PUSHBUTTON      "View &Licence",IDA_LICENCE,6,303,70,14
289
+    PUSHBUTTON      "Visit &PuTTY Site",IDA_WEB,89,303,70,14
290
+    PUSHBUTTON      "Visit &GNS3 Site",IDA_GNS3_WEB,171,303,70,14
291
+    CTEXT           "PuTTY",IDA_TEXT1,33,1,244,9
292
+    CTEXT           "© 1997-2011 Simon Tatham. All rights reserved.\nModified by Piroi Ninel for the GNS3 project",
293
+                    IDA_TEXT2,49,280,197,19
294
+    CTEXT           " Version Number",IDA_VERSION,16,13,283,10
295
+    LTEXT           "Usage [new options]:\nCLI:    putty -wt   R1   -gns3 5 -skin 3 -log ""C:\\Logs_Dir""\nGNS3: putty -wt ""%d"" -gns3 5 -skin 4 -telnet %h %p\n\n-wt ""New Title""  #Change the window title from command line\n*Will disable remote title",
296
+                    IDA_TEXT3,4,23,283,47
297
+    LTEXT           " -gns3 <NR>     #Advanced PuTTY options tunned for GNS3 usage\n *Don't close the window when the connection is down\n *Disable warning message before closing the window\n *Disable beeps (Irritating!)\n *Allow Alt+F4 to close the window",
298
+                    IDA_TEXT4,1,74,283,41
299
+    LTEXT           " *Disable remote resize\n *Configure scroll lines to 2500 (default was 200)\n *Push a enter key on telnet/serial console (NEW!)\n *Replace all MessageBox errors with a message in the title bar (NEW!)",
300
+                    IDA_TEXT6,1,114,283,41
301
+    LTEXT           " *Automatically reconnect a inactive session on error after <NR> seconds (NEW!)\n    NR = Number of seconds to wait before restarting a inactive session\n    NR = 0 means no automatically restart!",
302
+                    IDA_TEXT9,2,147,283,26
303
+    LTEXT           "-log ""<DIR_PATH>"" #Enable logging to files (.log). Use it after the ""-wt"" option in CLI.\n*Will log all printable output\n*Ex: <DIR_PATH>\\14.Jun.12_21.48.17_R1.log\n*Warning: Do not use '/, \\, |, *, ?, <, >, "", :' in -wt variable!",
304
+                    IDA_TEXT10,3,228,284,33
305
+    LTEXT           " * Toggle ""Always on top"" mode from menu (Right click on title bar)",
306
+                    IDA_TEXT11,2,265,283,11
307
+    LTEXT           "-skin <NR>      #Apply a color theme from 4 hard-coded options\n 1 - Night mode\n 2 - Desert theme\n 3 - Matrix theme :)\n 4 - Gold theme\n X - Default theme",
308
+                    IDA_TEXT5,3,176,283,48
309
+END
310
+
311
+IDD_MAINBOX DIALOG  0, 0, 300, 252
312
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
313
+CAPTION "PuTTY Configuration"
314
+CLASS "PuTTYConfigBox"
315
+FONT 8, "MS Shell Dlg"
316
+BEGIN
317
+END
318
+
319
+IDD_LOGBOX DIALOGEX 100, 20, 300, 118
320
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
321
+    WS_SYSMENU
322
+CAPTION "PuTTY Event Log"
323
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
324
+BEGIN
325
+    DEFPUSHBUTTON   "&Close",IDOK,135,102,44,14
326
+    PUSHBUTTON      "C&opy",IDN_COPY,81,102,44,14
327
+    LISTBOX         IDN_LIST,3,3,294,95,LBS_HASSTRINGS | LBS_USETABSTOPS | 
328
+                    LBS_EXTENDEDSEL | WS_VSCROLL
329
+END
330
+
331
+IDD_LICENCEBOX DIALOGEX 50, 50, 226, 263
332-
+IDD_LICENCEBOX DIALOG  50, 50, 226, 263
332+
333
+    WS_SYSMENU
334
+CAPTION "PuTTY Licence"
335
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
336
+BEGIN
337
+    DEFPUSHBUTTON   "OK",IDOK,98,243,44,14
338-
+    LTEXT           "Copyright © 1997-2011 Simon Tatham",1000,10,10,206,8
338+
+    LTEXT           "Copyright © 1997-2012 Simon Tatham",1000,10,10,206,8
339
+    LTEXT           "Portions copyright Robert de Bath, Joris van Rantwijk, Delian",
340
+                    1001,10,26,206,8
341
+    LTEXT           "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas",
342
+                    1002,10,34,206,8
343
+    LTEXT           "Barry, Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa,",
344
+                    1003,10,42,206,8
345
+    LTEXT           "Markus Kuhn, Colin Watson, and CORE SDI S.A.",1004,10,
346
+                    50,206,8
347
+    LTEXT           "Permission is hereby granted, free of charge, to any person",
348
+                    1005,10,66,206,8
349
+    LTEXT           "obtaining a copy of this software and associated documentation",
350
+                    1006,10,74,206,8
351
+    LTEXT           "files (the ""Software""), to deal in the Software without restriction,",
352
+                    1007,10,82,206,8
353
+    LTEXT           "including without limitation the rights to use, copy, modify, merge,",
354
+                    1008,10,90,206,8
355
+    LTEXT           "publish, distribute, sublicense, and/or sell copies of the Software,",
356
+                    1009,10,98,206,8
357
+    LTEXT           "and to permit persons to whom the Software is furnished to do so,",
358
+                    1010,10,106,206,8
359
+    LTEXT           "subject to the following conditions:",1011,10,114,206,8
360
+    LTEXT           "The above copyright notice and this permission notice shall be",
361
+                    1012,10,130,206,8
362
+    LTEXT           "included in all copies or substantial portions of the Software.",
363
+                    1013,10,138,206,8
364
+    LTEXT           "THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT",1014,10,
365
+                    154,206,8
366
+    LTEXT           "WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,",1015,10,162,
367
+                    206,8
368
+    LTEXT           "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF",1016,10,
369
+                    170,206,8
370
+    LTEXT           "MERCHANTABILITY, FITNESS FOR A PARTICULAR",1017,10,178,
371
+                    206,8
372
+    LTEXT           "PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE",
373
+                    1018,10,186,206,8
374
+    LTEXT           "COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES",
375
+                    1019,10,194,206,8
376
+    LTEXT           "OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,",
377
+                    1020,10,202,206,8
378
+    LTEXT           "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN",1021,10,
379
+                    210,206,8
380
+    LTEXT           "CONNECTION WITH THE SOFTWARE OR THE USE OR",1022,10,218,
381
+                    206,8
382
+    LTEXT           "OTHER DEALINGS IN THE SOFTWARE.",1023,10,226,206,8
383
+END
384
+
385
+
386
+/////////////////////////////////////////////////////////////////////////////
387
+//
388
+// Version
389
+//
390
+
391
+VS_VERSION_INFO VERSIONINFO
392-
+ FILEVERSION 0,6,2,1
392+
+ FILEVERSION 0,62,1,0
393-
+ PRODUCTVERSION 0,6,2,1
393+
+ PRODUCTVERSION 0,62,1,0
394-
+ FILEFLAGSMASK 0xbL
394+
+ FILEFLAGSMASK 0x3L
395
+#ifdef _DEBUG
396-
+ FILEFLAGS 0x9L
396+
+ FILEFLAGS 0x1L
397
+#else
398-
+ FILEFLAGS 0x8L
398+
+ FILEFLAGS 0x0L
399
+#endif
400
+ FILEOS 0x4L
401
+ FILETYPE 0x1L
402
+ FILESUBTYPE 0x0L
403
+BEGIN
404
+    BLOCK "StringFileInfo"
405
+    BEGIN
406
+        BLOCK "080904b0"
407
+        BEGIN
408
+            VALUE "Comments", "Modified by Piroi Ninel for the GNS3 project."
409-
+            VALUE "FileDescription", "SSH, Telnet and Rlogin client - GNS3 Build"
409+
410-
+            VALUE "FileVersion", "0.62.1 GNS3 Build"
410+
+            VALUE "FileDescription", "SSH, Telnet and Rlogin client, GNS3 Build"
411
+            VALUE "FileVersion", "Release 0.62.1, GNS3 Build"
412-
+            VALUE "LegalCopyright", "Copyright © 1997-2011 Simon Tatham."
412+
413
+            VALUE "LegalCopyright", "Copyright © 1997-2012 Simon Tatham."
414-
+            VALUE "PrivateBuild", "0.62.1 GNS3 Build"
414+
415
+            VALUE "ProductName", "PuTTY suite"
416-
+            VALUE "ProductVersion", "0.62.1"
416+
+            VALUE "ProductVersion", "Release 0.62.1, GNS3 Build"
417
+        END
418
+    END
419
+    BLOCK "VarFileInfo"
420
+    BEGIN
421
+        VALUE "Translation", 0x809, 1200
422
+    END
423
+END
424
+
425
+
426
+/////////////////////////////////////////////////////////////////////////////
427
+//
428
+// RT_MANIFEST
429
+//
430
+
431
+1                       RT_MANIFEST             "putty.mft"
432
+
433
+#ifdef APSTUDIO_INVOKED
434
+/////////////////////////////////////////////////////////////////////////////
435
+//
436
+// TEXTINCLUDE
437
+//
438
+
439
+1 TEXTINCLUDE 
440
+BEGIN
441
+    "resource.h\0"
442
+END
443
+
444
+2 TEXTINCLUDE 
445
+BEGIN
446
+    "#include ""rcstuff.h""\r\n"
447
+    "#include ""win_res.h""\r\n"
448
+    "\0"
449
+END
450
+
451
+3 TEXTINCLUDE 
452
+BEGIN
453
+    "\r\n"
454
+    "\0"
455
+END
456
+
457
+#endif    // APSTUDIO_INVOKED
458
+
459
+
460
+/////////////////////////////////////////////////////////////////////////////
461
+//
462
+// DESIGNINFO
463
+//
464
+
465
+#ifdef APSTUDIO_INVOKED
466
+GUIDELINES DESIGNINFO 
467
+BEGIN
468
+    IDD_ABOUTBOX, DIALOG
469
+    BEGIN
470
+        BOTTOMMARGIN, 317
471
+    END
472
+END
473
+#endif    // APSTUDIO_INVOKED
474
+
475
+#endif    // English (U.S.) resources
476
+/////////////////////////////////////////////////////////////////////////////
477
+
478
+
479
+
480
+#ifndef APSTUDIO_INVOKED
481
+/////////////////////////////////////////////////////////////////////////////
482
+//
483
+// Generated from the TEXTINCLUDE 3 resource.
484
+//
485
 
486
-#define APPNAME "PuTTY"
487
-#define APPDESC "SSH, Telnet and Rlogin client"
488
 
489
-#include "win_res.rc2"
490
+/////////////////////////////////////////////////////////////////////////////
491
+#endif    // not APSTUDIO_INVOKED
492
 
493
-#ifndef NO_MANIFESTS
494
-1 RT_MANIFEST "putty.mft"
495
-#endif /* NO_MANIFESTS */
496
diff -rup putty-src-orig\WINDOWS\VERSION.RC2 putty-src\WINDOWS\VERSION.RC2
497
--- putty-src-orig\WINDOWS\VERSION.RC2	Sat Dec 10 12:08:10 2011
498
+++ putty-src\WINDOWS\VERSION.RC2	Mon Jun 18 22:10:39 2012
499
@@ -79,7 +79,7 @@
500
 
501
 /* We can't reliably get the same date and time as version.c, so
502
  * we won't bother trying. */
503
-#define VERSION_TEXT "Unidentified build"
504
+#define VERSION_TEXT "0.62.1 GNS3 Build"
505
 #define BINARY_VERSION 0,0,0,0
506
 
507
 #endif
508
diff -rup putty-src-orig\WINDOWS\WIN_RES.H putty-src\WINDOWS\WIN_RES.H
509
--- putty-src-orig\WINDOWS\WIN_RES.H	Sun Apr 23 19:26:04 2006
510
+++ putty-src\WINDOWS\WIN_RES.H	Fri Jun 22 20:10:56 2012
511
@@ -23,6 +23,7 @@
512
 #define IDA_TEXT2       1004
513
 #define IDA_LICENCE     1005
514
 #define IDA_WEB         1006
515
+#define IDA_GNS3_WEB    1007
516
 
517
 #define IDC_TAB         1001
518
 #define IDC_TABSTATIC1  1002
519
diff -rup putty-src-orig\WINDOWS\WIN_RES.RC2 putty-src\WINDOWS\WIN_RES.RC2
520
--- putty-src-orig\WINDOWS\WIN_RES.RC2	Wed Jan 05 12:01:00 2011
521
+++ putty-src\WINDOWS\WIN_RES.RC2	Mon May 07 22:28:03 2012
522
@@ -25,7 +25,7 @@ BEGIN
523
     PUSHBUTTON "View &Licence", IDA_LICENCE, 6, 52, 70, 14
524
     PUSHBUTTON "Visit &Web Site", IDA_WEB, 84, 52, 70, 14
525
     CTEXT "PuTTY", IDA_TEXT1, 10, 6, 194, 8
526
-    CTEXT "", IDA_VERSION, 10, 16, 194, 16
527
+    CTEXT "0.62.1 GNS3 Build", IDA_VERSION, 10, 16, 194, 16
528
     CTEXT "\251 1997-2011 Simon Tatham. All rights reserved.",
529
           IDA_TEXT2, 10, 34, 194, 16
530
 END
531
diff -rup putty-src-orig\WINDOWS\WINDLG.C putty-src\WINDOWS\WINDLG.C
532
--- putty-src-orig\WINDOWS\WINDLG.C	Wed Dec 29 14:11:26 2010
533
+++ putty-src\WINDOWS\WINDLG.C	Fri Jun 22 21:33:07 2012
534
@@ -220,6 +220,14 @@ static int CALLBACK AboutProc(HWND hwnd,
535
 			 "http://www.chiark.greenend.org.uk/~sgtatham/putty/",
536
 			 0, 0, SW_SHOWDEFAULT);
537
 	    return 0;
538
+	/***************Patch GNS3 PuTTY *******************/
539
+	  case IDA_GNS3_WEB:
540
+	    /* Load web browser */
541
+	    ShellExecute(hwnd, "open",
542
+			 "http://www.gns3.net/putty/",
543
+			 0, 0, SW_SHOWDEFAULT);
544
+	    return 0;
545
+	/***************************************************/
546
 	}
547
 	return 0;
548
       case WM_CLOSE:
549
diff -rup putty-src-orig\WINDOWS\WINDOW.C putty-src\WINDOWS\WINDOW.C
550
--- putty-src-orig\WINDOWS\WINDOW.C	Sat Jul 16 12:26:20 2011
551-
+++ putty-src\WINDOWS\WINDOW.C	Fri Jun 22 21:08:57 2012
551+
+++ putty-src\WINDOWS\WINDOW.C	Sat Jun 30 16:07:49 2012
552
@@ -34,6 +34,9 @@
553
  * attempt to store information in them. Hence all these identifiers have
554
  * the low 4 bits clear. Also, identifiers should < 0xF000. */
555
 
556
+/***************Patch GNS3 PuTTY *******************/
557
+#define IDM_TOPMOST   0x0210
558
+/***************************************************/
559
 #define IDM_SHOWLOG   0x0010
560
 #define IDM_NEWSESS   0x0020
561
 #define IDM_DUPSESS   0x0030
562
@@ -76,6 +79,10 @@
563
 #define WHEEL_DELTA 120
564
 #endif
565
 
566
+/***************Patch GNS3 PuTTY *******************/
567
+HANDLE hThread1;
568
+/***************************************************/
569
+
570
 static Mouse_Button translate_button(Mouse_Button button);
571
 static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
572
 static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
573
@@ -94,6 +101,9 @@ static int is_full_screen(void);
574
 static void make_full_screen(void);
575
 static void clear_full_screen(void);
576
 static void flip_full_screen(void);
577
+/***************Patch GNS3 PuTTY *******************/
578
+static void flip_top_most(void);
579
+/***************************************************/
580
 static int process_clipdata(HGLOBAL clipdata, int unicode);
581
 
582
 /* Window layout information */
583
@@ -236,60 +246,101 @@ static void start_backend(void)
584
 		       cfg.host, cfg.port, &realhost, cfg.tcp_nodelay,
585
 		       cfg.tcp_keepalives);
586
     back->provide_logctx(backhandle, logctx);
587
+	/***************Patch GNS3 PuTTY *******************/
588
     if (error) {
589
-	char *str = dupprintf("%s Error", appname);
590
-	sprintf(msg, "Unable to open connection to\n"
591
-		"%.800s\n" "%s", cfg_dest(&cfg), error);
592
-	MessageBox(NULL, msg, str, MB_ICONERROR | MB_OK);
593
-	sfree(str);
594
-	exit(0);
595
-    }
596
-    window_name = icon_name = NULL;
597
-    if (*cfg.wintitle) {
598
-	title = cfg.wintitle;
599
-    } else {
600
-	sprintf(msg, "%s - %s", realhost, appname);
601
-	title = msg;
602
-    }
603
-    sfree(realhost);
604
-    set_title(NULL, title);
605
-    set_icon(NULL, title);
606
+		char *str = dupprintf("%s Error", appname);
607
+	
608
+		if(cfg.no_annoying_msgbox) {
609
+			sprintf(msg, "Unable to open: %.800s", cfg_dest(&cfg));
610
+			set_title_plus_error(NULL, msg);
611
+			logevent(NULL, msg);
612
+		}else{
613
+			sprintf(msg, "Unable to open connection to\n%.800s\n%s", cfg_dest(&cfg), error);
614
+			MessageBox(NULL, msg, str, MB_ICONERROR | MB_OK);
615
+			exit(0);
616
+		}
617
 
618
-    /*
619
-     * Connect the terminal to the backend for resize purposes.
620
-     */
621
-    term_provide_resize_fn(term, back->size, backhandle);
622
+		sfree(str);
623
+		must_close_session = TRUE;
624
+		session_closed = TRUE;
625
 
626
-    /*
627
-     * Set up a line discipline.
628
-     */
629
-    ldisc = ldisc_create(&cfg, term, back, backhandle, NULL);
630
+	} else {
631
+	
632
+		window_name = icon_name = NULL;
633
+		if (*cfg.wintitle) {
634
+		title = cfg.wintitle;
635
+		} else {
636
+		sprintf(msg, "%s - %s", realhost, appname);
637
+		title = msg;
638
+		}
639
+		sfree(realhost);
640
+		set_title(NULL, title);
641
+		set_icon(NULL, title);
642
 
643
-    /*
644
-     * Destroy the Restart Session menu item. (This will return
645
-     * failure if it's already absent, as it will be the very first
646
-     * time we call this function. We ignore that, because as long
647
-     * as the menu item ends up not being there, we don't care
648
-     * whether it was us who removed it or not!)
649
-     */
650
-    for (i = 0; i < lenof(popup_menus); i++) {
651
-	DeleteMenu(popup_menus[i].menu, IDM_RESTART, MF_BYCOMMAND);
652
-    }
653
+		/*
654
+		 * Connect the terminal to the backend for resize purposes.
655
+		 */
656
+		term_provide_resize_fn(term, back->size, backhandle);
657
 
658
-    must_close_session = FALSE;
659
-    session_closed = FALSE;
660
+		/*
661
+		 * Set up a line discipline.
662
+		 */
663
+		ldisc = ldisc_create(&cfg, term, back, backhandle, NULL);
664
+
665
+		/*
666
+		 * Destroy the Restart Session menu item. (This will return
667
+		 * failure if it's already absent, as it will be the very first
668
+		 * time we call this function. We ignore that, because as long
669
+		 * as the menu item ends up not being there, we don't care
670
+		 * whether it was us who removed it or not!)
671
+		 */
672
+		for (i = 0; i < lenof(popup_menus); i++) {
673
+		DeleteMenu(popup_menus[i].menu, IDM_RESTART, MF_BYCOMMAND);
674
+		}
675
+
676
+		must_close_session = FALSE;
677
+		session_closed = FALSE;
678
+	}
679
+	/**************************************************/
680
+}
681
+
682
+/***************Patch GNS3 PuTTY *******************/
683
+void WINAPI TimerRoutine(void)
684
+{
685
+	int i;
686
+	char morestuff[255], title[155];
687
+	GetWindowText(hwnd, title, sizeof(title));
688
+	for (i = cfg.reconnect_after_error; i >= 1; i--) {
689
+		sprintf(morestuff, "%s - [Restart in %ds]", title, i);
690
+		set_title(NULL, morestuff);
691
+		set_icon(NULL, morestuff);
692
+		Sleep(1000);
693
+		}
694
+
695
+	sprintf(morestuff, "%s - [Restarting...]", title, i);
696
+	set_title(NULL, morestuff);
697
+	set_icon(NULL, morestuff);
698
+	Sleep(250);
699
+
700
+	PostMessage(hwnd, IDM_RESTART, 0, 0);
701
 }
702
+/**************************************************/
703
 
704
 static void close_session(void)
705
 {
706
-    char morestuff[100];
707
     int i;
708
+	/***************Patch GNS3 PuTTY *******************/
709
+    char morestuff[255], title[155];
710
 
711
-    session_closed = TRUE;
712
-    sprintf(morestuff, "%.70s (inactive)", appname);
713
-    set_icon(NULL, morestuff);
714
-    set_title(NULL, morestuff);
715
+	session_closed = TRUE;
716
+	GetWindowText(hwnd, title, sizeof(title));
717
+    sprintf(morestuff, "%s - (inactive)", title);
718
 
719
+    set_icon(NULL, morestuff);
720
+	set_title(NULL, morestuff);	
721
+	//SetSysColors(2, COLOR_WINDOW, RGB(0x255, 0x0, 0x0));
722
+	/***************************************************/
723
+	
724
     if (ldisc) {
725
 	ldisc_free(ldisc);
726
 	ldisc = NULL;
727
@@ -320,6 +371,11 @@ static void close_session(void)
728
      * window title change above.
729
      */
730
     must_close_session = FALSE;
731
+	/***************Patch GNS3 PuTTY *******************/	
732
+	if(cfg.reconnect_after_error) {
733
+		hThread1 = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)TimerRoutine, NULL, 0, NULL);
734
+	}
735
+	/***************************************************/
736
 }
737
 
738
 int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
739
@@ -795,6 +851,9 @@ int WINAPI WinMain(HINSTANCE inst, HINST
740
 	    AppendMenu(m, MF_SEPARATOR, 0, 0);
741
 	    AppendMenu(m, (cfg.resize_action == RESIZE_DISABLED) ?
742
 		       MF_GRAYED : MF_ENABLED, IDM_FULLSCREEN, "&Full Screen");
743
+		/***************Patch GNS3 PuTTY *******************/
744
+	    AppendMenu(m, MF_ENABLED, IDM_TOPMOST, "Alwa&ys on Top");
745
+		/***************************************************/
746
 	    AppendMenu(m, MF_SEPARATOR, 0, 0);
747
 	    if (has_help())
748
 		AppendMenu(m, MF_ENABLED, IDM_HELP, "&Help");
749
@@ -1082,8 +1141,16 @@ void connection_fatal(void *frontend, ch
750
     va_start(ap, fmt);
751
     stuff = dupvprintf(fmt, ap);
752
     va_end(ap);
753
-    sprintf(morestuff, "%.70s Fatal Error", appname);
754
-    MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
755
+
756
+	/***************Patch GNS3 PuTTY *******************/
757
+	if(cfg.no_annoying_msgbox) {
758
+		set_title_plus_error(NULL, stuff);
759
+	}else{
760
+		sprintf(morestuff, "%.70s Fatal Error", appname);
761
+		MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
762
+	}
763
+	/***************************************************/
764
+
765
     sfree(stuff);
766
 
767
     if (cfg.close_on_exit == FORCE_ON)
768
@@ -1969,9 +2036,16 @@ void notify_remote_exit(void *fe)
769
 	    /* exitcode == INT_MAX indicates that the connection was closed
770
 	     * by a fatal error, so an error box will be coming our way and
771
 	     * we should not generate this informational one. */
772
-	    if (exitcode != INT_MAX)
773
-		MessageBox(hwnd, "Connection closed by remote host",
774
-			   appname, MB_OK | MB_ICONINFORMATION);
775
+		/***************Patch GNS3 PuTTY *******************/
776
+	    if (exitcode != INT_MAX) {
777
+			if(cfg.no_annoying_msgbox) {
778
+				set_title_plus_error(NULL, "Connection closed by remote host");
779
+				logevent(NULL, "Connection closed by remote host");
780
+			}else{
781
+				MessageBox(hwnd, "Connection closed by remote host", appname, MB_OK | MB_ICONINFORMATION);
782
+			}
783
+		}
784
+		/***************************************************/
785
 	}
786
     }
787
 }
788
@@ -2027,6 +2101,18 @@ static LRESULT CALLBACK WndProc(HWND hwn
789
 	show_mouseptr(1);
790
 	PostQuitMessage(0);
791
 	return 0;
792
+	/***************Patch GNS3 PuTTY *******************/
793
+	  case IDM_RESTART:
794
+		if (!back) {
795
+			char morestuff[200];
796
+			sprintf(morestuff, "----- Session auto-restarted on error (every %ds) -----", cfg.reconnect_after_error);
797
+			logevent(NULL, morestuff);
798
+
799
+			if (cfg.protocol != PROT_SERIAL) { term_pwron(term, FALSE); }
800
+			start_backend();
801
+		}
802
+		break;
803
+	/***************************************************/
804
       case WM_INITMENUPOPUP:
805
 	if ((HMENU)wParam == savedsess_menu) {
806
 	    /* About to pop up Saved Sessions sub-menu.
807
@@ -2116,11 +2202,13 @@ static LRESULT CALLBACK WndProc(HWND hwn
808
 	    break;
809
 	  case IDM_RESTART:
810
 	    if (!back) {
811
-		logevent(NULL, "----- Session restarted -----");
812
-		term_pwron(term, FALSE);
813
+		/***************Patch GNS3 PuTTY *******************/
814
+		logevent(NULL, "----- Session restarted manually -----");
815
+		if (hThread1 != NULL) TerminateThread(hThread1, 0);
816
+		if (cfg.protocol != PROT_SERIAL) { term_pwron(term, FALSE); }
817
+		/***************************************************/
818
 		start_backend();
819
 	    }
820
-
821
 	    break;
822
 	  case IDM_RECONF:
823
 	    {
824
@@ -2320,6 +2408,11 @@ static LRESULT CALLBACK WndProc(HWND hwn
825
 	  case IDM_FULLSCREEN:
826
 	    flip_full_screen();
827
 	    break;
828
+	/***************Patch GNS3 PuTTY *******************/
829
+	  case IDM_TOPMOST:
830
+	    flip_top_most();
831
+	    break;
832
+	/***************************************************/
833
 	  default:
834
 	    if (wParam >= IDM_SAVED_MIN && wParam < IDM_SAVED_MAX) {
835
 		SendMessage(hwnd, WM_SYSCOMMAND, IDM_SAVEDSESS, wParam);
836
@@ -4527,6 +4620,31 @@ void set_title(void *frontend, char *tit
837
 	SetWindowText(hwnd, title);
838
 }
839
 
840
+/***************Patch GNS3 PuTTY *******************/
841
+void set_title_plus_error(void *frontend, char *error)
842
+{
843
+    char title[512];
844
+	
845
+	if (strlen(cfg.wintitle) >= 1) {
846
+		if (cfg.protocol == PROT_SERIAL) {
847
+			sprintf(title, "Serial Error (%s) - %s!\0", cfg.wintitle, error); //serial with title
848
+		} else {
849
+			sprintf(title, "%s:%d (%s) - %s!\0", cfg.host, cfg.port, cfg.wintitle, error); //telnet with title
850
+		}
851
+	} else {
852
+		if (cfg.protocol == PROT_SERIAL) {
853
+			sprintf(title, "Serial Error - %s!\0", error); //serial without title
854
+		} else {
855
+			sprintf(title, "%s:%d - %s!\0",      cfg.host, cfg.port, error); //telnet without title
856
+		}
857
+	}
858
+ sfree(window_name);
859
+ window_name = snewn(1 + strlen(title), char);
860
+ strcpy(window_name, title);
861
+ SetWindowText(hwnd, title);
862
+}
863
+/***************************************************/
864
+
865
 void set_icon(void *frontend, char *title)
866
 {
867
     sfree(icon_name);
868-
@@ -5504,6 +5622,21 @@ static void flip_full_screen()
868+
@@ -5504,6 +5622,24 @@ static void flip_full_screen()
869
 	ShowWindow(hwnd, SW_MAXIMIZE);
870
     }
871
 }
872
+
873
+/***************Patch GNS3 PuTTY *******************/
874
+/*
875
+ * Toggle always on top mode.
876
+ */
877
+static void flip_top_most()
878
+{
879
+int i;
880
+	if (!(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)){
881
+		SetWindowPos(hwnd, HWND_TOPMOST,   0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
882
+		for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TOPMOST, MF_CHECKED); //Tick the menu item in the System and context menus.
883
+    }
884
+	else{
885
+		SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
886
+		for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TOPMOST, MF_UNCHECKED); //Untick the menu item in the System and context menus.
887
+	}
888
+}
889
+/***************************************************/
890
 
891
 void frontend_keypress(void *handle)
892
 {
893
diff -rup putty-src-orig\WINDOWS\WINPGNTC.C putty-src\WINDOWS\WINPGNTC.C
894
--- putty-src-orig\WINDOWS\WINPGNTC.C	Wed Jun 08 21:47:08 2011
895
+++ putty-src\WINDOWS\WINPGNTC.C	Wed Jun 13 22:16:15 2012
896
@@ -86,10 +86,13 @@ DECL_WINDOWS_FUNCTION(static, BOOL, Init
897
 		      (PSECURITY_DESCRIPTOR, DWORD));
898
 DECL_WINDOWS_FUNCTION(static, BOOL, SetSecurityDescriptorOwner,
899
 		      (PSECURITY_DESCRIPTOR, PSID, BOOL));
900
-DECL_WINDOWS_FUNCTION(, DWORD, GetSecurityInfo,
901
+/***************Patch GNS3 PuTTY *******************/
902
+// the word "static" was missing!
903
+DECL_WINDOWS_FUNCTION(static, DWORD, GetSecurityInfo,
904
 		      (HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
905
 		       PSID *, PSID *, PACL *, PACL *,
906
 		       PSECURITY_DESCRIPTOR *));
907
+/***************************************************/
908
 int init_advapi(void)
909
 {
910
     advapi = load_system32_dll("advapi32.dll");
911
@@ -100,6 +103,7 @@ int init_advapi(void)
912
 	GET_WINDOWS_FUNCTION(advapi, InitializeSecurityDescriptor) &&
913
 	GET_WINDOWS_FUNCTION(advapi, SetSecurityDescriptorOwner);
914
 }
915
+
916
 
917
 PSID get_user_sid(void)
918
 {
919
diff -rup putty-src-orig\WINDOWS\WINSER.C putty-src\WINDOWS\WINSER.C
920
--- putty-src-orig\WINDOWS\WINSER.C	Tue Aug 10 18:21:26 2010
921
+++ putty-src\WINDOWS\WINSER.C	Tue Jun 19 23:54:04 2012
922
@@ -276,6 +276,14 @@ static const char *serial_init(void *fro
923
      */
924
     update_specials_menu(serial->frontend);
925
 
926
+	
927
+	/***************Patch GNS3 PuTTY *******************/
928
+	if (cfg->push_one_enter) {	
929
+	    logevent(serial->frontend, "*** Press a '\\r' inside the serial port/pipe ***");
930
+		serial->bufsize = handle_write(serial->out, "\r", 1); //press a enter on the serial
931
+	}
932
+	/***************************************************/
933
+
934
     return NULL;
935
 }