Skip to content

Commit

Permalink
Tagging the 0.74.4.2 release of the KiTTY project.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyd01 committed Jan 5, 2021
1 parent 3d01377 commit 2d1b66a
Show file tree
Hide file tree
Showing 26 changed files with 204 additions and 89 deletions.
54 changes: 50 additions & 4 deletions 0.74_My_PuTTY/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
#include "dialog.h"
#include "storage.h"

#ifdef MOD_PROXY
#include "kitty_proxy.h"
#endif

#ifdef MOD_RUTTY
#include "script.h"
#endif /* rutty */
Expand All @@ -27,6 +25,47 @@ int GetReadOnlyFlag(void) ;
#ifdef MOD_ZMODEM
#define ATOFFSET(data, offset) ( (void *) ( (char *)(data) + (offset) ) )
#endif
#ifdef MOD_PROXY
#include "kitty_proxy.h"
void proxy_selection_handler(union control *ctrl, dlgparam *dlg, void *data, int event) {
int i, j;
Conf *conf = (Conf *)data;
if (event == EVENT_REFRESH) {
/* Fetching this once at the start of the function ensures we
* remember what the right value is supposed to be when
* operations below cause reentrant calls to this function. */
char * oldproxy = conf_get_str(conf, CONF_proxyselection);

dlg_update_start(ctrl, dlg);
dlg_listbox_clear(ctrl, dlg);
for (i = 0; i < lenof(proxies); i++) {
if( proxies[i].name==NULL ) break ;
dlg_listbox_addwithid(ctrl, dlg, proxies[i].name, proxies[i].val);
}
for (i = j = 0; i < lenof(proxies); i++) {
if( proxies[i].name==NULL ) break ;
if ( !strcmp(oldproxy,proxies[i].name) ) {
dlg_listbox_select(ctrl, dlg, i);
break;
}
j++;
}
if (i == lenof(proxies)) { /* an unsupported setting was chosen */
dlg_listbox_select(ctrl, dlg, 0);
oldproxy = NULL;
}
dlg_update_done(ctrl, dlg);
if( oldproxy!=NULL ) conf_set_str(conf, CONF_proxyselection, oldproxy); /* restore */
} else if (event == EVENT_SELCHANGE) {
int i = dlg_listbox_index(ctrl, dlg);
if (i < 0)
i = 0;
else
i = dlg_listbox_getid(ctrl, dlg, i);
conf_set_str(conf, CONF_proxyselection, proxies[i].name);
}
}
#endif

#define PRINTER_DISABLED_STRING "None (printing disabled)"

Expand Down Expand Up @@ -3434,7 +3473,7 @@ if( !GetPuttyFlag() ) {

}

if (!midsession) {
if (!midsession /*||midsession*/ ) {
/*
* The Connection/Proxy panel.
*/
Expand Down Expand Up @@ -4019,6 +4058,13 @@ if( !GetPuttyFlag() ) {
"IPv6", '6', I(ADDRTYPE_IPV6),
NULL);
#endif

#ifdef MOD_PERSO
ctrl_checkbox(s, "Print Dynamic ports in window title",NO_SHORTCUT,
HELPCTX(no_help),
conf_checkbox_handler,
I(CONF_ssh_tunnel_print_in_title));
#endif
ctrl_tabdelay(s, pfd->addbutton);
ctrl_columns(s, 1, 100);

Expand Down
1 change: 1 addition & 0 deletions 0.74_My_PuTTY/putty.h
Original file line number Diff line number Diff line change
Expand Up @@ -1572,6 +1572,7 @@ NORETURN void cleanup_exit(int);
X(INT, NONE, scp_auto_pwd) \
X(BOOL, NONE, no_focus_rep) /* totally disable mouse reporting */ \
X(INT, NONE, scrolllines) /* Options for Scroll Lines per Wheel */ \
X(BOOL, NONE, ssh_tunnel_print_in_title) /* print dynamic port number in window title */ \
/* #endif */ \
/* #ifdef MOD_PROXY */ \
X(STR, NONE, proxyselection) /* Options for proxy selection */ \
Expand Down
2 changes: 2 additions & 0 deletions 0.74_My_PuTTY/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,7 @@ void save_open_settings(settings_w *sesskey, Conf *conf)
write_setting_i(sesskey, "SCPAutoPwd", conf_get_int(conf, CONF_scp_auto_pwd));
write_setting_b(sesskey, "NoFocusReporting", conf_get_bool(conf, CONF_no_focus_rep));
write_setting_i(sesskey, "LinesAtAScroll", conf_get_int(conf, CONF_scrolllines));
write_setting_b(sesskey, "SSHTunnelInTitle", conf_get_bool(conf, CONF_ssh_tunnel_print_in_title));
#endif
#ifdef MOD_PORTKNOCKING
write_setting_s(sesskey, "PortKnocking", conf_get_str(conf, CONF_portknockingoptions) );
Expand Down Expand Up @@ -1601,6 +1602,7 @@ void load_open_settings(settings_r *sesskey, Conf *conf)
gppi(sesskey, "SCPAutoPwd", 0, conf, CONF_scp_auto_pwd);
gppb(sesskey, "NoFocusReporting", true, conf, CONF_no_focus_rep);
gppi(sesskey, "LinesAtAScroll", -1, conf, CONF_scrolllines);
gppb(sesskey, "SSHTunnelInTitle", false, conf, CONF_ssh_tunnel_print_in_title);
#endif
#ifdef MOD_PORTKNOCKING
gpps(sesskey, "PortKnocking", "", conf, CONF_portknockingoptions );
Expand Down
1 change: 1 addition & 0 deletions 0.74_My_PuTTY/ssh2userauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ typedef struct agent_key {
#ifdef MOD_PERSO
#include "kitty.h"
void SetSSHConnected( int flag );
void debug_logevent( const char *fmt, ... ) ;
size_t iso8859_1_to_utf8(char *content, size_t max_size) ; // Latin-1 = iso8859-1
size_t utf8_to_iso8859_15(char *const output, const char *const input, const size_t length) ; // Latin-9 = iso8859-15
char bufpass[1024]="";
Expand Down
2 changes: 1 addition & 1 deletion 0.74_My_PuTTY/version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define RELEASE 0.74
#define TEXTVER "Release 0.74"
#define SSHVER "-Release-0.74"
#define BINARY_VERSION 0,74,4,1
#define BINARY_VERSION 0,74,4,2
#define SOURCE_COMMIT "unavailable"
4 changes: 2 additions & 2 deletions 0.74_My_PuTTY/windows/MAKEFILE.MINGW
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ plink.exe: agentf.o aqsync.o \
winnpc.o winnps.o winpgntc.o winplink.o winproxy.o \
winsecur.o winser.o winshare.o winstore.o wintime.o winucs.o \
winx11.o x11fwd.o \
adb.o kitty_registry.o kitty_commun.o kitty_ssh.o kitty_store.o kitty_tools.o
adb.o kitty_registry.o kitty_commun.o kitty_proxy.o kitty_ssh.o kitty_store.o kitty_tools.o
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,plink.map agentf.o aqsync.o \
be_all_s_plink.o \
be_misc.o callback.o cmdline.o conf.o cproxy.o \
Expand All @@ -265,7 +265,7 @@ plink.exe: agentf.o aqsync.o \
winmiscs.o winnet.o winnohlp.o winnoise.o winnojmp.o \
winnpc.o winnps.o winpgntc.o winplink.o winproxy.o \
winsecur.o winser.o winshare.o winstore.o wintime.o winucs.o \
adb.o kitty_registry.o kitty_commun.o kitty_ssh.o kitty_store.o kitty_tools.o \
adb.o kitty_registry.o kitty_commun.o kitty_proxy.o kitty_ssh.o kitty_store.o kitty_tools.o \
../../base64/base64.a ../../bcrypt/bcrypt.a ../../mini/mini.a \
winx11.o x11fwd.o -ladvapi32 -lcomdlg32 -lgdi32 -limm32 \
-lole32 -lshell32 -luser32 \
Expand Down
2 changes: 1 addition & 1 deletion 0.74_My_PuTTY/windows/version.rc2
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ BEGIN
VALUE "FileVersion", TEXTVER
#endif
#if (defined MOD_PERSO) && (!defined FLJ)
VALUE "ProductVersion", TEXTVER " - Additional features on KiTTY That's all folks! by 9bis.com, 2005-2020"
VALUE "ProductVersion", TEXTVER " - Additional features on KiTTY That's all folks! by 9bis.com, 2005-2021"
#else
VALUE "ProductVersion", TEXTVER
#endif
Expand Down
2 changes: 1 addition & 1 deletion 0.74_My_PuTTY/windows/version_minor.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
2
2 changes: 1 addition & 1 deletion 0.74_My_PuTTY/windows/win_res.rc2
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
ICON IDI_MAINICON_0,IDC_STATIC,7,7,30,20
LTEXT "",IDA_VERSION,45,7,198,8
LTEXT "Copyright \251 2005-2020",IDC_STATIC,45,19,78,8
LTEXT "Copyright \251 2005-2021",IDC_STATIC,45,19,78,8
LTEXT "9bis software - https://www.9bis.net/kitty",
IDC_WEBPAGE,45,31,145,8
LTEXT "Contact:",IDC_STATIC,45,43,46,8
Expand Down
2 changes: 1 addition & 1 deletion 0.74_My_PuTTY/windows/windlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
#if (defined MOD_PERSO) && (!defined FLJ)

//static const char MESSAGE[] = "";
static const char MESSAGE[] = " KiTTY software is developed by Cyd for 9bis.com, copyright \251 2005-2020, thanks to Leo for bcrypt and mini libraries, thanks to all contributors " ;
static const char MESSAGE[] = " KiTTY software is developed by Cyd for 9bis.com, copyright \251 2005-2021, thanks to Leo for bcrypt and mini libraries, thanks to all contributors " ;

static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam)
Expand Down
7 changes: 7 additions & 0 deletions 0.74_My_PuTTY/windows/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -7514,6 +7514,7 @@ static void wintw_set_title(TermWin *tw, const char *title_in) {
}
if( GetProtectFlag() ) if( strstr(buffer, " (PROTECTED)")==NULL ) { strcat( buffer, " (PROTECTED)" ) ; }
if( conf_get_bool(conf, CONF_alwaysontop) ) if( strstr(buffer, " (ONTOP)")==NULL ) { strcat( buffer, " (ONTOP)" ) ; }
if( conf_get_bool(conf, CONF_ssh_tunnel_print_in_title) ) if( strstr(buffer, " (SOCKS: ")==NULL ) { make_title( fmt, " (SOCKS: %s)", "%%d") ; strcat( buffer, fmt ) ; }
set_title_internal( tw, buffer ) ;
free(title);
free(buffer);
Expand Down Expand Up @@ -8148,6 +8149,9 @@ static void process_clipdata(HGLOBAL clipdata, bool unicode)
clipboard_contents = snewn(clipboard_length + 1, wchar_t);
memcpy(clipboard_contents, p, clipboard_length * sizeof(wchar_t));
clipboard_contents[clipboard_length] = L'\0';
#ifdef MOD_PERSO
if( (GetPasteSize()==0) || (clipboard_length<=GetPasteSize()) || MessageBox(NULL,"Clipboard content is very large.\nAre you sure ?","Confirmation",MB_YESNO|MB_ICONWARNING)==IDYES )
#endif
term_do_paste(term, clipboard_contents, clipboard_length);
}
} else {
Expand All @@ -8161,6 +8165,9 @@ static void process_clipdata(HGLOBAL clipdata, bool unicode)
clipboard_contents, i);
clipboard_length = i - 1;
clipboard_contents[clipboard_length] = L'\0';
#ifdef MOD_PERSO
if( (GetPasteSize()==0) || (clipboard_length<=GetPasteSize()) || MessageBox(NULL,"Clipboard content is very large.\nAre you sure ?","Confirmation",MB_YESNO|MB_ICONWARNING)==IDYES )
#endif
term_do_paste(term, clipboard_contents, clipboard_length);
}
}
Expand Down
5 changes: 5 additions & 0 deletions 0.74_My_PuTTY/windows/winplink.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,11 @@ int main(int argc, char **argv)
else
return 1;
}
#ifdef MOD_PROXY
if( GetProxySelectionFlag() ) {
LoadProxyInfo( conf, conf_get_str(conf,CONF_proxyselection) ) ;
}
#endif
#ifdef MOD_PORTKNOCKING
ManagePortKnocking(conf_get_str(conf,CONF_host),conf_get_str(conf,CONF_portknockingoptions));
#endif
Expand Down
4 changes: 4 additions & 0 deletions 0.74_My_PuTTY/windows/winstore.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ void del_settings(const char *sessionname)
char *p, *p2;
if( GetReadOnlyFlag() ) return ;
if( (strstr( sessionname, " [" )==sessionname)&&(sessionname[strlen(sessionname)-1]==']') ) {
if( !strcmp(sessionname," [..]") ) {
MessageBox(NULL,"It is not allowed to delete .. directory","Error",MB_OK|MB_ICONERROR) ;
return ;
}
// La session a purger est un folder
p = snewn(3 * strlen(sessionname) + 1, char);
strcpy( p, sessionname+2 ) ;
Expand Down
Binary file modified blocnote/notepad.a
Binary file not shown.
2 changes: 1 addition & 1 deletion blocnote/notepad.rc
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ BEGIN

NOTEPAD_FILE_FILTER "Text files, (*.txt, *.ini)|*.txt;*.ini|C/C++ files, (*.c, *.cpp, *.h, *.rc)|*.c;*.cpp;*.h;*.rc|Script files, (*.ksh, *.sh)|*.ksh;*.sh\0SQL files, (*.sql)|*.sql|All files, (*.*)|*.*\0"

NOTEPAD_STR_LICENCE " mNotepad 1.0\nwritten by Cyd, 2020, for the Telnet/SSH client TTY"
NOTEPAD_STR_LICENCE " mNotepad 1.0\nwritten by Cyd, 2021, for the Telnet/SSH client TTY"
END
2 changes: 1 addition & 1 deletion docs/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.74.4.1
0.74.4.2
25 changes: 23 additions & 2 deletions kitty.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ char * PasteCommand = NULL ;
static int PasteCommandFlag = 0 ;
int GetPasteCommandFlag(void) { return PasteCommandFlag ; }

// paste size limit (number of characters). Above the limit a confirmation is requested. (0 means unlimited)
static int PasteSize = 0 ;
int GetPasteSize(void) { return PasteSize ; }
void SetPasteSize( const int size ) { PasteSize = size ; }

// Flag de gestion de la fonction hyperlink
#ifdef FLJ
int HyperlinkFlag = 1 ;
Expand Down Expand Up @@ -4385,6 +4390,7 @@ int Convert2Dir( const char * Directory ) {
sprintf( buffer, "%s\\Commands", Directory ) ; DelDir( buffer) ; MakeDirTree( Directory, "Commands", "Commands" ) ;
sprintf( buffer, "%s\\Launcher", Directory ) ; DelDir( buffer) ; MakeDirTree( Directory, "Launcher", "Launcher" ) ;
sprintf( buffer, "%s\\Folders", Directory ) ; DelDir( buffer) ; MakeDirTree( Directory, "Folders", "Folders" ) ;
sprintf( buffer, "%s\\Commands", Directory ) ; DelDir( buffer) ; MakeDirTree( Directory, "Commands", "Commands" ) ;

sprintf( buffer, "%s\\Sessions", Directory ) ; DelDir( buffer) ; {
if(!MakeDir( buffer )) MessageBox(NULL,"Unable to create directory for storing sessions","Error",MB_OK|MB_ICONERROR);
Expand Down Expand Up @@ -4456,7 +4462,21 @@ int Convert2Dir( const char * Directory ) {
}
RegCloseKey( hKey ) ;
}

#ifdef MOD_PROXY
sprintf( buffer, "%s\\Proxies", Directory ) ; DelDir( buffer) ; if( !MakeDir( buffer ) ) {
MessageBox(NULL,"Unable to create directory for storing proxies definition","Error",MB_OK|MB_ICONERROR) ;
}
sprintf( buffer, "%s\\Proxies", TEXT(PUTTY_REG_POS) ) ;
if( RegOpenKeyEx( HKEY_CURRENT_USER, TEXT(buffer), 0, KEY_READ, &hKey) == ERROR_SUCCESS ) {
if( RegQueryInfoKey(hKey,achClass,&cchClassName,NULL,&cSubKeys,&cbMaxSubKey
,&cchMaxClass,&cValues,&cchMaxValue,&cbMaxValueData,&cbSecurityDescriptor,&ftLastWriteTime) == ERROR_SUCCESS ) {
if (cSubKeys) for (i=0; i<cSubKeys; i++) {
}
}
RegCloseKey( hKey ) ;
}
#endif

if( delkeyflag ) { RegDelTree (HKEY_CURRENT_USER, TEXT(PUTTY_REG_PARENT) ) ; }

return 0;
Expand Down Expand Up @@ -5192,7 +5212,8 @@ void LoadParameters( void ) {
if( !stricmp( buffer, "NO" ) ) MouseShortcutsFlag = 0 ;
if( !stricmp( buffer, "YES" ) ) MouseShortcutsFlag = 1 ;
}
if( ReadParameter( INIT_SECTION, "paste", buffer ) ) { if( !stricmp( buffer, "YES" ) ) PasteCommandFlag = 1 ; }
if( ReadParameter( INIT_SECTION, "paste", buffer ) ) { if( !stricmp( buffer, "YES" ) ) PasteCommandFlag = 1 ; }
if( ReadParameter( INIT_SECTION, "pastesize", buffer ) ) { if( atoi(buffer)>0 ) SetPasteSize( atoi(buffer) ) ; }
if( ReadParameter( INIT_SECTION, "PSCPPath", buffer ) ) {
if( existfile( buffer ) ) {
if( PSCPPath!=NULL) { free(PSCPPath) ; PSCPPath = NULL ; }
Expand Down
4 changes: 4 additions & 0 deletions kitty.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ extern char * ScriptCommand ;
extern char * PasteCommand ;
int GetPasteCommandFlag(void) ;

// paste size limit (number of characters). Above the limit a confirmation is requested. (0 means unlimited)
int GetPasteSize(void) ;
void SetPasteSize( const int size ) ;

// Flag de gestion de la fonction hyperlink
extern int HyperlinkFlag ;
int GetHyperlinkFlag(void) ;
Expand Down
3 changes: 3 additions & 0 deletions kitty_ini.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ mouseshortcuts=yes
; paste: enable/disable one line at a time feature in paste action (useful on slow servers only)
paste=no

; pastesize: paste size limit (number of characters). Above the limit a confirmation is requested. (0 means unlimited)
;pastesize=0

; PlinkPath: the full path to the plink.exe (or klink.exe) binary
;PlinkPath=

Expand Down
2 changes: 1 addition & 1 deletion kitty_launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ LRESULT CALLBACK Launcher_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
case WM_COMMAND: {//Commandes du menu
switch( LOWORD(wParam) ) {
case IDM_ABOUT:
MessageBox(hwnd," TTY Launcher\nSession launcher for TTY terminal emulator\n(c), 2009-2020","About", MB_OK ) ;
MessageBox(hwnd," TTY Launcher\nSession launcher for TTY terminal emulator\n(c), 2009-2021","About", MB_OK ) ;
break ;
case IDM_QUIT:
ResShell = Shell_NotifyIcon(NIM_DELETE, &TrayIcone) ;
Expand Down
Loading

0 comments on commit 2d1b66a

Please sign in to comment.