Created
September 14, 2012 05:26
-
-
Save hvnsweeting/3719967 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 requests | |
import json | |
HOST = "http://0.0.0.0:8080/create" | |
rules = [{"ip" : "123.123.123.123", "type":"all"}, | |
{"ip" : "192.168.4.130" , "type" : "all"}, | |
{"ip" : "192.168.3.182" , "type" : "all"}, | |
{"ip" : "123.30.53.12" , "type" : "all"}, | |
{"ip" : "222.255.27.156" , "type" : "all"}, | |
{"ip" : "1.2.3.4", "type" : "ftp"}, | |
{"ip" : "100.1.0.8", "type" : "ftp"}, | |
{"ip" : "123.1.0.8", "type" : "custom", "ports" : "23,34,56"}, | |
] | |
data = {"email" : "[email protected]", "id" : "4", "type" : ["editor","admin"], "rules" : rules} | |
r = requests.post(HOST, data=json.dumps(data)) | |
print r.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment