Created
August 27, 2015 13:44
-
-
Save adilakhter/340bb22d2d323566c4e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import json | |
import sys | |
HOST = 'logging.developmentci.rebb.baseless.nl' | |
#HOST = '127.0.0.1' | |
PORT = 1514 | |
try: | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
except socket.error, msg: | |
sys.stderr.write("[ERROR] %s\n" % msg[1]) | |
sys.exit(1) | |
try: | |
sock.connect((HOST, PORT)) | |
except socket.error, msg: | |
sys.stderr.write("[ERROR] %s\n" % msg[1]) | |
sys.exit(2) | |
msg = {"role": "Security", "scanning_timestamp":"26-08-2015-11-26-45","scanner":"Nikto v2.1.6/2.1.5","rsite_host":"192.168.59.3","rsite_port":"5000","issue_id":"999102","severity":"Security Warning","description":"GET The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS---3"} | |
test = json.dumps(msg) + "\n" | |
print test | |
sock.send(test) | |
# msg = "Connection[ohm-cassandra-2.developmentci.rebb.baseless.nl/10.200.24.93:9042-1, inFlight=0, closed=false] heartbeat query succeeded" | |
# sock.send(msg) | |
sock.close() | |
sys.exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment