示例#1
0
        static void Main(string[] args)
        {
            // Drive with HTTPSession & HTTPManager

            ArachniHTTPSession session = new ArachniHTTPSession("127.0.0.1", 7331);
            ArachniHTTPManager manager = new ArachniHTTPManager(session);

            JObject scanOptions = new JObject();

            scanOptions["checks"] = new JArray()
            {
                "xss*", "sql*"
            };
            scanOptions["audit"]             = new JObject();
            scanOptions["audit"]["elements"] = new JArray()
            {
                "links", "forms"
            };

            string  url    = "http://demo.testfire.net/default.aspx";
            JObject scanId = manager.StartScan(url, scanOptions);
            Guid    id     = Guid.Parse(scanId["id"].ToString());
            JObject scan   = manager.GetScanStatus(id);

            while (scan["status"].ToString() != "done")
            {
                Console.WriteLine("Sleeping a bit until scan is finished");
                System.Threading.Thread.Sleep(10000);
                scan = manager.GetScanStatus(id);
            }

            Console.WriteLine(scan.ToString());
        }
示例#2
0
 public ArachniHTTPManager(ArachniHTTPSession session)
 {
     _session = session;
 }