Module: Nexpose::CredentialHelper
- Included in:
- Credential
- Defined in:
- lib/nexpose/credential_helper.rb
Instance Method Summary collapse
-
#set_as400_service(domain = nil, username = nil, password = nil) ⇒ Object
sets the IBM AS/400 service.
-
#set_cifs_service(domain = nil, username = nil, password = nil) ⇒ Object
sets the Microsoft Windows/Samba (SMB/CIFS) service.
-
#set_cifshash_service(domain = nil, username = nil, password = nil) ⇒ Object
sets the Microsoft Windows/Samba LM/NTLM Hash (SMB/CIFS) service.
-
#set_cvs_service(username = nil, password = nil) ⇒ Object
sets the Concurrent Versioning System (CVS) service.
-
#set_db2_service(database = nil, username = nil, password = nil) ⇒ Object
sets the DB2 service.
-
#set_ftp_service(username = nil, password = nil) ⇒ Object
sets the File Transfer Protocol (FTP) service.
-
#set_http_service(domain = nil, username = nil, password = nil) ⇒ Object
sets the Web Site HTTP Authentication service.
-
#set_mysql_service(database = nil, username = nil, password = nil) ⇒ Object
sets the MySQL Server service.
-
#set_notes_service(password = nil) ⇒ Object
sets the Lotus Notes/Domino service.
-
#set_oracle_service(sid = nil, username = nil, password = nil) ⇒ Object
sets the Oracle service.
-
#set_oracle_service_using_service_name_auth(service_name = nil, username = nil, password = nil) ⇒ Object
sets the Oracle service using Service Name authentication.
-
#set_pop_service(username = nil, password = nil) ⇒ Object
sets the Post Office Protocol (POP) service.
-
#set_postgresql_service(database = nil, username = nil, password = nil) ⇒ Object
sets the PostgreSQL service.
-
#set_remote_execution_service(username = nil, password = nil) ⇒ Object
sets the Remote Execution service.
-
#set_snmp_service(community_name = nil) ⇒ Object
sets the Simple Network Management Protocol v1/v2c service.
-
#set_snmpv3_service(authentication_type = Credential::AuthenticationType::NOAUTH, username = nil, password = nil, privacy_type = Credential::PrivacyType::NOPRIV, privacy_password = nil) ⇒ Object
sets the Simple Network Management Protocol v3 service.
-
#set_ssh_key_service(username, pemkey, password = nil, elevation_type = nil, elevation_user = nil, elevation_password = nil) ⇒ Object
sets the Secure Shell (SSH) Public Key service.
-
#set_ssh_service(username = nil, password = nil, elevation_type = nil, elevation_user = nil, elevation_password = nil) ⇒ Object
sets the Secure Shell (SSH) service.
-
#set_sybase_service(database = nil, domain = nil, username = nil, password = nil) ⇒ Object
sets the Sybase SQL Server service.
-
#set_tds_service(database = nil, domain = nil, username = nil, password = nil) ⇒ Object
sets the Microsoft SQL Server service.
-
#set_telnet_service(username = nil, password = nil) ⇒ Object
sets the Telnet service.
Instance Method Details
#set_as400_service(domain = nil, username = nil, password = nil) ⇒ Object
sets the IBM AS/400 service.
29 30 31 32 33 34 |
# File 'lib/nexpose/credential_helper.rb', line 29 def set_as400_service(domain = nil, username = nil, password = nil) self.domain = domain self.user_name = username self.password = password self.service = Credential::Service::AS400 end |
#set_cifs_service(domain = nil, username = nil, password = nil) ⇒ Object
sets the Microsoft Windows/Samba (SMB/CIFS) service.
53 54 55 56 57 58 |
# File 'lib/nexpose/credential_helper.rb', line 53 def set_cifs_service(domain = nil, username = nil, password = nil) self.domain = domain self.user_name = username self.password = password self.service = Credential::Service::CIFS end |
#set_cifshash_service(domain = nil, username = nil, password = nil) ⇒ Object
sets the Microsoft Windows/Samba LM/NTLM Hash (SMB/CIFS) service.
61 62 63 64 65 66 |
# File 'lib/nexpose/credential_helper.rb', line 61 def set_cifshash_service(domain = nil, username = nil, password = nil) self.domain = domain self.user_name = username self.password = password self.service = Credential::Service::CIFSHASH end |
#set_cvs_service(username = nil, password = nil) ⇒ Object
sets the Concurrent Versioning System (CVS) service
7 8 9 10 11 |
# File 'lib/nexpose/credential_helper.rb', line 7 def set_cvs_service(username = nil, password = nil) self.user_name = username self.password = password self.service = Credential::Service::CVS end |
#set_db2_service(database = nil, username = nil, password = nil) ⇒ Object
sets the DB2 service
14 15 16 17 18 19 |
# File 'lib/nexpose/credential_helper.rb', line 14 def set_db2_service(database = nil, username = nil, password = nil) self.database = database self.user_name = username self.password = password self.service = Credential::Service::DB2 end |
#set_ftp_service(username = nil, password = nil) ⇒ Object
sets the File Transfer Protocol (FTP) service
22 23 24 25 26 |
# File 'lib/nexpose/credential_helper.rb', line 22 def set_ftp_service(username = nil, password = nil) self.user_name = username self.password = password self.service = Credential::Service::FTP end |
#set_http_service(domain = nil, username = nil, password = nil) ⇒ Object
sets the Web Site HTTP Authentication service.
169 170 171 172 173 174 |
# File 'lib/nexpose/credential_helper.rb', line 169 def set_http_service(domain = nil, username = nil, password = nil) self.domain = domain self.user_name = username self.password = password self.service = Credential::Service::HTTP end |
#set_mysql_service(database = nil, username = nil, password = nil) ⇒ Object
sets the MySQL Server service.
69 70 71 72 73 74 |
# File 'lib/nexpose/credential_helper.rb', line 69 def set_mysql_service(database = nil, username = nil, password = nil) self.database = database self.user_name = username self.password = password self.service = Credential::Service::MYSQL end |
#set_notes_service(password = nil) ⇒ Object
sets the Lotus Notes/Domino service.
37 38 39 40 |
# File 'lib/nexpose/credential_helper.rb', line 37 def set_notes_service(password = nil) self.notes_id_password = password self.service = Credential::Service::NOTES end |
#set_oracle_service(sid = nil, username = nil, password = nil) ⇒ Object
sets the Oracle service.
77 78 79 80 81 82 |
# File 'lib/nexpose/credential_helper.rb', line 77 def set_oracle_service(sid = nil, username = nil, password = nil) self.database = sid self.user_name = username self.password = password self.service = Credential::Service::ORACLE end |
#set_oracle_service_using_service_name_auth(service_name = nil, username = nil, password = nil) ⇒ Object
sets the Oracle service using Service Name authentication.
85 86 87 88 89 90 |
# File 'lib/nexpose/credential_helper.rb', line 85 def set_oracle_service_using_service_name_auth(service_name = nil, username = nil, password = nil) self.database = service_name self.user_name = username self.password = password self.service = Credential::Service::ORACLE_SERVICE_NAME end |
#set_pop_service(username = nil, password = nil) ⇒ Object
sets the Post Office Protocol (POP) service.
93 94 95 96 97 |
# File 'lib/nexpose/credential_helper.rb', line 93 def set_pop_service(username = nil, password = nil) self.user_name = username self.password = password self.service = Credential::Service::POP end |
#set_postgresql_service(database = nil, username = nil, password = nil) ⇒ Object
sets the PostgreSQL service.
100 101 102 103 104 105 |
# File 'lib/nexpose/credential_helper.rb', line 100 def set_postgresql_service(database = nil, username = nil, password = nil) self.database = database self.user_name = username self.password = password self.service = Credential::Service::POSTGRESQL end |
#set_remote_execution_service(username = nil, password = nil) ⇒ Object
sets the Remote Execution service.
108 109 110 111 112 |
# File 'lib/nexpose/credential_helper.rb', line 108 def set_remote_execution_service(username = nil, password = nil) self.user_name = username self.password = password self.service = Credential::Service::REMOTE_EXECUTION end |
#set_snmp_service(community_name = nil) ⇒ Object
sets the Simple Network Management Protocol v1/v2c service.
136 137 138 139 |
# File 'lib/nexpose/credential_helper.rb', line 136 def set_snmp_service(community_name = nil) self.community_name = community_name self.service = Credential::Service::SNMP end |
#set_snmpv3_service(authentication_type = Credential::AuthenticationType::NOAUTH, username = nil, password = nil, privacy_type = Credential::PrivacyType::NOPRIV, privacy_password = nil) ⇒ Object
sets the Simple Network Management Protocol v3 service.
142 143 144 145 146 147 148 149 |
# File 'lib/nexpose/credential_helper.rb', line 142 def set_snmpv3_service(authentication_type = Credential::AuthenticationType::NOAUTH, username = nil, password = nil, privacy_type = Credential::PrivacyType::NOPRIV, privacy_password = nil) self.authentication_type = authentication_type self.user_name = username self.password = password self.privacy_type = privacy_type self.privacy_password = privacy_password self.service = Credential::Service::SNMPV3 end |
#set_ssh_key_service(username, pemkey, password = nil, elevation_type = nil, elevation_user = nil, elevation_password = nil) ⇒ Object
sets the Secure Shell (SSH) Public Key service.
125 126 127 128 129 130 131 132 133 |
# File 'lib/nexpose/credential_helper.rb', line 125 def set_ssh_key_service(username, pemkey, password = nil, elevation_type = nil, elevation_user = nil, elevation_password = nil) self.user_name = username self.password = password self.pem_format_private_key = pemkey self. = elevation_type || Credential::ElevationType::NONE self. = elevation_user self. = elevation_password self.service = Credential::Service::SSH_KEY end |
#set_ssh_service(username = nil, password = nil, elevation_type = nil, elevation_user = nil, elevation_password = nil) ⇒ Object
sets the Secure Shell (SSH) service.
115 116 117 118 119 120 121 122 |
# File 'lib/nexpose/credential_helper.rb', line 115 def set_ssh_service(username = nil, password = nil, elevation_type = nil, elevation_user = nil, elevation_password = nil) self.user_name = username self.password = password self. = elevation_type || Credential::ElevationType::NONE self. = elevation_user self. = elevation_password self.service = Credential::Service::SSH end |
#set_sybase_service(database = nil, domain = nil, username = nil, password = nil) ⇒ Object
sets the Sybase SQL Server service.
152 153 154 155 156 157 158 159 |
# File 'lib/nexpose/credential_helper.rb', line 152 def set_sybase_service(database = nil, domain = nil, username = nil, password = nil) self.database = database self.domain = domain self.use_windows_auth = domain.nil? self.user_name = username self.password = password self.service = Credential::Service::SYBASE end |
#set_tds_service(database = nil, domain = nil, username = nil, password = nil) ⇒ Object
sets the Microsoft SQL Server service.
43 44 45 46 47 48 49 50 |
# File 'lib/nexpose/credential_helper.rb', line 43 def set_tds_service(database = nil, domain = nil, username = nil, password = nil) self.database = database self.domain = domain self.use_windows_auth = domain.nil? self.user_name = username self.password = password self.service = Credential::Service::TDS end |
#set_telnet_service(username = nil, password = nil) ⇒ Object
sets the Telnet service.
162 163 164 165 166 |
# File 'lib/nexpose/credential_helper.rb', line 162 def set_telnet_service(username = nil, password = nil) self.user_name = username self.password = password self.service = Credential::Service::TELNET end |