Changeset 2337

Show
Ignore:
Timestamp:
04/03/05 18:22:38 (3 years ago)
Author:
spoonm
Message:

Send the result on the wire now, check it, throw exception in case it failed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • incoming/trunk/lib/rex/post/dispatch_ninja/process.rb

    r2335 r2337  
    1818 
    1919                client.sendmodule('getresuid') 
    20                 data = client.sockread(12) 
     20                data = client.sockread(16) 
     21                data = data.unpack('lL3') 
     22                res = data[0] 
    2123 
    2224                client.checksig() 
    23                 return data.unpack('l3') 
     25 
     26                if res < 0 
     27                        raise SystemCallError.new("getresuid()", -res) 
     28                end 
     29 
     30                return data[1, 3] # return the 3 uids 
    2431        end 
    2532