From 1f2791494b0cb6e1058aaf9e2f85e59fe5675f22 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Mon, 16 Jul 2007 02:17:32 +0000 Subject: [PATCH] General cleanups, bug fixes, removal of debugging statements. git-svn-id: file:///home/svn/framework3/trunk@5051 4d416f70-5f16-0410-b530-b9f4589650da --- lib/metasm/.hg/dirstate | Bin 2635 -> 2635 bytes lib/msf/base/simple/auxiliary.rb | 3 --- lib/msf/core/exploit/tcp.rb | 7 ++++- lib/ole/file_system.rb | 2 +- lib/rex/arch.rb | 2 -- lib/rex/peparsey/pebase.rb | 44 ++++++++++++++++++------------- 6 files changed, 32 insertions(+), 26 deletions(-) diff --git a/lib/metasm/.hg/dirstate b/lib/metasm/.hg/dirstate index 18a5571f9a81d2ea201c479c5e32c3422b2f57d8..b4c9524b1a84768cebdb7988c6b5380101330069 100644 GIT binary patch delta 138 zcmV;50CoS%6w4HlPm??dCy{kglVb=Xk?%~C83-ejI{}=N*8>-m*8wS$qX#0BC;}vt zaRPIb2Lqs!eg`F!rvosP#RoBy?gQ47GX*1)>I6xX!~`ajRs|)Ky9pqZdj)Hg3kK|y s9tU8P;{qd+0w|OB1}BsD2P2c_1tpPBCXvP|vxNvY0h3GuC6n6;aFCrb`Tzg` delta 139 zcmV;60CfM$6w4HlPm?hSCXseglUE2Sk?Bm6SOJ`q3j!&Vng=M8RstlGwh1MZdIEEk zcn2br>;j>avI8)a^Z^%>69m?iRRt!K3#K_dj%zvzy)iQ3 e if (srvport.to_i < 1024) print_line(" ") + print_error("Could not start the TCP server: #{e.to_s}.") print_error( - "Could not start the TCP server: #{e.to_s}. " + "This module is configured to use a privileged TCP port (#{srvport}). " + "On Unix systems, only the root user account is allowed to bind to privileged ports." + "Please run the framework as root to use this module." ) + print_error( + "On Microsoft Windows systems, this error is returned when a process attempts to "+ + "listen on a host/port combination that is already in use. For example, Windows XP "+ + "will return this error if a process attempts to bind() over the system SMB/NetBIOS services." + ) print_line(" ") end raise e diff --git a/lib/ole/file_system.rb b/lib/ole/file_system.rb index 0d59d6efe1..5c2bd8c140 100644 --- a/lib/ole/file_system.rb +++ b/lib/ole/file_system.rb @@ -111,7 +111,7 @@ module Ole # mkdir, and rmdir are the main ones we'd need to support def rmdir path dirent = @ole.dirent_from_path path - p dirent + # repeating myself raise "#{path.inspect} is not a directory" unless dirent.dir? # ENOTEMPTY: diff --git a/lib/rex/arch.rb b/lib/rex/arch.rb index 33d1a2df4c..667e993028 100644 --- a/lib/rex/arch.rb +++ b/lib/rex/arch.rb @@ -66,8 +66,6 @@ module Arch return ENDIAN_BIG end - p "XXXXXXXXXXXXXXXXXXX" - p arch return ENDIAN_LITTLE end diff --git a/lib/rex/peparsey/pebase.rb b/lib/rex/peparsey/pebase.rb index 2cf2a3da75..a3738d9509 100644 --- a/lib/rex/peparsey/pebase.rb +++ b/lib/rex/peparsey/pebase.rb @@ -1457,26 +1457,32 @@ class PeBase def _resource_lookup(i) tbl = { - '1' => 'CURSOR', - '2' => 'BITMAP', - '3' => 'ICON', - '4' => 'MENU', - '5' => 'DIALOG', - '6' => 'STRING', - '7' => 'FONTDIR', - '8' => 'FONT', - '9' => 'ACCELERATORS', - '10' => 'RCDATA', - '11' => 'MESSAGETABLE', - '12' => 'GROUP_CURSOR', - '14' => 'GROUP_ICON', - '16' => 'VERSION', + '1' => 'RT_CURSOR', + '2' => 'RT_BITMAP', + '3' => 'RT_ICON', + '4' => 'RT_MENU', + '5' => 'RT_DIALOG', + '6' => 'RT_STRING', + '7' => 'RT_FONTDIR', + '8' => 'RT_FONT', + '9' => 'RT_ACCELERATORS', + '10' => 'RT_RCDATA', + '11' => 'RT_MESSAGETABLE', + '12' => 'RT_GROUP_CURSOR', + '14' => 'RT_GROUP_ICON', + '16' => 'RT_VERSION', + '17' => 'RT_DLGINCLUDE', + '19' => 'RT_PLUGPLAY', + '20' => 'RT_VXD', + '21' => 'RT_ANICURSOR', + '22' => 'RT_ANIICON', '23' => 'RT_HTML', - '32767' => 'ERROR', - '8192' => 'NEWRESOURCE', - '8194' => 'NEWBITMAP', - '8196' => 'NEWMENU', - '8197' => 'NEWDIALOG' + '24' => 'RT_MANIFEST', + '32767' => 'RT_ERROR', + '8192' => 'RT_NEWRESOURCE', + '8194' => 'RT_NEWBITMAP', + '8196' => 'RT_NEWMENU', + '8197' => 'RT_NEWDIALOG' } tbl[i] || i end