Module: Rex::Parser::NetSarang
- Defined in:
- lib/rex/parser/net_sarang.rb
Defined Under Namespace
Classes: NetSarangCrypto
Instance Method Summary collapse
-
#parser_xfp(file) ⇒ version, ...
parser xfp session file.
-
#parser_xsh(input) ⇒ Array
Parse xsh session file provided as a string.
Instance Method Details
#parser_xfp(file) ⇒ version, ...
parser xfp session file
99 100 101 102 103 104 105 106 107 |
# File 'lib/rex/parser/net_sarang.rb', line 99 def parser_xfp(file) ini = Rex::Parser::Ini.from_s(file) version = ini['SessionInfo']['Version'] port = ini['Connection']['Port'] host = ini['Connection']['Host'] username = ini['Connection']['UserName'] password = ini['Connection']['Password'] [version, host, port, username, password] end |
#parser_xsh(input) ⇒ Array
Parse xsh session file provided as a string.
85 86 87 88 89 90 91 92 93 |
# File 'lib/rex/parser/net_sarang.rb', line 85 def parser_xsh(input) ini = Rex::Parser::Ini.from_s(input) version = ini['SessionInfo']['Version'] port = ini['CONNECTION']['Port'] host = ini['CONNECTION']['Host'] username = ini['CONNECTION:AUTHENTICATION']['UserName'] password = ini['CONNECTION:AUTHENTICATION']['Password'] || nil [version, host, port, username, password] end |