a few fixes to sunrpc code
this fixes a couple of errors handling error messages also, some whitespace/indenting adjustments git-svn-id: file:///home/svn/framework3/trunk@8365 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
9b79ebd000
commit
a052340703
|
@ -75,7 +75,8 @@ module Exploit::Remote::SunRPC
|
||||||
|
|
||||||
arr = Rex::Encoder::XDR.decode!(ret, Integer, Integer, Integer, String, Integer)
|
arr = Rex::Encoder::XDR.decode!(ret, Integer, Integer, Integer, String, Integer)
|
||||||
if arr[1] != MSG_ACCEPTED || arr[4] != SUCCESS
|
if arr[1] != MSG_ACCEPTED || arr[4] != SUCCESS
|
||||||
err = "SunRPC call for program #{program} [#{progresolv(program)}], procedure #{procedure}, failed: "
|
progname = progresolv(rpcobj.program)
|
||||||
|
err = "SunRPC call for program #{rpcobj.program} [#{progname}], procedure #{proc}, failed: "
|
||||||
case arr[4]
|
case arr[4]
|
||||||
when PROG_UMAVAIL then err << "Program Unavailable"
|
when PROG_UMAVAIL then err << "Program Unavailable"
|
||||||
when PROG_MISMATCH then err << "Program Version Mismatch"
|
when PROG_MISMATCH then err << "Program Version Mismatch"
|
||||||
|
@ -106,7 +107,8 @@ module Exploit::Remote::SunRPC
|
||||||
ret = portmap_req()
|
ret = portmap_req()
|
||||||
arr = Rex::Encoder::XDR.decode!(ret, Integer, Integer, Integer, String, Integer)
|
arr = Rex::Encoder::XDR.decode!(ret, Integer, Integer, Integer, String, Integer)
|
||||||
if arr[1] != MSG_ACCEPTED || arr[4] != SUCCESS || arr[5] == 0
|
if arr[1] != MSG_ACCEPTED || arr[4] != SUCCESS || arr[5] == 0
|
||||||
err = "SunRPC call for program #{program} [#{progresolv(program)}], procedure #{procedure}, failed: "
|
progname = progresolv(rpcobj.program)
|
||||||
|
err = "SunRPC query for program #{rpcobj.program} [#{progname}] failed: "
|
||||||
case arr[4]
|
case arr[4]
|
||||||
when PROG_UMAVAIL then err << "Program Unavailable"
|
when PROG_UMAVAIL then err << "Program Unavailable"
|
||||||
when PROG_MISMATCH then err << "Program Version Mismatch"
|
when PROG_MISMATCH then err << "Program Version Mismatch"
|
||||||
|
|
Loading…
Reference in New Issue