Commit Graph

27 Commits (e7ac2cd155d74b4f79bb91ca2693960b076c2503)

Author SHA1 Message Date
HD Moore 6b4eb9a8e2 Differentiate failed binds from connects, closes #4169
This change adds two new Rex exceptions and changes the local comm to raise the right one depending on the circumstances. The problem with the existing model is
that failed binds and failed connections both raised the same exception. This change is backwards compatible with modules that rescue Rex::AddressInUse in additi
on to Rex::ConnectionError. There were two corner cases that rescued Rex::AddressInUse specifically:

1. The 'r'-services mixin and modules caught the old exception when handling bind errors. These have been updated to use BindFailed
2. The meterpreter client had a catch for the old exception when the socket reports a bad destination (usually a network connection dropped). This has been updat
ed to use InvalidDestination as that was the intention prior to this change.

Since AddressInUse was part of ConnectionError, modules and mixins which caught both in the same rescue have been updated to just catch ConnectionError.
2014-11-11 14:59:41 -06:00
Jonathan 575072585f removed shebangs from files within rex 2013-11-07 18:51:59 -05:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
James Lee a5b30b1964 sometimes windows raises EADDRNOTAVAIL which gets mapped to AddressInUse when using addresses it doesn't like, e.g. .0 and .255; make AddressInUse a ConnectionError so scanners handle it properly. makes scanners work on windows when an address range includes one of these. they won't be scanned (since windows is dumb) but at least it won't error out.
git-svn-id: file:///home/svn/framework3/trunk@13503 4d416f70-5f16-0410-b530-b9f4589650da
2011-08-10 00:51:23 +00:00
Joshua Drake e408d5a155 add windows error messages for windows meterpreter sessions, minor cleanups
git-svn-id: file:///home/svn/framework3/trunk@10605 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-08 19:36:34 +00:00
HD Moore 34d76a72e0 Fixes #462. Handle proxy errors like regular socket errors. This can lead to missing results in tests, so we may need to add special proxy exception checks to the scanner mixin
git-svn-id: file:///home/svn/framework3/trunk@7352 4d416f70-5f16-0410-b530-b9f4589650da
2009-11-04 16:36:06 +00:00
kris 2c039a87d2 return host info if available in HostCommunicationError's addr_to_s
git-svn-id: file:///home/svn/framework3/trunk@6208 4d416f70-5f16-0410-b530-b9f4589650da
2009-02-06 14:15:54 +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
HD Moore 4d1c274387 Merging all of the auxilliary/scanner related features
git-svn-id: file:///home/svn/framework3/trunk@4749 4d416f70-5f16-0410-b530-b9f4589650da
2007-04-24 06:27:39 +00:00
HD Moore b4ad4a5d75 Tabs vs Spaces
git-svn-id: file:///home/svn/incoming/trunk@3453 4d416f70-5f16-0410-b530-b9f4589650da
2006-01-27 05:33:08 +00:00
HD Moore 88658064df /usr/bin/ruby vs /usr/bin/env ruby
git-svn-id: file:///home/svn/incoming/trunk@3242 4d416f70-5f16-0410-b530-b9f4589650da
2005-12-17 06:46:23 +00:00
HD Moore 557153e01c Code from Brian Caswell
git-svn-id: file:///home/svn/incoming/trunk@3210 4d416f70-5f16-0410-b530-b9f4589650da
2005-12-13 06:08:40 +00:00
Matt Miller 2fa321d0a6 documentation cleanup
git-svn-id: file:///home/svn/incoming/trunk@3008 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-02 23:03:02 +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 6ec3700b16 pivoting with portfwd command
git-svn-id: file:///home/svn/incoming/trunk@2916 4d416f70-5f16-0410-b530-b9f4589650da
2005-09-29 20:18:24 +00:00
Matt Miller 1a09787d88 fix exception
git-svn-id: file:///home/svn/incoming/trunk@2885 4d416f70-5f16-0410-b530-b9f4589650da
2005-09-24 18:39:09 +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 aa778d7a99 added ambiguous module name detection
git-svn-id: file:///home/svn/incoming/trunk@2754 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-14 20:05:41 +00:00
Matt Miller 26a28807eb oops
git-svn-id: file:///home/svn/incoming/trunk@2704 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-10 07:27:50 +00:00
Matt Miller 4e04a97819 made errors neater
git-svn-id: file:///home/svn/incoming/trunk@2568 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-04 20:40:33 +00:00
Matt Miller 1e31e3d6bd uh huh
git-svn-id: file:///home/svn/incoming/trunk@2567 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-04 20:40:00 +00:00
Matt Miller a97bdd6054 eat it
git-svn-id: file:///home/svn/incoming/trunk@2566 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-04 20:38:49 +00:00
Matt Miller 8a89f77745 made errors neater
git-svn-id: file:///home/svn/incoming/trunk@2565 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-04 19:56:54 +00:00
Matt Miller e51612222e exceptions unit tests
git-svn-id: file:///home/svn/incoming/trunk@2564 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-04 19:45:47 +00:00
Matt Miller a2f34c4b73 working no exception wrappering
git-svn-id: file:///home/svn/incoming/trunk@2563 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-04 18:55:20 +00:00