Commit Graph

54 Commits (ad3ca3a6bb235e23591b1b733ee8289b9ed21037)

Author SHA1 Message Date
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
HD Moore 4500d09c2f Bubble up errors from socket.get_once() and trigger an EOFError when read() returns nil
git-svn-id: file:///home/svn/framework3/trunk@12607 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-13 06:37:15 +00:00
HD Moore 1c86441f12 This removes the abortive_close code for stream sockets, it was leading to inconsistencies in how dead sessions were cleaned up
git-svn-id: file:///home/svn/framework3/trunk@12519 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-03 03:59:02 +00:00
HD Moore 22537ffbde A few more tweaks to non-blocking ssl mode
git-svn-id: file:///home/svn/framework3/trunk@12482 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-30 10:24:52 +00:00
HD Moore 5758f2ab46 Add support for non-blocking OpenSSL sockets when the Ruby version supports them (1.9.2+ or with openssl-nonblock gem).
git-svn-id: file:///home/svn/framework3/trunk@12480 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-30 07:59:33 +00:00
HD Moore 8ba356271f Fixes #4223 on Windows by catching the specific exception class
git-svn-id: file:///home/svn/framework3/trunk@12450 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-27 00:20:32 +00:00
HD Moore 9d715a1492 Switch from readpartial to read_nonblock, which works around an OpenSSL deadlock. This also adds support for the openssl-nonblock gem's specific exceptions
git-svn-id: file:///home/svn/framework3/trunk@12414 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-23 20:45:49 +00:00
HD Moore 8b920a8f95 Dont modify the data buffer passed to write
git-svn-id: file:///home/svn/framework3/trunk@12393 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-21 17:17:26 +00:00
James Lee c09be5561d this should have been a raise all along, see r9752
git-svn-id: file:///home/svn/framework3/trunk@12119 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-23 23:15:11 +00:00
Joshua Drake f001463ed1 catch ENOTSOCK errors in has_read_data?
git-svn-id: file:///home/svn/framework3/trunk@11541 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-11 08:47:42 +00:00
HD Moore 467fceb2a7 Fixes #2692 by retrying writes when the sendQ is full.
git-svn-id: file:///home/svn/framework3/trunk@10712 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-16 21:50:03 +00:00
HD Moore 7ccf4e2f11 Change stream writes to be non-blocking, this has been pretty heavily tested over the last couple days, and should preserve the original behavior as well. This fixes a deadlock in Ruby in certain conditions
git-svn-id: file:///home/svn/framework3/trunk@10306 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-13 14:39:17 +00:00
HD Moore 16134447d9 Cleanup / cosmetic for dcerpc, make EBADF pretend to be EOFError in terms of what exception is raised
git-svn-id: file:///home/svn/framework3/trunk@9752 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-09 19:05:16 +00:00
HD Moore adf33feb0e Catch an odd corner case with zero timeouts - this broke dcerpc over tcp
git-svn-id: file:///home/svn/framework3/trunk@9749 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-09 17:58:59 +00:00
HD Moore 864fcafb4a See #2167. This should make all platforms equal now in terms of how read selects are handled. It looks like OS X needs the same workaround as Windows
git-svn-id: file:///home/svn/framework3/trunk@9641 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-01 14:49:49 +00:00
HD Moore dfa7fb7d0b Move away from Kernel.select in exchange for IO.select, solves some issues with windows compatibility
git-svn-id: file:///home/svn/framework3/trunk@9330 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-20 20:42:17 +00:00
HD Moore a29371647f Force cygwin to use the Rex::ThreadSafe.select code
git-svn-id: file:///home/svn/framework3/trunk@9322 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-18 15:11:19 +00:00
HD Moore 3ad0560d00 Use the kernel select in 1.9, its less buggy and doesn't have the issues that lead us to create our own in the first place
git-svn-id: file:///home/svn/framework3/trunk@9044 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-09 22:48:31 +00:00
HD Moore 432f1676aa Increase LocalRelay block size, return exploit_uuid in sessions
git-svn-id: file:///home/svn/framework3/trunk@8939 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-27 15:44:33 +00:00
HD Moore 6bd2a954cf Lots of small changes, the big one is moving from sysread -> readpartial in the stream base class
git-svn-id: file:///home/svn/framework3/trunk@8764 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-10 06:43:46 +00:00
Stephen Fewer fd2469db24 Commit the Ruby end for TCP server channels, the modified TCP client channels and the support for pivoting a reverse_tcp meterpreter.
git-svn-id: file:///home/svn/framework3/trunk@8384 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-06 17:59:25 +00:00
HD Moore 075b8c5fa4 Fixes #434. Always use Timeout.timeout() -- on Ruby 1.9 this results in the Timeout::TimeoutError exception vs RuntimeError
git-svn-id: file:///home/svn/framework3/trunk@7323 4d416f70-5f16-0410-b530-b9f4589650da
2009-11-02 18:14:57 +00:00
HD Moore cca9c39eab Typo fix from Rhyss
git-svn-id: file:///home/svn/framework3/trunk@5881 4d416f70-5f16-0410-b530-b9f4589650da
2008-11-11 05:39:23 +00:00
HD Moore e9b3919ace Normalize exceptions across socket libraries
git-svn-id: file:///home/svn/framework3/trunk@5879 4d416f70-5f16-0410-b530-b9f4589650da
2008-11-11 05:11:40 +00:00
Ramon de C Valle f124597a56 Code cleanups
git-svn-id: file:///home/svn/framework3/trunk@5773 4d416f70-5f16-0410-b530-b9f4589650da
2008-10-19 21:03:39 +00:00
James Lee 36a06e7576 initial commit of php findsock. This patch makes all http connections global and removes the "close if (!pipelining)" checks, so beware of bugs.
git-svn-id: file:///home/svn/framework3/trunk@5678 4d416f70-5f16-0410-b530-b9f4589650da
2008-09-24 04:41:51 +00:00
HD Moore 1a54cc810a Fixed numerous issues involving smb/dcerpc interaction
Fixed 'bad' use of method definition (space after method name, will be depreciated soon)


git-svn-id: file:///home/svn/incoming/trunk@3626 4d416f70-5f16-0410-b530-b9f4589650da
2006-04-30 19:49:27 +00:00
HD Moore 5661598ef3 Addign read function >>
git-svn-id: file:///home/svn/incoming/trunk@3472 4d416f70-5f16-0410-b530-b9f4589650da
2006-01-30 16:37:41 +00:00
HD Moore 9b9bd2b7a7 Fixed bugs in io/stream:
1) no longer modify the buffer argument in send
 2) no longer duplicate the buffer argument in write

Added some basic telnet control character detection to socket:
 1) ^D closes a connection
 2) ^C closes a connection
 3) ^Z just prints it out

Problems with control character handling in msfd:
 1) The current handlers are signal based, could be more than one msfd client
 2) Calling ui._suspend isn't possible from the Input driver class (no context now)


git-svn-id: file:///home/svn/incoming/trunk@3462 4d416f70-5f16-0410-b530-b9f4589650da
2006-01-28 07:12:35 +00:00
Matt Miller b6395069ee fixed a few bugs for px
git-svn-id: file:///home/svn/incoming/trunk@3323 4d416f70-5f16-0410-b530-b9f4589650da
2006-01-07 18:59:04 +00:00
Matt Miller 21d1f17d54 fix
git-svn-id: file:///home/svn/incoming/trunk@3088 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-24 19:52:12 +00:00
Matt Miller f91281f990 wrap read/write in begin/rescue
git-svn-id: file:///home/svn/incoming/trunk@3086 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-24 19:38:36 +00:00
Matt Miller 96d75dcbb4 support for aborting sockets once a remote, non-find exploit succeeds
git-svn-id: file:///home/svn/incoming/trunk@3082 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-24 18:50:33 +00:00
Matt Miller 763673d3de fix for crash when ctrl+d is sent
git-svn-id: file:///home/svn/incoming/trunk@3057 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-23 03:22:17 +00:00
HD Moore 16c5e232f5 Addition of get_once() in io::stream, rewritten recv code for smb/dcerpc, error handling in exploit mixins
git-svn-id: file:///home/svn/incoming/trunk@3042 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-16 17:56:07 +00:00
Matt Miller 95f8210853 major doc update
git-svn-id: file:///home/svn/incoming/trunk@3029 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-15 05:22:13 +00:00
Matt Miller 6a5870ddcd updated comments to be more uniformed in class definition
git-svn-id: file:///home/svn/incoming/trunk@3004 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-02 16:49:45 +00:00
Matt Miller 550080bcfb refactored socket api a bit, expect bugs
git-svn-id: file:///home/svn/incoming/trunk@2915 4d416f70-5f16-0410-b530-b9f4589650da
2005-09-27 05:31:48 +00:00
Matt Miller b522132350 moved some stuff around, working on adding the concept of jobs
git-svn-id: file:///home/svn/incoming/trunk@2864 4d416f70-5f16-0410-b530-b9f4589650da
2005-09-22 04:53:46 +00:00
HD Moore dfd39f1b19 Moved exception back to calling function
git-svn-id: file:///home/svn/incoming/trunk@2854 4d416f70-5f16-0410-b530-b9f4589650da
2005-09-16 07:50:04 +00:00
HD Moore 226d9ef8a8 Catch timeout errors on read/write inside stream
git-svn-id: file:///home/svn/incoming/trunk@2850 4d416f70-5f16-0410-b530-b9f4589650da
2005-09-16 03:28:51 +00:00
Matt Miller ba794cc6d8 added some http protocol stuff, ruby's builtin stuff sucks
git-svn-id: file:///home/svn/incoming/trunk@2823 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-24 20:53:54 +00:00
Matt Miller 632a97823f moved some code around for interactive channels, still not functional yet, boohoo
git-svn-id: file:///home/svn/incoming/trunk@2797 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-19 04:21:15 +00:00
Matt Miller 5ee93e6be6 added threadsafe wrapper foo
git-svn-id: file:///home/svn/incoming/trunk@2771 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-17 00:52:47 +00:00
Matt Miller 24c4a2513a some more madness
git-svn-id: file:///home/svn/incoming/trunk@2765 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-16 08:12:58 +00:00
Matt Miller 2f2363d141 it lives, major changes, fixed bugs, exploiting works with the test exploit
git-svn-id: file:///home/svn/incoming/trunk@2763 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-16 07:32:11 +00:00
Matt Miller 4a118b7913 added names for the test suites
git-svn-id: file:///home/svn/incoming/trunk@2556 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-04 07:51:59 +00:00
Matt Miller 44e809d111 udp
git-svn-id: file:///home/svn/incoming/trunk@2554 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-04 06:19:42 +00:00
Matt Miller 639158a1f5 stuff
git-svn-id: file:///home/svn/incoming/trunk@2553 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-03 22:56:36 +00:00
Matt Miller f76e7d307d SSL class
git-svn-id: file:///home/svn/incoming/trunk@2551 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-03 22:51:09 +00:00