librex 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +12 -0
- data/lib/rex.rb +0 -0
- data/lib/rex.rb.ts.rb +0 -0
- data/lib/rex/LICENSE +0 -0
- data/lib/rex/arch.rb +0 -0
- data/lib/rex/arch/sparc.rb +0 -0
- data/lib/rex/arch/sparc.rb.ut.rb +0 -0
- data/lib/rex/arch/x86.rb +0 -0
- data/lib/rex/arch/x86.rb.ut.rb +0 -0
- data/lib/rex/assembly/nasm.rb +0 -0
- data/lib/rex/assembly/nasm.rb.ut.rb +0 -0
- data/lib/rex/codepage.map +0 -0
- data/lib/rex/compat.rb +0 -0
- data/lib/rex/constants.rb +0 -0
- data/lib/rex/elfparsey.rb +0 -0
- data/lib/rex/elfparsey/elf.rb +0 -0
- data/lib/rex/elfparsey/elfbase.rb +2 -4
- data/lib/rex/elfparsey/exceptions.rb +0 -0
- data/lib/rex/elfscan.rb +0 -0
- data/lib/rex/elfscan/scanner.rb +0 -0
- data/lib/rex/elfscan/search.rb +10 -10
- data/lib/rex/encoder/alpha2.rb +0 -0
- data/lib/rex/encoder/alpha2/alpha_mixed.rb +0 -0
- data/lib/rex/encoder/alpha2/alpha_upper.rb +0 -0
- data/lib/rex/encoder/alpha2/generic.rb +0 -0
- data/lib/rex/encoder/alpha2/unicode_mixed.rb +0 -0
- data/lib/rex/encoder/alpha2/unicode_upper.rb +0 -0
- data/lib/rex/encoder/ndr.rb +0 -0
- data/lib/rex/encoder/ndr.rb.ut.rb +0 -0
- data/lib/rex/encoder/nonalpha.rb +0 -0
- data/lib/rex/encoder/nonupper.rb +0 -0
- data/lib/rex/encoder/xdr.rb +0 -0
- data/lib/rex/encoder/xdr.rb.ut.rb +0 -0
- data/lib/rex/encoder/xor.rb +0 -0
- data/lib/rex/encoder/xor/dword.rb +0 -0
- data/lib/rex/encoder/xor/dword_additive.rb +0 -0
- data/lib/rex/encoders/xor_dword.rb +0 -0
- data/lib/rex/encoders/xor_dword_additive.rb +0 -0
- data/lib/rex/encoders/xor_dword_additive.rb.ut.rb +0 -0
- data/lib/rex/encoding/xor.rb +0 -0
- data/lib/rex/encoding/xor.rb.ts.rb +0 -0
- data/lib/rex/encoding/xor/byte.rb +0 -0
- data/lib/rex/encoding/xor/byte.rb.ut.rb +0 -0
- data/lib/rex/encoding/xor/dword.rb +0 -0
- data/lib/rex/encoding/xor/dword.rb.ut.rb +0 -0
- data/lib/rex/encoding/xor/dword_additive.rb +0 -0
- data/lib/rex/encoding/xor/dword_additive.rb.ut.rb +0 -0
- data/lib/rex/encoding/xor/exceptions.rb +0 -0
- data/lib/rex/encoding/xor/generic.rb +0 -0
- data/lib/rex/encoding/xor/generic.rb.ut.rb +0 -0
- data/lib/rex/encoding/xor/qword.rb +0 -0
- data/lib/rex/encoding/xor/word.rb +0 -0
- data/lib/rex/encoding/xor/word.rb.ut.rb +0 -0
- data/lib/rex/exceptions.rb +0 -0
- data/lib/rex/exceptions.rb.ut.rb +0 -0
- data/lib/rex/exploitation/cmdstager.rb +0 -0
- data/lib/rex/exploitation/cmdstager/base.rb +6 -1
- data/lib/rex/exploitation/cmdstager/debug_asm.rb +0 -0
- data/lib/rex/exploitation/cmdstager/debug_write.rb +0 -0
- data/lib/rex/exploitation/cmdstager/tftp.rb +8 -8
- data/lib/rex/exploitation/cmdstager/vbs.rb +0 -0
- data/lib/rex/exploitation/egghunter.rb +143 -36
- data/lib/rex/exploitation/egghunter.rb.ut.rb +0 -0
- data/lib/rex/exploitation/encryptjs.rb +0 -0
- data/lib/rex/exploitation/heaplib.js.b64 +0 -0
- data/lib/rex/exploitation/heaplib.rb +0 -0
- data/lib/rex/exploitation/javascriptosdetect.rb +114 -15
- data/lib/rex/exploitation/obfuscatejs.rb +0 -0
- data/lib/rex/exploitation/omelet.rb +320 -0
- data/lib/rex/exploitation/omelet.rb.ut.rb +13 -0
- data/lib/rex/exploitation/opcodedb.rb +0 -0
- data/lib/rex/exploitation/opcodedb.rb.ut.rb +0 -0
- data/lib/rex/exploitation/seh.rb +0 -0
- data/lib/rex/exploitation/seh.rb.ut.rb +0 -0
- data/lib/rex/file.rb +1 -1
- data/lib/rex/file.rb.ut.rb +0 -0
- data/lib/rex/image_source.rb +0 -0
- data/lib/rex/image_source/disk.rb +0 -0
- data/lib/rex/image_source/image_source.rb +0 -0
- data/lib/rex/image_source/memory.rb +0 -0
- data/lib/rex/io/bidirectional_pipe.rb +0 -0
- data/lib/rex/io/datagram_abstraction.rb +0 -0
- data/lib/rex/io/stream.rb +1 -1
- data/lib/rex/io/stream_abstraction.rb +0 -0
- data/lib/rex/io/stream_server.rb +0 -0
- data/lib/rex/job_container.rb +0 -1
- data/lib/rex/logging.rb +0 -0
- data/lib/rex/logging/log_dispatcher.rb +0 -0
- data/lib/rex/logging/log_sink.rb +0 -0
- data/lib/rex/logging/sinks/flatfile.rb +0 -0
- data/lib/rex/logging/sinks/stderr.rb +0 -0
- data/lib/rex/machparsey.rb +0 -0
- data/lib/rex/machparsey/exceptions.rb +0 -0
- data/lib/rex/machparsey/machbase.rb +0 -0
- data/lib/rex/machscan.rb +0 -0
- data/lib/rex/machscan/scanner.rb +0 -0
- data/lib/rex/mime.rb +0 -0
- data/lib/rex/mime/header.rb +0 -0
- data/lib/rex/mime/message.rb +0 -0
- data/lib/rex/mime/part.rb +0 -0
- data/lib/rex/nop/opty2.rb +0 -0
- data/lib/rex/nop/opty2.rb.ut.rb +0 -0
- data/lib/rex/nop/opty2_tables.rb +0 -0
- data/lib/rex/ole.rb +0 -0
- data/lib/rex/ole/clsid.rb +0 -0
- data/lib/rex/ole/difat.rb +0 -0
- data/lib/rex/ole/directory.rb +0 -0
- data/lib/rex/ole/direntry.rb +0 -0
- data/lib/rex/ole/docs/dependencies.txt +8 -0
- data/lib/rex/ole/docs/references.txt +1 -0
- data/lib/rex/ole/fat.rb +0 -0
- data/lib/rex/ole/header.rb +3 -3
- data/lib/rex/ole/minifat.rb +0 -0
- data/lib/rex/ole/storage.rb +4 -4
- data/lib/rex/ole/stream.rb +0 -0
- data/lib/rex/ole/substorage.rb +0 -0
- data/lib/rex/ole/util.rb +0 -0
- data/lib/rex/parser/arguments.rb +0 -0
- data/lib/rex/parser/arguments.rb.ut.rb +0 -0
- data/lib/rex/parser/ini.rb +0 -0
- data/lib/rex/parser/ini.rb.ut.rb +0 -0
- data/lib/rex/parser/nexpose_xml.rb +0 -0
- data/lib/rex/parser/nmap_xml.rb +0 -0
- data/lib/rex/payloads.rb +0 -0
- data/lib/rex/payloads/win32.rb +0 -0
- data/lib/rex/payloads/win32/common.rb +0 -0
- data/lib/rex/payloads/win32/kernel.rb +0 -0
- data/lib/rex/payloads/win32/kernel/common.rb +0 -0
- data/lib/rex/payloads/win32/kernel/migration.rb +0 -0
- data/lib/rex/payloads/win32/kernel/recovery.rb +0 -0
- data/lib/rex/peparsey.rb +0 -0
- data/lib/rex/peparsey/exceptions.rb +0 -0
- data/lib/rex/peparsey/pe.rb +7 -1
- data/lib/rex/peparsey/pe_memdump.rb +0 -0
- data/lib/rex/peparsey/pebase.rb +27 -2
- data/lib/rex/peparsey/section.rb +0 -0
- data/lib/rex/pescan.rb +0 -0
- data/lib/rex/pescan/analyze.rb +0 -0
- data/lib/rex/pescan/scanner.rb +0 -0
- data/lib/rex/pescan/search.rb +0 -0
- data/lib/rex/platforms.rb +0 -0
- data/lib/rex/platforms/windows.rb +0 -0
- data/lib/rex/poly.rb +0 -0
- data/lib/rex/poly/block.rb +0 -0
- data/lib/rex/poly/register.rb +0 -0
- data/lib/rex/poly/register/x86.rb +0 -0
- data/lib/rex/post.rb +0 -0
- data/lib/rex/post/dir.rb +0 -0
- data/lib/rex/post/file.rb +0 -0
- data/lib/rex/post/file_stat.rb +0 -0
- data/lib/rex/post/gen.pl +0 -0
- data/lib/rex/post/io.rb +0 -0
- data/lib/rex/post/meterpreter.rb +0 -0
- data/lib/rex/post/meterpreter/channel.rb +0 -0
- data/lib/rex/post/meterpreter/channel_container.rb +0 -0
- data/lib/rex/post/meterpreter/channels/pool.rb +0 -0
- data/lib/rex/post/meterpreter/channels/pools/file.rb +0 -0
- data/lib/rex/post/meterpreter/channels/pools/stream_pool.rb +0 -0
- data/lib/rex/post/meterpreter/channels/stream.rb +0 -0
- data/lib/rex/post/meterpreter/client.rb +3 -0
- data/lib/rex/post/meterpreter/client_core.rb +0 -0
- data/lib/rex/post/meterpreter/dependencies.rb +0 -0
- data/lib/rex/post/meterpreter/extension.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/espia/espia.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/espia/tlv.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/incognito/incognito.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/incognito/tlv.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/networkpug/networkpug.rb +57 -0
- data/lib/rex/post/meterpreter/extensions/networkpug/tlv.rb +15 -0
- data/lib/rex/post/meterpreter/extensions/priv/fs.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/priv/passwd.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/priv/priv.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/priv/tlv.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/sniffer/sniffer.rb +2 -1
- data/lib/rex/post/meterpreter/extensions/sniffer/tlv.rb +12 -10
- data/lib/rex/post/meterpreter/extensions/stdapi/constants.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb +31 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/file_stat.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/net/config.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/net/interface.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/net/route.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_server_channel.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/{railgun → stdapi/railgun}/api_constants.rb +38106 -38105
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_advapi32.rb +1804 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_iphlpapi.rb +96 -0
- data/lib/rex/post/meterpreter/extensions/{railgun → stdapi/railgun/def}/def_kernel32.rb +3848 -3678
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ntdll.rb +153 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_shell32.rb +21 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_user32.rb +3169 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ws2_32.rb +599 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/model.rb +540 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb +308 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/railgun.rb +196 -0
- data/lib/rex/post/meterpreter/extensions/{railgun → stdapi/railgun}/tlv.rb +6 -9
- data/lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb +5 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log_subsystem/event_record.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/power.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/image.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/io.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/memory.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/thread.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/registry.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_key.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_value.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb +0 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb +6 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/ui.rb +0 -0
- data/lib/rex/post/meterpreter/inbound_packet_handler.rb +0 -0
- data/lib/rex/post/meterpreter/object_aliases.rb +0 -0
- data/lib/rex/post/meterpreter/packet.rb +23 -1
- data/lib/rex/post/meterpreter/packet_dispatcher.rb +13 -2
- data/lib/rex/post/meterpreter/packet_parser.rb +0 -0
- data/lib/rex/post/meterpreter/packet_response_waiter.rb +17 -10
- data/lib/rex/post/meterpreter/ui/console.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb +12 -7
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/espia.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/incognito.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/networkpug.rb +221 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/elevate.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/passwd.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/timestomp.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/sniffer.rb +4 -3
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb +56 -1
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb +22 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb +0 -0
- data/lib/rex/post/meterpreter/ui/console/interactive_channel.rb +0 -0
- data/lib/rex/post/permission.rb +0 -0
- data/lib/rex/post/process.rb +0 -0
- data/lib/rex/post/thread.rb +0 -0
- data/lib/rex/post/ui.rb +0 -0
- data/lib/rex/proto.rb +0 -0
- data/lib/rex/proto.rb.ts.rb +0 -0
- data/lib/rex/proto/dcerpc.rb +0 -0
- data/lib/rex/proto/dcerpc.rb.ts.rb +0 -0
- data/lib/rex/proto/dcerpc/client.rb +3 -1
- data/lib/rex/proto/dcerpc/exceptions.rb +0 -0
- data/lib/rex/proto/dcerpc/handle.rb +0 -0
- data/lib/rex/proto/dcerpc/handle.rb.ut.rb +0 -0
- data/lib/rex/proto/dcerpc/ndr.rb +0 -0
- data/lib/rex/proto/dcerpc/ndr.rb.ut.rb +0 -0
- data/lib/rex/proto/dcerpc/packet.rb +0 -0
- data/lib/rex/proto/dcerpc/packet.rb.ut.rb +0 -0
- data/lib/rex/proto/dcerpc/response.rb.ut.rb +0 -0
- data/lib/rex/proto/dcerpc/uuid.rb +0 -0
- data/lib/rex/proto/dcerpc/uuid.rb.ut.rb +0 -0
- data/lib/rex/proto/dhcp.rb +7 -0
- data/lib/rex/proto/dhcp/constants.rb +33 -0
- data/lib/rex/proto/dhcp/server.rb +285 -0
- data/lib/rex/proto/drda.rb +0 -0
- data/lib/rex/proto/drda.rb.ts.rb +0 -0
- data/lib/rex/proto/drda/constants.rb +0 -0
- data/lib/rex/proto/drda/constants.rb.ut.rb +0 -0
- data/lib/rex/proto/drda/packet.rb +0 -0
- data/lib/rex/proto/drda/packet.rb.ut.rb +0 -0
- data/lib/rex/proto/drda/utils.rb +0 -0
- data/lib/rex/proto/drda/utils.rb.ut.rb +0 -0
- data/lib/rex/proto/http.rb +0 -0
- data/lib/rex/proto/http.rb.ts.rb +0 -0
- data/lib/rex/proto/http/client.rb +27 -2
- data/lib/rex/proto/http/client.rb.ut.rb +4 -2
- data/lib/rex/proto/http/handler.rb +0 -0
- data/lib/rex/proto/http/handler/erb.rb +0 -0
- data/lib/rex/proto/http/handler/erb.rb.ut.rb +0 -0
- data/lib/rex/proto/http/handler/erb.rb.ut.rb.rhtml +0 -0
- data/lib/rex/proto/http/handler/proc.rb +6 -0
- data/lib/rex/proto/http/handler/proc.rb.ut.rb +0 -0
- data/lib/rex/proto/http/header.rb +0 -0
- data/lib/rex/proto/http/header.rb.ut.rb +0 -0
- data/lib/rex/proto/http/packet.rb +20 -19
- data/lib/rex/proto/http/packet.rb.ut.rb +0 -0
- data/lib/rex/proto/http/request.rb +0 -0
- data/lib/rex/proto/http/request.rb.ut.rb +0 -0
- data/lib/rex/proto/http/response.rb +0 -0
- data/lib/rex/proto/http/response.rb.ut.rb +0 -0
- data/lib/rex/proto/http/server.rb +5 -3
- data/lib/rex/proto/http/server.rb.ut.rb +0 -0
- data/lib/rex/proto/proxy/socks4a.rb +440 -0
- data/lib/rex/proto/smb.rb +0 -0
- data/lib/rex/proto/smb.rb.ts.rb +0 -0
- data/lib/rex/proto/smb/client.rb +110 -61
- data/lib/rex/proto/smb/client.rb.ut.rb +0 -0
- data/lib/rex/proto/smb/constants.rb +5 -3
- data/lib/rex/proto/smb/constants.rb.ut.rb +0 -0
- data/lib/rex/proto/smb/crypt.rb +0 -0
- data/lib/rex/proto/smb/crypt.rb.ut.rb +0 -0
- data/lib/rex/proto/smb/exceptions.rb +0 -0
- data/lib/rex/proto/smb/simpleclient.rb +0 -0
- data/lib/rex/proto/smb/simpleclient.rb.ut.rb +0 -0
- data/lib/rex/proto/smb/utils.rb +2 -0
- data/lib/rex/proto/smb/utils.rb.ut.rb +0 -0
- data/lib/rex/proto/sunrpc.rb +0 -0
- data/lib/rex/proto/sunrpc/client.rb +0 -0
- data/lib/rex/proto/tftp.rb +10 -1
- data/lib/rex/proto/tftp/constants.rb +5 -3
- data/lib/rex/proto/tftp/server.rb +79 -9
- data/lib/rex/script.rb +0 -0
- data/lib/rex/script/base.rb +0 -0
- data/lib/rex/script/meterpreter.rb +0 -0
- data/lib/rex/script/shell.rb +0 -0
- data/lib/rex/service.rb +0 -0
- data/lib/rex/service_manager.rb +0 -0
- data/lib/rex/service_manager.rb.ut.rb +0 -0
- data/lib/rex/services/local_relay.rb +0 -0
- data/lib/rex/socket.rb +6 -4
- data/lib/rex/socket.rb.ut.rb +0 -0
- data/lib/rex/socket/comm.rb +0 -0
- data/lib/rex/socket/comm/local.rb +0 -0
- data/lib/rex/socket/comm/local.rb.ut.rb +0 -0
- data/lib/rex/socket/ip.rb +0 -0
- data/lib/rex/socket/parameters.rb +0 -0
- data/lib/rex/socket/parameters.rb.ut.rb +0 -0
- data/lib/rex/socket/range_walker.rb +0 -0
- data/lib/rex/socket/range_walker.rb.ut.rb +0 -0
- data/lib/rex/socket/ssl_tcp.rb +1 -1
- data/lib/rex/socket/ssl_tcp.rb.ut.rb +0 -0
- data/lib/rex/socket/ssl_tcp_server.rb +0 -0
- data/lib/rex/socket/ssl_tcp_server.rb.ut.rb +0 -0
- data/lib/rex/socket/subnet_walker.rb +0 -0
- data/lib/rex/socket/subnet_walker.rb.ut.rb +0 -0
- data/lib/rex/socket/switch_board.rb.ut.rb +0 -0
- data/lib/rex/socket/tcp.rb +0 -0
- data/lib/rex/socket/tcp.rb.ut.rb +0 -0
- data/lib/rex/socket/tcp_server.rb +0 -0
- data/lib/rex/socket/tcp_server.rb.ut.rb +0 -0
- data/lib/rex/socket/udp.rb +0 -0
- data/lib/rex/socket/udp.rb.ut.rb +0 -0
- data/lib/rex/struct2.rb +0 -0
- data/lib/rex/struct2/c_struct.rb +0 -0
- data/lib/rex/struct2/c_struct_template.rb +0 -0
- data/lib/rex/struct2/constant.rb +0 -0
- data/lib/rex/struct2/element.rb +0 -0
- data/lib/rex/struct2/generic.rb +0 -0
- data/lib/rex/struct2/restraint.rb +0 -0
- data/lib/rex/struct2/s_string.rb +0 -0
- data/lib/rex/struct2/s_struct.rb +0 -0
- data/lib/rex/sync.rb +0 -0
- data/lib/rex/sync/event.rb +0 -0
- data/lib/rex/sync/read_write_lock.rb +0 -0
- data/lib/rex/sync/ref.rb +0 -0
- data/lib/rex/sync/thread_safe.rb +0 -0
- data/lib/rex/test.rb +0 -0
- data/lib/rex/text.rb +13 -3
- data/lib/rex/text.rb.ut.rb +9 -4
- data/lib/rex/time.rb +0 -0
- data/lib/rex/transformer.rb +0 -0
- data/lib/rex/transformer.rb.ut.rb +0 -0
- data/lib/rex/ui.rb +0 -0
- data/lib/rex/ui/interactive.rb +0 -0
- data/lib/rex/ui/output.rb +0 -0
- data/lib/rex/ui/output/none.rb +0 -0
- data/lib/rex/ui/progress_tracker.rb +0 -0
- data/lib/rex/ui/subscriber.rb +0 -0
- data/lib/rex/ui/text/color.rb +0 -0
- data/lib/rex/ui/text/color.rb.ut.rb +0 -0
- data/lib/rex/ui/text/dispatcher_shell.rb +0 -0
- data/lib/rex/ui/text/input.rb +0 -0
- data/lib/rex/ui/text/input/buffer.rb +0 -0
- data/lib/rex/ui/text/input/readline.rb +0 -0
- data/lib/rex/ui/text/input/socket.rb +0 -0
- data/lib/rex/ui/text/input/stdio.rb +0 -0
- data/lib/rex/ui/text/irb_shell.rb +0 -0
- data/lib/rex/ui/text/output.rb +0 -0
- data/lib/rex/ui/text/output/buffer.rb +0 -0
- data/lib/rex/ui/text/output/file.rb +0 -0
- data/lib/rex/ui/text/output/socket.rb +0 -0
- data/lib/rex/ui/text/output/stdio.rb +0 -0
- data/lib/rex/ui/text/progress_tracker.rb +0 -0
- data/lib/rex/ui/text/progress_tracker.rb.ut.rb +0 -0
- data/lib/rex/ui/text/shell.rb +9 -6
- data/lib/rex/ui/text/table.rb +5 -0
- data/lib/rex/ui/text/table.rb.ut.rb +0 -0
- data/lib/rex/zip.rb +0 -0
- data/lib/rex/zip/archive.rb +29 -1
- data/lib/rex/zip/blocks.rb +0 -0
- data/lib/rex/zip/entry.rb +5 -1
- metadata +369 -413
- data/README +0 -8
- data/lib/rex/post/meterpreter/extensions/railgun/api.rb +0 -9303
- data/lib/rex/post/meterpreter/extensions/railgun/railgun.rb +0 -815
- data/lib/rex/post/meterpreter/ui/console/command_dispatcher/railgun.rb +0 -57
|
File without changes
|
|
@@ -110,6 +110,8 @@ NT_TRANSACT_SET_SECURITY_DESC = 3 # Set security descriptor
|
|
|
110
110
|
NT_TRANSACT_NOTIFY_CHANGE = 4 # Start directory watch
|
|
111
111
|
NT_TRANSACT_RENAME = 5 # Reserved (Handle-based)
|
|
112
112
|
NT_TRANSACT_QUERY_SECURITY_DESC = 6 # Retrieve security
|
|
113
|
+
NT_TRANSACT_GET_USER_QUOTA = 7 # Get quota
|
|
114
|
+
NT_TRANSACT_SET_USER_QUOTA = 8 # Set quota
|
|
113
115
|
|
|
114
116
|
# Open Modes
|
|
115
117
|
OPEN_MODE_CREAT = 0x10 # Create the file if file does not exists. Otherwise, operation fails.
|
|
@@ -468,9 +470,9 @@ SMB_NEG_RES_NT_HDR_PKT = Rex::Struct2::CStructTemplate.new(
|
|
|
468
470
|
[ 'uint32v', 'MaxRaw', 0 ],
|
|
469
471
|
[ 'uint32v', 'SessionKey', 0 ],
|
|
470
472
|
[ 'uint32v', 'Capabilities', 0 ],
|
|
471
|
-
[ 'uint32v', '
|
|
472
|
-
[ 'uint32v', '
|
|
473
|
-
[ 'uint16v', '
|
|
473
|
+
[ 'uint32v', 'SystemTimeLow', 0 ],
|
|
474
|
+
[ 'uint32v', 'SystemTimeHigh', 0 ],
|
|
475
|
+
[ 'uint16v', 'ServerTimeZone', 0 ],
|
|
474
476
|
[ 'uint8', 'KeyLength', 0 ],
|
|
475
477
|
[ 'uint16v', 'ByteCount', 0 ],
|
|
476
478
|
[ 'string', 'Payload', nil, '' ]
|
|
File without changes
|
data/lib/rex/proto/smb/crypt.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/rex/proto/smb/utils.rb
CHANGED
|
@@ -54,6 +54,8 @@ CONST = Rex::Proto::SMB::Constants
|
|
|
54
54
|
return CONST::CREATE_ACCESS_OPENCREATE
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
# NOTE: the difference below came from: Time.utc("1970-1-1") - Time.utc("1601-1-1")
|
|
58
|
+
|
|
57
59
|
# Convert a 64-bit signed SMB time to a unix timestamp
|
|
58
60
|
def self.time_smb_to_unix(thi, tlo)
|
|
59
61
|
(((thi << 32) + tlo) / 10000000) - 11644473600
|
|
File without changes
|
data/lib/rex/proto/sunrpc.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/rex/proto/tftp.rb
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
# $Id: tftp.rb
|
|
1
|
+
# $Id: tftp.rb 9962 2010-08-06 17:21:22Z jduck $
|
|
2
|
+
#
|
|
3
|
+
# TFTP Server implementation according to:
|
|
4
|
+
#
|
|
5
|
+
# RFC1350, RFC2347, RFC2348, RFC2349
|
|
6
|
+
#
|
|
7
|
+
# written by jduck <jduck [at] metasploit.com>
|
|
8
|
+
# thx to scriptjunkie for pointing out option extensions
|
|
9
|
+
#
|
|
10
|
+
|
|
2
11
|
require 'rex/proto/tftp/constants'
|
|
3
12
|
require 'rex/proto/tftp/server'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# $Id: constants.rb
|
|
1
|
+
# $Id: constants.rb 9962 2010-08-06 17:21:22Z jduck $
|
|
2
2
|
require 'rex/proto/tftp'
|
|
3
3
|
|
|
4
4
|
module Rex
|
|
@@ -11,7 +11,7 @@ OpWrite = 2
|
|
|
11
11
|
OpData = 3
|
|
12
12
|
OpAck = 4
|
|
13
13
|
OpError = 5
|
|
14
|
-
|
|
14
|
+
OpOptAck = 6
|
|
15
15
|
|
|
16
16
|
ERRCODES = [
|
|
17
17
|
"Undefined",
|
|
@@ -21,7 +21,8 @@ ERRCODES = [
|
|
|
21
21
|
"Illegal TFTP operation",
|
|
22
22
|
"Unknown transfer ID",
|
|
23
23
|
"File already exists",
|
|
24
|
-
"No such user"
|
|
24
|
+
"No such user",
|
|
25
|
+
"Failed option negotiation"
|
|
25
26
|
]
|
|
26
27
|
|
|
27
28
|
ErrFileNotFound = 1
|
|
@@ -31,6 +32,7 @@ ErrIllegalOperation = 4
|
|
|
31
32
|
ErrUnknownTransferId = 5
|
|
32
33
|
ErrFileExists = 6
|
|
33
34
|
ErrNoSuchUser = 7
|
|
35
|
+
ErrFailedOptNegotiation = 8
|
|
34
36
|
|
|
35
37
|
end
|
|
36
38
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# $Id: server.rb
|
|
1
|
+
# $Id: server.rb 10163 2010-08-27 04:44:02Z jduck $
|
|
2
2
|
require 'rex/socket'
|
|
3
3
|
require 'rex/proto/tftp'
|
|
4
4
|
|
|
@@ -10,7 +10,9 @@ module TFTP
|
|
|
10
10
|
# Little util function
|
|
11
11
|
#
|
|
12
12
|
def self.get_string(data)
|
|
13
|
-
|
|
13
|
+
idx = data.index("\x00")
|
|
14
|
+
return nil if not idx
|
|
15
|
+
ret = data.slice!(0, idx)
|
|
14
16
|
# Slice off the nul byte.
|
|
15
17
|
data.slice!(0,1)
|
|
16
18
|
ret
|
|
@@ -71,7 +73,7 @@ class Server
|
|
|
71
73
|
|
|
72
74
|
self.files.clear
|
|
73
75
|
self.thread.kill
|
|
74
|
-
self.sock.close
|
|
76
|
+
self.sock.close rescue nil # might be closed already
|
|
75
77
|
end
|
|
76
78
|
|
|
77
79
|
|
|
@@ -200,7 +202,7 @@ protected
|
|
|
200
202
|
|
|
201
203
|
def check_retransmission(tr)
|
|
202
204
|
elapsed = Time.now - tr[:last_sent]
|
|
203
|
-
if (elapsed >=
|
|
205
|
+
if (elapsed >= tr[:timeout])
|
|
204
206
|
# max retries reached?
|
|
205
207
|
if (tr[:retries] < 3)
|
|
206
208
|
#if (tr[:type] == OpRead)
|
|
@@ -254,7 +256,7 @@ protected
|
|
|
254
256
|
check_retransmission(tr)
|
|
255
257
|
elsif (w != nil and w[0] == self.sock)
|
|
256
258
|
# No ack waiting, send next block..
|
|
257
|
-
chunk = tr[:file][:data].slice(tr[:offset],
|
|
259
|
+
chunk = tr[:file][:data].slice(tr[:offset], tr[:blksize])
|
|
258
260
|
if (chunk and chunk.length >= 0)
|
|
259
261
|
pkt = [OpData, tr[:block]].pack('nn')
|
|
260
262
|
pkt << chunk
|
|
@@ -283,7 +285,7 @@ protected
|
|
|
283
285
|
tr[:last_sent] = Time.now
|
|
284
286
|
|
|
285
287
|
# If we had a 0-511 byte chunk, we're done.
|
|
286
|
-
if (tr[:last_size] and tr[:last_size] <
|
|
288
|
+
if (tr[:last_size] and tr[:last_size] < tr[:blksize])
|
|
287
289
|
#puts "[*] Transfer complete, saving output"
|
|
288
290
|
save_output(tr)
|
|
289
291
|
self.transfers.delete(tr)
|
|
@@ -325,15 +327,21 @@ protected
|
|
|
325
327
|
if (file[:once] and file[:started])
|
|
326
328
|
send_error(from, ErrFileNotFound)
|
|
327
329
|
else
|
|
328
|
-
|
|
330
|
+
transfer = {
|
|
329
331
|
:type => OpRead,
|
|
330
332
|
:from => from,
|
|
331
333
|
:file => file,
|
|
332
334
|
:block => 1,
|
|
335
|
+
:blksize => 512,
|
|
333
336
|
:offset => 0,
|
|
337
|
+
:timeout => 3,
|
|
334
338
|
:last_sent => nil,
|
|
335
339
|
:retries => 0
|
|
336
340
|
}
|
|
341
|
+
|
|
342
|
+
process_options(from, buf, transfer)
|
|
343
|
+
|
|
344
|
+
self.transfers << transfer
|
|
337
345
|
end
|
|
338
346
|
else
|
|
339
347
|
#puts "[-] file not found!"
|
|
@@ -348,14 +356,20 @@ protected
|
|
|
348
356
|
#puts "%s %s %s" % [start, fn, mode]
|
|
349
357
|
|
|
350
358
|
if (not @shutting_down) and (@output_dir)
|
|
351
|
-
|
|
359
|
+
transfer = {
|
|
352
360
|
:type => OpWrite,
|
|
353
361
|
:from => from,
|
|
354
362
|
:file => { :name => fn, :data => '' },
|
|
355
363
|
:block => 0, # WRQ starts at 0
|
|
364
|
+
:blksize => 512,
|
|
365
|
+
:timeout => 3,
|
|
356
366
|
:last_sent => nil,
|
|
357
367
|
:retries => 0
|
|
358
368
|
}
|
|
369
|
+
|
|
370
|
+
process_options(from, buf, transfer)
|
|
371
|
+
|
|
372
|
+
self.transfers << transfer
|
|
359
373
|
else
|
|
360
374
|
send_error(from, ErrIllegalOperation)
|
|
361
375
|
end
|
|
@@ -368,11 +382,15 @@ protected
|
|
|
368
382
|
|
|
369
383
|
tr = find_transfer(OpRead, from, block)
|
|
370
384
|
if not tr
|
|
385
|
+
# NOTE: some clients, such as pxelinux, send an ack for block 0.
|
|
386
|
+
# To deal with this, we simply ignore it as we start with block 1.
|
|
387
|
+
return if block == 0
|
|
388
|
+
|
|
371
389
|
# If we didn't find it, send an error.
|
|
372
390
|
send_error(from, ErrUnknownTransferId)
|
|
373
391
|
else
|
|
374
392
|
# acked! send the next block
|
|
375
|
-
tr[:offset] +=
|
|
393
|
+
tr[:offset] += tr[:blksize]
|
|
376
394
|
next_block(tr)
|
|
377
395
|
|
|
378
396
|
# If the transfer is finished, delete it
|
|
@@ -417,6 +435,58 @@ protected
|
|
|
417
435
|
end
|
|
418
436
|
end
|
|
419
437
|
|
|
438
|
+
def process_options(from, buf, tr)
|
|
439
|
+
found = 0
|
|
440
|
+
to_ack = []
|
|
441
|
+
while buf.length >= 4
|
|
442
|
+
opt = TFTP::get_string(buf)
|
|
443
|
+
break if not opt
|
|
444
|
+
val = TFTP::get_string(buf)
|
|
445
|
+
break if not val
|
|
446
|
+
|
|
447
|
+
found += 1
|
|
448
|
+
|
|
449
|
+
# Is it one we support?
|
|
450
|
+
opt.downcase!
|
|
451
|
+
|
|
452
|
+
case opt
|
|
453
|
+
when "blksize"
|
|
454
|
+
val = val.to_i
|
|
455
|
+
if val > 0
|
|
456
|
+
tr[:blksize] = val
|
|
457
|
+
to_ack << [ opt, val.to_s ]
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
when "timeout"
|
|
461
|
+
val = val.to_i
|
|
462
|
+
if val >= 1 and val <= 255
|
|
463
|
+
tr[:timeout] = val
|
|
464
|
+
to_ack << [ opt, val.to_s ]
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
when "tsize"
|
|
468
|
+
if tr[:type] == OpRead
|
|
469
|
+
len = tr[:file][:data].length
|
|
470
|
+
else
|
|
471
|
+
val = val.to_i
|
|
472
|
+
len = val
|
|
473
|
+
end
|
|
474
|
+
to_ack << [ opt, len.to_s ]
|
|
475
|
+
|
|
476
|
+
end
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
return if to_ack.length < 1
|
|
480
|
+
|
|
481
|
+
# if we have anything to ack, do it
|
|
482
|
+
data = [OpOptAck].pack('n')
|
|
483
|
+
to_ack.each { |el|
|
|
484
|
+
data << el[0] << "\x00" << el[1] << "\x00"
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
send_packet(from, data)
|
|
488
|
+
end
|
|
489
|
+
|
|
420
490
|
end
|
|
421
491
|
|
|
422
492
|
end
|
data/lib/rex/script.rb
CHANGED
|
File without changes
|
data/lib/rex/script/base.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/rex/script/shell.rb
CHANGED
|
File without changes
|
data/lib/rex/service.rb
CHANGED
|
File without changes
|
data/lib/rex/service_manager.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/rex/socket.rb
CHANGED
|
@@ -135,11 +135,12 @@ module Socket
|
|
|
135
135
|
# Wrapper for Resolv.getaddress that takes special care to see if the
|
|
136
136
|
# supplied address is already a dotted quad, for instance. This is
|
|
137
137
|
# necessary to prevent calls to gethostbyaddr (which occurs on windows).
|
|
138
|
-
# These calls can be quite slow.
|
|
138
|
+
# These calls can be quite slow. This also fixes an issue with the
|
|
139
|
+
# Resolv.getaddress() call being non-functional on Ruby 1.9.1 (Win32).
|
|
139
140
|
#
|
|
140
141
|
def self.getaddress(addr)
|
|
141
142
|
begin
|
|
142
|
-
dotted_ip?(addr) ? addr :
|
|
143
|
+
dotted_ip?(addr) ? addr : self.addr_ntoa( ::Socket.gethostbyname(addr)[3] )
|
|
143
144
|
rescue ::ArgumentError # Win32 bug
|
|
144
145
|
nil
|
|
145
146
|
end
|
|
@@ -440,11 +441,12 @@ module Socket
|
|
|
440
441
|
#
|
|
441
442
|
##
|
|
442
443
|
|
|
443
|
-
def self.source_address(dest='50.50.50.50')
|
|
444
|
+
def self.source_address(dest='50.50.50.50', comm = ::Rex::Socket::Comm::Local)
|
|
444
445
|
begin
|
|
445
446
|
s = self.create_udp(
|
|
446
447
|
'PeerHost' => dest,
|
|
447
|
-
'PeerPort' => 31337
|
|
448
|
+
'PeerPort' => 31337,
|
|
449
|
+
'Comm' => comm
|
|
448
450
|
)
|
|
449
451
|
r = s.getsockname[1]
|
|
450
452
|
s.close
|
data/lib/rex/socket.rb.ut.rb
CHANGED
|
File without changes
|
data/lib/rex/socket/comm.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/rex/socket/ip.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/rex/socket/ssl_tcp.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/rex/socket/tcp.rb
CHANGED
|
File without changes
|
data/lib/rex/socket/tcp.rb.ut.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/rex/socket/udp.rb
CHANGED
|
File without changes
|
data/lib/rex/socket/udp.rb.ut.rb
CHANGED
|
File without changes
|
data/lib/rex/struct2.rb
CHANGED
|
File without changes
|
data/lib/rex/struct2/c_struct.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/rex/struct2/constant.rb
CHANGED
|
File without changes
|
data/lib/rex/struct2/element.rb
CHANGED
|
File without changes
|
data/lib/rex/struct2/generic.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/rex/struct2/s_string.rb
CHANGED
|
File without changes
|
data/lib/rex/struct2/s_struct.rb
CHANGED
|
File without changes
|
data/lib/rex/sync.rb
CHANGED
|
File without changes
|
data/lib/rex/sync/event.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/rex/sync/ref.rb
CHANGED
|
File without changes
|
data/lib/rex/sync/thread_safe.rb
CHANGED
|
File without changes
|
data/lib/rex/test.rb
CHANGED
|
File without changes
|
data/lib/rex/text.rb
CHANGED
|
@@ -235,10 +235,10 @@ module Text
|
|
|
235
235
|
# Returns the string with nonprintable hex characters sanitized to ascii. Similiar to to_hex,
|
|
236
236
|
# but regular ASCII is not translated if count is 1.
|
|
237
237
|
#
|
|
238
|
-
def self.to_hex_ascii(str, prefix = "\\x", count = 1)
|
|
238
|
+
def self.to_hex_ascii(str, prefix = "\\x", count = 1, suffix=nil)
|
|
239
239
|
raise ::RuntimeError, "unable to chunk into #{count} byte chunks" if ((str.length % count) > 0)
|
|
240
240
|
return str.unpack('H*')[0].gsub(Regexp.new(".{#{count * 2}}", nil, 'n')) { |s|
|
|
241
|
-
(0x20..0x7e) === s.to_i(16) ? s.to_i(16).chr : prefix + s
|
|
241
|
+
(0x20..0x7e) === s.to_i(16) ? s.to_i(16).chr : prefix + s + suffix.to_s
|
|
242
242
|
}
|
|
243
243
|
end
|
|
244
244
|
|
|
@@ -476,6 +476,13 @@ module Text
|
|
|
476
476
|
end
|
|
477
477
|
end
|
|
478
478
|
|
|
479
|
+
#
|
|
480
|
+
# Encode an ASCII string so it's safe for XML. It's a wrapper for to_hex_ascii.
|
|
481
|
+
#
|
|
482
|
+
def self.xml_char_encode(str)
|
|
483
|
+
self.to_hex_ascii(str, "&#x", 1, ";")
|
|
484
|
+
end
|
|
485
|
+
|
|
479
486
|
#
|
|
480
487
|
# Decode a URI encoded string
|
|
481
488
|
#
|
|
@@ -745,11 +752,14 @@ module Text
|
|
|
745
752
|
# supplied number of identifiable characters (slots). The supplied sets
|
|
746
753
|
# should not contain any duplicate characters or the logic will fail.
|
|
747
754
|
#
|
|
748
|
-
def self.pattern_create(length, sets =
|
|
755
|
+
def self.pattern_create(length, sets = nil)
|
|
749
756
|
buf = ''
|
|
750
757
|
idx = 0
|
|
751
758
|
offsets = []
|
|
752
759
|
|
|
760
|
+
# Make sure there's something in sets even if we were given an explicit nil
|
|
761
|
+
sets ||= [ UpperAlpha, LowerAlpha, Numerals ]
|
|
762
|
+
|
|
753
763
|
sets.length.times { offsets << 0 }
|
|
754
764
|
|
|
755
765
|
until buf.length >= length
|
data/lib/rex/text.rb.ut.rb
CHANGED
|
@@ -24,10 +24,10 @@ class Rex::Text::UnitTest < Test::Unit::TestCase
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def test_html_encode
|
|
27
|
-
assert_equal('A', Rex::Text.html_encode('A'), 'html_encode default')
|
|
28
|
-
assert_equal('A', Rex::Text.html_encode('A','hex'), 'html_encode hex')
|
|
29
|
-
assert_equal('A', Rex::Text.html_encode('A','int'), 'html_encode int')
|
|
30
|
-
assert_equal('A', Rex::Text.html_encode('A','int-wide'), 'html_encode int-wide')
|
|
27
|
+
assert_equal('A', Rex::Text.html_encode('A'), 'html_encode default')
|
|
28
|
+
assert_equal('A', Rex::Text.html_encode('A','hex'), 'html_encode hex')
|
|
29
|
+
assert_equal('A', Rex::Text.html_encode('A','int'), 'html_encode int')
|
|
30
|
+
assert_equal('A', Rex::Text.html_encode('A','int-wide'), 'html_encode int-wide')
|
|
31
31
|
|
|
32
32
|
assert_raises(TypeError) {
|
|
33
33
|
Rex::Text.html_encode('a', 'umpa lumpa')
|
|
@@ -158,6 +158,11 @@ class Rex::Text::UnitTest < Test::Unit::TestCase
|
|
|
158
158
|
assert_equal("\\x05Hello\\x06World!\\x03ABC", Rex::Text.to_hex_ascii(str))
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
+
def test_xml_char_encode
|
|
162
|
+
str = "\x05hello\x06world"
|
|
163
|
+
assert_equal("helloworld", Rex::Text.xml_char_encode(str))
|
|
164
|
+
end
|
|
165
|
+
|
|
161
166
|
def test_wordwrap
|
|
162
167
|
txt = "this is a test of the word wrap features"
|
|
163
168
|
|