Module: Msf::Exploit::Remote::X11::Extension
- Includes:
- Read, Rex::Proto::X11::Extension
- Included in:
- Msf::Exploit::Remote::X11
- Defined in:
- lib/msf/core/exploit/remote/x11/extension.rb
Overview
This mixin is a simplistic implementation of X11 initial connection protocol
Wireshark dissector: wiki.wireshark.org/X11
Instance Method Summary collapse
-
#x11_query_extension(extension_name, call_count) ⇒ Object
Query for an extension, converts the name of the extension to the ID #.
-
#x11_toggle_extension(extension_id, wanted_major: 0, toggle: true) ⇒ Object
toggles an extension on or off (enable/disable).
Methods included from Read
Instance Method Details
#x11_query_extension(extension_name, call_count) ⇒ Object
Query for an extension, converts the name of the extension to the ID #
14 15 16 17 |
# File 'lib/msf/core/exploit/remote/x11/extension.rb', line 14 def x11_query_extension(extension_name, call_count) sock.put(X11QueryExtensionRequest.new(extension: extension_name, unused2: call_count).to_binary_s) x11_read_response(X11QueryExtensionResponse) end |
#x11_toggle_extension(extension_id, wanted_major: 0, toggle: true) ⇒ Object
toggles an extension on or off (enable/disable)
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/msf/core/exploit/remote/x11/extension.rb', line 20 def x11_toggle_extension(extension_id, wanted_major: 0, toggle: true) sock.put( X11ExtensionToggleRequest.new( opcode: extension_id, toggle: (toggle ? 0 : 1), # 0 is enable, 1 is disable wanted_major: wanted_major ).to_binary_s ) x11_read_response(X11ExtensionToggleResponse) end |