Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'url': url,
'status': status,
'network_name': self.network,
'probe_uuid': self.cfg.get('cf-probe', 'probe_uuid'),
'date': self.signer.timestamp(),
'blocktype': 'PARENTAL',
'config': -1,
'ip_network': None,
'http_status': None,
}
rsp['signature'] = self.signer.get_signature(
args=rsp,
keys=["probe_uuid", "url", "status", "date", "config"])
urlhash = data.get('hash')
msg = amqp.Message(json.dumps(rsp))
routing_key = 'results.' + self.network + '.' + \
(urlhash if urlhash is not None else '')
self.ch.basic_publish(msg, self.cfg.get('cf-probe','exchange'), routing_key)
time.sleep(0.1)
return True