From: Bigmac Turdsplash Date: 2009-09-07T12:48:51+09:00 Subject: Re: i need to strip \n and nil #server.rb require 'socket' # Get sockets from stdlib server = TCPServer.open(2000) # Socket to listen on port 2000 loop { # Servers run forever Thread.start(server.accept) do |client| file = File.new('/pentest/windows-binaries/tools/test.exe') fileContent = file.read # reads the file client.puts(fileContent) client.close end } #client require 'socket' host = '192.168.1.4' port = 2000 sock = TCPSocket.open(host, port) data = sock.recvfrom(999999) destFile = File.open('/tmp/poop.exe', 'wb') destFile.print data destFile.close Ok, just to show you what im working with... it works, but there is a file size limit when working with recvfrom() im trying to work out a function to check file size then brake the data into blocks... -- Posted via http://www.ruby-forum.com/.