-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Risky direct Key accesses on results of rpc calls are preformed throughout msfrpc.py and should be changed to .get() to avoid uncaught KeyErrors being thrown.
Examples:
pymetasploit3/pymetasploit3/msfrpc.py
Line 926 in 9776da5
| return self.rpc.call(MsfRpcMethod.DbWorkspaces)['workspaces'] |
I suggest doing something like:
val = <rpc_call>.get('<keyname>') if not val: raise Exception
or just surrounded them with a KeyError catch
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels