コード例 #1
0
ファイル: http.py プロジェクト: gsuntres/restrek
    def from_data(cls, data):
        headers = get_val(data, 'headers', dict())
        body = get_val(data, 'body', None)
        cookies = get_val(data, 'cookies', dict())
        status = get_val(data, 'status')

        return cls(body, headers, cookies, status)
コード例 #2
0
 def properties(self):
     return get_val(self.step, C.PROPERTIES_KEY)
コード例 #3
0
 def payload(self):
     return get_val(self.step, C.PAYLOAD_KEY)
コード例 #4
0
 def tests(self):
     return get_val(self.step, C.TESTS_KEY)
コード例 #5
0
 def name(self):
     s = '[-]'
     if self.command:
         s = '[%s]' % self.command.plugin
     s += ' %s' % get_val(self.step, C.COMMAND_KEY, '----')
     return s
コード例 #6
0
 def output(self):
     return get_val(self._results, 'output', dict())