-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey,

I've attached a patch against SVN that fixes two sysread() functions in
the Text UI, and a read() in the Meterpreter.  I've also made a small
additional change in the latter for conformity.

The gist of it is the wrapper sysread() or read() functions don't pass
the correct arguments.

Thanks,
Kris Katterjohn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBR9XcFv9K37xXYl36AQL3eA//Xljjm/aCs2eH0dOSszekbFkFO9C2Ultx
OJUT4mh/FK7bMdkcGLAWaA8qKO1lbFAQH5SGZi2V+12oZpp79uMJ87RNjOM7Q8hx
UpY7nJUjScQ1qLn/7q5mqtbXPiGh/1H0XOmcicL5MhmkWjogVNUSBEm3yrd0g0wJ
UKVNsPEiAtV41QWr8s0XKKJNlnJwM/FG2Gesm3hpowdtw2KKu9Yt9uC1xSXE9p+m
fnRgtK82GGDXpASei6QqtGK2Vai7yzVlGm6DRrnjKcssIGeir+H8EGuCkhmWgIIK
5ckc8Aaam9W8euNB1zLhyGm0VG9r15hWrH1HEOF7rnjhrEQPsxhtMZig0cQ/cF2l
1DVismtdkj9EYWlBMWh88+a2skk8lJ+0J2PvKd6+2qToZ/MxSQarfN7SnZRlQTHL
vU6zoLP8tbCwFTFm5nO5UZDMg3Oq3h6P3FLPI+Zg6TGWhBGz5zFdtd9MMBXoQbgp
sCtiRXqGUhguAt+QFs1Rt5zsrG9vtTOQYDS/TmPD0i/kTNugp7es0ExSNfAk5EtN
xWwdM5ACvpa1CZQHxHfBH/Z45Jo0Qud6NTliEOH+kbGX1532DhwiHV3Smt9iVX/M
0VnpWUAw30Di7vjvDPoaNC6FWZazxdZ+h2kdkBU4Hck05L3b+p2XRhpwnsN66u/A
CTh2NmjvBro=
=ggHa
-----END PGP SIGNATURE-----
Index: lib/rex/ui/text/input/socket.rb
===================================================================
--- lib/rex/ui/text/input/socket.rb	(revision 5435)
+++ lib/rex/ui/text/input/socket.rb	(working copy)
@@ -26,7 +26,7 @@
 	# Reads input from the raw socket.
 	#
 	def sysread(len = 1)
-		@sock.sysread(1)
+		@sock.sysread(len)
 	end
 
 	#
Index: lib/rex/ui/text/input/buffer.rb
===================================================================
--- lib/rex/ui/text/input/buffer.rb	(revision 5435)
+++ lib/rex/ui/text/input/buffer.rb	(working copy)
@@ -27,7 +27,7 @@
 	end
 
 	def sysread(len = 1)
-		@sock.rsock.sysread(1)
+		@sock.rsock.sysread(len)
 	end
 
 	def put(msg)
Index: lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb
===================================================================
--- lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb	(revision 5435)
+++ lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb	(working copy)
@@ -25,12 +25,7 @@
 		self.filed.read(length)
 	end
 
-	#
-	# Synonym for sysread.
-	#
-	def read(length = nil)
-		sysread
-	end
+	alias read sysread
 
 	#
 	# Writes the supplied buffer to the channel.
@@ -39,12 +34,7 @@
 		self.filed.write(buf)
 	end
 
-	#
-	# Synonym for syswrite.
-	#
-	def write(buf)
-		syswrite(buf)
-	end
+	alias write syswrite
 
 	#
 	# Closes the channel.
_______________________________________________
Framework-Hackers mailing list
Framework-Hackers@spool.metasploit.com
http://spool.metasploit.com/mailman/listinfo/framework-hackers

Reply via email to