diff --git a/lib/PACEdit.pm b/lib/PACEdit.pm index 2c0bb7c..71c8844 100644 --- a/lib/PACEdit.pm +++ b/lib/PACEdit.pm @@ -306,7 +306,7 @@ sub _setupCallbacks { return 1; } - my $title = encode( 'unicode', _( $self, 'entryKPXRE' ) -> get_chars( 0, -1 ) ); + my $title = encode( 'iso-8859-1', _( $self, 'entryKPXRE' ) -> get_chars( 0, -1 ) ); my $where = $$self{_KPXWHERE}[ _( $self, 'comboKPXWhere' ) -> get_active ]; my ( $user, $pass, $comment, $created ); @@ -637,7 +637,7 @@ sub _updateGUIPreferences { _( $self, 'cbEditUseSudo' ) -> set_active( $$self{_CFG}{'environments'}{$uuid}{'use sudo'} ); _( $self, 'cbEditSaveSessionLogs' ) -> set_active( $$self{_CFG}{'environments'}{$uuid}{'save session logs'} ); _( $self, 'cbEditPrependCommand' ) -> set_active( $$self{_CFG}{'environments'}{$uuid}{'use prepend command'} // 0 ); - _( $self, 'entryEditPrependCommand' ) -> set_text( encode( 'unicode', $$self{_CFG}{'environments'}{$uuid}{'prepend command'} // '' ) ); + _( $self, 'entryEditPrependCommand' ) -> set_text( encode( 'iso-8859-1', $$self{_CFG}{'environments'}{$uuid}{'prepend command'} // '' ) ); _( $self, 'entryEditPrependCommand' ) -> set_sensitive( _( $self, 'cbEditPrependCommand' ) -> get_active ); _( $self, 'cbCfgQuoteCommand' ) -> set_active( $$self{_CFG}{'environments'}{$uuid}{'quote command'} // 0 ); _( $self, 'cbCfgQuoteCommand' ) -> set_sensitive( _( $self, 'cbEditPrependCommand' ) -> get_active ); @@ -646,12 +646,12 @@ sub _updateGUIPreferences { _( $self, 'btnEditSaveSessionLogs' ) -> set_current_folder( $$self{_CFG}{'environments'}{$uuid}{'session logs folder'} // $CFG_DIR . '/session_logs' ); _( $self, 'spEditSaveSessionLogs' ) -> set_value( $$self{_CFG}{'environments'}{$uuid}{'session logs amount'} // 10 ); _( $self, 'fileCfgPublicKey' ) -> set_uri('file://' . $$self{_CFG}{'environments'}{$uuid}{'public key'} ) if $$self{_CFG}{'environments'}{$uuid}{'public key'} ne ''; - _( $self, 'entryUserPassphrase' ) -> set_text( decode( 'unicode', $$self{_CFG}{'environments'}{$uuid}{'passphrase user'} // '' ) ); - _( $self, 'entryPassphrase' ) -> set_text( encode( 'unicode', $$self{_CFG}{'environments'}{$uuid}{'passphrase'} // '' ) ); + _( $self, 'entryUserPassphrase' ) -> set_text( decode( 'iso-8859-1', $$self{_CFG}{'environments'}{$uuid}{'passphrase user'} // '' ) ); + _( $self, 'entryPassphrase' ) -> set_text( encode( 'iso-8859-1', $$self{_CFG}{'environments'}{$uuid}{'passphrase'} // '' ) ); _( $self, 'entryIP' ) -> set_text( $$self{_CFG}{'environments'}{$uuid}{'ip'} ); _( $self, 'entryPort' ) -> set_value( $$self{_CFG}{'environments'}{$uuid}{'port'} ); - _( $self, 'entryUser' ) -> set_text( encode( 'unicode', $$self{_CFG}{'environments'}{$uuid}{'user'} ) ); - _( $self, 'entryPassword' ) -> set_text( encode( 'unicode', $$self{_CFG}{'environments'}{$uuid}{'pass'} ) ); + _( $self, 'entryUser' ) -> set_text( encode( 'iso-8859-1', $$self{_CFG}{'environments'}{$uuid}{'user'} ) ); + _( $self, 'entryPassword' ) -> set_text( encode( 'iso-8859-1', $$self{_CFG}{'environments'}{$uuid}{'pass'} ) ); _( $self, 'cbCfgAuthFallback' ) -> set_active( ! $$self{_CFG}{'environments'}{$uuid}{'auth fallback'} ); _( $self, 'comboMethod' ) -> set_active( $$self{_METHODS}{ $$self{_CFG}{'environments'}{$uuid}{'method'} }{'position'} // 4 ); _( $self, 'imageMethod' ) -> set_from_stock( 'pac-' . $$self{_CFG}{'environments'}{$uuid}{'method'}, 'button' ); @@ -659,14 +659,14 @@ sub _updateGUIPreferences { _( $self, 'cbEditSendString' ) -> set_active( $$self{_CFG}{'environments'}{$uuid}{'send string active'} ); _( $self, 'hboxEditSendString' ) -> set_sensitive( $$self{_CFG}{'environments'}{$uuid}{'send string active'} ); _( $self, 'cbEditSendStringIntro' ) -> set_active( $$self{_CFG}{'environments'}{$uuid}{'send string intro'} ); - _( $self, 'entryEditSendString' ) -> set_text( encode( 'unicode', $$self{_CFG}{'environments'}{$uuid}{'send string txt'} // '' ) ); + _( $self, 'entryEditSendString' ) -> set_text( encode( 'iso-8859-1', $$self{_CFG}{'environments'}{$uuid}{'send string txt'} // '' ) ); _( $self, 'entryEditSendStringSeconds' )-> set_value( $$self{_CFG}{'environments'}{$uuid}{'send string every'} // 0 ); _( $self, 'cbCfgAutoreconnect' ) -> set_active( $$self{_CFG}{'environments'}{$uuid}{'autoreconnect'} // 0 ); _( $self, 'cbCfgStartupLaunch' ) -> set_active( $$self{_CFG}{'environments'}{$uuid}{'startup launch'} // 0 ); _( $self, 'sbCfgSendSlow' ) -> set_value( $$self{_CFG}{'environments'}{$uuid}{'send slow'} // 0 ); _( $self, 'cbAutossh' ) -> set_active( $$self{_CFG}{'environments'}{$uuid}{'autossh'} // 0 ); _( $self, 'cbInferUserPassKPX' ) -> set_active( ( $$self{_CFG}{'environments'}{$uuid}{'infer user pass from KPX'} // 0 ) && $$self{_CFG}{'defaults'}{'keepass'}{'use_keepass'} ); - _( $self, 'entryKPXRE' ) -> set_text( encode( 'unicode', $$self{_CFG}{'environments'}{$uuid}{'KPX title regexp'} // ".*$$self{_CFG}{'environments'}{$uuid}{'title'}.*" ) ); + _( $self, 'entryKPXRE' ) -> set_text( encode( 'iso-8859-1', $$self{_CFG}{'environments'}{$uuid}{'KPX title regexp'} // ".*$$self{_CFG}{'environments'}{$uuid}{'title'}.*" ) ); _( $self, 'entryKPXRE' ) -> set_sensitive( $$self{_CFG}{'environments'}{$uuid}{'infer user pass from KPX'} ); _( $self, 'btnCheckKPX' ) -> set_sensitive( $$self{_CFG}{'environments'}{$uuid}{'infer user pass from KPX'} ); _( $self, 'hboxCfgAuthUserPass' ) -> set_sensitive( ! _( $self, 'cbInferUserPassKPX' ) -> get_active ); @@ -766,12 +766,12 @@ sub _saveConfiguration { if ( _( $self, 'rbCfgAuthUserPass' ) -> get_active ) { $$self{_CFG}{'environments'}{$uuid}{'auth type'} = 'userpass'; } elsif ( _( $self, 'rbCfgAuthPublicKey' ) -> get_active ) { $$self{_CFG}{'environments'}{$uuid}{'auth type'} = 'publickey'; } elsif ( _( $self, 'rbCfgAuthManual' ) -> get_active ) { $$self{_CFG}{'environments'}{$uuid}{'auth type'} = 'manual'; } - $$self{_CFG}{'environments'}{$uuid}{'passphrase user'} = encode( 'unicode', _( $self, 'entryUserPassphrase' ) -> get_chars( 0, -1 ) ); - $$self{_CFG}{'environments'}{$uuid}{'passphrase'} = encode( 'unicode', _( $self, 'entryPassphrase' ) -> get_chars( 0, -1 ) ); + $$self{_CFG}{'environments'}{$uuid}{'passphrase user'} = encode( 'iso-8859-1', _( $self, 'entryUserPassphrase' ) -> get_chars( 0, -1 ) ); + $$self{_CFG}{'environments'}{$uuid}{'passphrase'} = encode( 'iso-8859-1', _( $self, 'entryPassphrase' ) -> get_chars( 0, -1 ) ); $$self{_CFG}{'environments'}{$uuid}{'public key'} = _( $self, 'fileCfgPublicKey' ) -> get_filename // ''; $$self{_CFG}{'environments'}{$uuid}{'public key'} =~ s/^(.+?\/\/)(.+)$/$2/go; $$self{_CFG}{'environments'}{$uuid}{'use prepend command'} = _( $self, 'cbEditPrependCommand' ) -> get_active; - $$self{_CFG}{'environments'}{$uuid}{'prepend command'} = encode( 'unicode', _( $self, 'entryEditPrependCommand' ) -> get_chars( 0, -1 ) ); + $$self{_CFG}{'environments'}{$uuid}{'prepend command'} = encode( 'iso-8859-1', _( $self, 'entryEditPrependCommand' ) -> get_chars( 0, -1 ) ); $$self{_CFG}{'environments'}{$uuid}{'quote command'} = _( $self, 'cbCfgQuoteCommand' ) -> get_active; $$self{_CFG}{'environments'}{$uuid}{'use sudo'} = _( $self, 'cbEditUseSudo' ) -> get_active; $$self{_CFG}{'environments'}{$uuid}{'save session logs'} = _( $self, 'cbEditSaveSessionLogs' ) -> get_active; @@ -780,13 +780,13 @@ sub _saveConfiguration { $$self{_CFG}{'environments'}{$uuid}{'session logs amount'} = _( $self, 'spEditSaveSessionLogs' ) -> get_text; $$self{_CFG}{'environments'}{$uuid}{'ip'} = _( $self, 'entryIP' ) -> get_chars( 0, -1 ); $$self{_CFG}{'environments'}{$uuid}{'port'} = _( $self, 'entryPort' ) -> get_chars( 0, -1 ); - $$self{_CFG}{'environments'}{$uuid}{'user'} = encode( 'unicode', _( $self, 'entryUser' ) -> get_chars( 0, -1 ) ); - $$self{_CFG}{'environments'}{$uuid}{'pass'} = encode( 'unicode', _( $self, 'entryPassword' ) -> get_property( 'text' ) ); + $$self{_CFG}{'environments'}{$uuid}{'user'} = encode( 'iso-8859-1', _( $self, 'entryUser' ) -> get_chars( 0, -1 ) ); + $$self{_CFG}{'environments'}{$uuid}{'pass'} = encode( 'iso-8859-1', _( $self, 'entryPassword' ) -> get_property( 'text' ) ); $$self{_CFG}{'environments'}{$uuid}{'method'} = _( $self, 'comboMethod' ) -> get_active_text; $$self{_CFG}{'environments'}{$uuid}{'title'} = _( $self, 'entryTabWindowTitle' ) -> get_chars( 0, -1 ) || "$$self{_CFG}{'environments'}{$uuid}{'name'} "; $$self{_CFG}{'environments'}{$uuid}{'auth fallback'} = ! _( $self, 'cbCfgAuthFallback' ) -> get_active; $$self{_CFG}{'environments'}{$uuid}{'send string active'} = _( $self, 'cbEditSendString' ) -> get_active; - $$self{_CFG}{'environments'}{$uuid}{'send string txt'} = encode( 'unicode', _( $self, 'entryEditSendString' ) -> get_chars( 0, -1 ) ); + $$self{_CFG}{'environments'}{$uuid}{'send string txt'} = encode( 'iso-8859-1', _( $self, 'entryEditSendString' ) -> get_chars( 0, -1 ) ); $$self{_CFG}{'environments'}{$uuid}{'send string intro'} = _( $self, 'cbEditSendStringIntro' ) -> get_active; $$self{_CFG}{'environments'}{$uuid}{'send string every'} = _( $self, 'entryEditSendStringSeconds' ) -> get_chars( 0, -1 ); $$self{_CFG}{'environments'}{$uuid}{'autoreconnect'} = _( $self, 'cbCfgAutoreconnect' ) -> get_active; @@ -796,7 +796,7 @@ sub _saveConfiguration { $$self{_CFG}{'environments'}{$uuid}{'startup script name'} = _( $self, 'comboStartScript' ) -> get_active_text; $$self{_CFG}{'environments'}{$uuid}{'autossh'} = _( $self, 'cbAutossh' ) -> get_active; $$self{_CFG}{'environments'}{$uuid}{'infer user pass from KPX'} = _( $self, 'cbInferUserPassKPX' ) -> get_active; - $$self{_CFG}{'environments'}{$uuid}{'KPX title regexp'} = encode( 'unicode', _( $self, 'entryKPXRE' ) -> get_chars( 0, -1 ) ); + $$self{_CFG}{'environments'}{$uuid}{'KPX title regexp'} = encode( 'iso-8859-1', _( $self, 'entryKPXRE' ) -> get_chars( 0, -1 ) ); $$self{_CFG}{'environments'}{$uuid}{'infer from KPX where'} = _( $self, 'comboKPXWhere' ) -> get_active; $$self{_CFG}{'environments'}{$uuid}{'remove control chars'} = _( $self, 'cbCfgRemoveCtrlChars' ) -> get_active; diff --git a/lib/PACMain.pm b/lib/PACMain.pm index ab3e0c9..1b9fa1e 100644 --- a/lib/PACMain.pm +++ b/lib/PACMain.pm @@ -36,7 +36,7 @@ use Storable qw ( thaw dclone nstore retrieve ); use Encode; use File::Copy; use Net::Ping; -use OSSP::uuid; +use UUID; use POSIX ":sys_wait_h"; use POSIX qw ( strftime ); use Crypt::CBC; @@ -1075,9 +1075,7 @@ sub _setupCallbacks { return 1 if ( ( ! defined $new_group ) || ( $new_group =~ /^\s*$/go ) || ( $new_group eq '__PAC__ROOT__' ) ); # Generate the UUID for the new Group - my $uuid = OSSP::uuid -> new; $uuid -> make( "v4" ); - my $txt_uuid = $uuid -> export( "str" ); - undef $uuid; + my $txt_uuid = UUID::uuid(); # Add this new group to the list of children of it's parent $$self{_CFG}{'environments'}{$group_uuid}{'children'}{$txt_uuid} = 1; @@ -1456,9 +1454,7 @@ sub _setupCallbacks { my ( $new_conn, $new_title ) = _wAddRenameNode( 'add', $$self{_CFG}, $group_uuid ); return 1 if ( ( ! defined $new_conn ) || ( $new_conn =~ /^\s*$/go ) || ( $new_conn eq '__PAC__ROOT__' ) ); - my $uuid = OSSP::uuid -> new; $uuid -> make( "v4" ); - my $txt_uuid = $uuid -> export( "str" ); - undef $uuid; + my $txt_uuid = UUID::uuid(); # Create and initialize the new connection in configuration $$self{_CFG}{'environments'}{$txt_uuid}{'_is_group'} = 0; @@ -3237,7 +3233,7 @@ sub _updateGUIWithUUID { __PAC__ROOT__DESCRIPTION__ } else { - $$self{_GUI}{descBuffer} -> set_text( encode( 'unicode', $$self{_CFG}{'environments'}{$uuid}{'description'} // '' ) ); + $$self{_GUI}{descBuffer} -> set_text( encode( 'iso-8859-1', $$self{_CFG}{'environments'}{$uuid}{'description'} // '' ) ); } if ( $$self{_CFG}{'defaults'}{'show statistics'} ) { @@ -3575,9 +3571,7 @@ sub __dupNodes { my $cfg = shift; # Generate a new UUID for the copied element - my $new_uuid = OSSP::uuid -> new; $new_uuid -> make( "v4" ); - my $new_txt_uuid = $new_uuid -> export( "str" ); - undef $new_uuid; + my $new_txt_uuid = UUID::uuid(); # Clone the node with the NEW UUID $$cfg{$new_txt_uuid} = dclone( $$self{_CFG}{'environments'}{$uuid} ); diff --git a/lib/PACUtils.pm b/lib/PACUtils.pm index 7830e4e..bf53ee4 100644 --- a/lib/PACUtils.pm +++ b/lib/PACUtils.pm @@ -38,7 +38,7 @@ use Sys::Hostname; use Net::ARP; use Net::Ping; use YAML; -use OSSP::uuid; +use UUID; use Encode; use KeePass; use DynaLoader; # Required for PACTerminal and PACShell PAC modules @@ -107,19 +107,19 @@ require Exporter; our $APPNAME = 'PAC'; our $APPVERSION = '4.5.5.8'; our $DEBUG_LEVEL = 1; -our $ARCH = ''; +our $ARCH = ''; my $ARCH_TMP = `/bin/uname -m 2>&1`; -if ( $ARCH_TMP =~ /x86_64/gio ) { $ARCH = 64; } -elsif ( $ARCH_TMP =~ /ppc64/gio ) { $ARCH = 'PPC64'; } +if ( $ARCH_TMP =~ /x86_64/gio ) { $ARCH = 64; } +elsif ( $ARCH_TMP =~ /ppc64/gio ) { $ARCH = 'PPC64'; } elsif ( $ARCH_TMP =~ /armv7l/gio ) { $ARCH = 'ARMV7L'; } -elsif ( $ARCH_TMP =~ /arm/gio ) { $ARCH = 'ARM'; } -else { $ARCH = 32; } -my $RES_DIR = $RealBin . '/res'; +elsif ( $ARCH_TMP =~ /arm/gio ) { $ARCH = 'ARM'; } +else { $ARCH = 32; } +my $RES_DIR = $RealBin . '/res'; my $SPLASH_IMG = $RES_DIR . '/pac256x256.jpg'; -my $CFG_DIR = $ENV{'HOME'} . '/.config/pac'; +my $CFG_DIR = $ENV{'HOME'} . '/.config/pac'; my $CFG_FILE = $CFG_DIR . '/pac.yml'; my $R_CFG_FILE = $PACMain::R_CFG_FILE; -my $CIPHER = Crypt::CBC -> new( -key => 'PAC Manager (David Torrejon Vaquerizas, david.tv@gmail.com)', -cipher => 'Blowfish', -salt => '12345678' ) or die "ERROR: $!"; +my $CIPHER = Crypt::CBC -> new( -nodeprecate=>1, -key => 'PAC Manager (David Torrejon Vaquerizas, david.tv@gmail.com)', -cipher => 'Blowfish', -salt => '12345678' ) or die "ERROR: $!"; my %WINDOWSPLASH; my %WINDOWPROGRESS; @@ -2388,8 +2388,8 @@ sub _cipherCFG { ( $$cfg{'defaults'}{'global variables'}{$var}{'hidden'} eq '1' ) and $$cfg{'defaults'}{'global variables'}{$var}{'value'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$cfg{'defaults'}{'global variables'}{$var}{'value'} ) ); } - defined $$cfg{'defaults'}{'keepass'} and $$cfg{'defaults'}{'keepass'}{'password'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$cfg{'defaults'}{'keepass'}{'password'} ) ); - $$cfg{'defaults'}{'sudo password'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$cfg{'defaults'}{'sudo password'} ) ); + #defined $$cfg{'defaults'}{'keepass'} and $$cfg{'defaults'}{'keepass'}{'password'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$cfg{'defaults'}{'keepass'}{'password'} ) ); + #$$cfg{'defaults'}{'sudo password'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$cfg{'defaults'}{'sudo password'} ) ); foreach my $uuid ( keys %{ $$cfg{'environments'} } ) { if ( $uuid =~ /^HASH/go ) { @@ -2400,8 +2400,8 @@ sub _cipherCFG { delete $$cfg{'environments'}{$uuid}{'pass'}; next; } - $$cfg{'environments'}{$uuid}{'pass'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$cfg{'environments'}{$uuid}{'pass'} ) ); - $$cfg{'environments'}{$uuid}{'passphrase'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$cfg{'environments'}{$uuid}{'passphrase'} ) ); + #$$cfg{'environments'}{$uuid}{'pass'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$cfg{'environments'}{$uuid}{'pass'} ) ); + #$$cfg{'environments'}{$uuid}{'passphrase'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$cfg{'environments'}{$uuid}{'passphrase'} ) ); foreach my $hash ( @{ $$cfg{'environments'}{$uuid}{'expect'} } ) { ( $$hash{'hidden'} eq '1' ) and $$hash{'send'} = $CIPHER -> encrypt_hex( encode( 'utf8', $$hash{'send'} ) ); diff --git a/lib/ex/vte64/auto/Gnome2/Vte/Vte.so b/lib/ex/vte64/auto/Gnome2/Vte/Vte.so old mode 100644 new mode 100755 index 8e65163..8ed5a17 Binary files a/lib/ex/vte64/auto/Gnome2/Vte/Vte.so and b/lib/ex/vte64/auto/Gnome2/Vte/Vte.so differ diff --git a/lib/ex/vte64/auto/Gnome2/Vte/Vte.so.bak b/lib/ex/vte64/auto/Gnome2/Vte/Vte.so.bak new file mode 100755 index 0000000..9492649 Binary files /dev/null and b/lib/ex/vte64/auto/Gnome2/Vte/Vte.so.bak differ diff --git a/pac.list b/pac.list index 529fb24..cc393e0 100644 --- a/pac.list +++ b/pac.list @@ -52,7 +52,7 @@ $icondir=/usr/share/pixmaps %requires libgtk2-gladexml-perl %requires libgtk2-ex-simple-list-perl %requires libnet-arp-perl -%requires libossp-uuid-perl +%requires lib-uuid-perl %requires openssh-client %requires telnet %requires ftp