using REST with python, can not specify checks

Michiel's Avatar


01 Dec, 2016 01:20 PM


I am using arachni as a REST service to scan hosts.
I've created a minimalistic python script that feeds the json to the REST api:

#!/usr/bin/env python

# see the documentation how to use more options in the JSON call

import json
import urllib2

#SCAN_OPTS=['*'] # do every check

data = {
        'url': URL, 'checks' : SCAN_OPTS

req = urllib2.Request('')
req.add_header('Content-Type', 'application/json')

response = urllib2.urlopen(req, json.dumps(data))

The variable SCAN_OPTS works when I am using ['*'] but whenever I try to make it work for the xss*,sql_injection*,csrf checks it borks..
I tried different syntaxes but I am missing something here.

Whenever I request the report I see: "checks" : [],

Can you help me out what the correct form of checks should be with JSON and Python? I am a bit stuck here and tried multiple formats of the array of checks :(

Thanks for any help and for such a great and flexible product! :)


  1. Support Staff 1 Posted by Tasos Laskos on 01 Dec, 2016 01:27 PM

    Tasos Laskos's Avatar


    That option expects an array of check names or patterns, not an array containing a single CSV for checks (because then the option wouldn't need to be an array).


    [ 'xss*', 'sql_injection*', 'csrf' ]


  2. Tasos Laskos closed this discussion on 01 Dec, 2016 01:27 PM.

  3. Michiel re-opened this discussion on 01 Dec, 2016 01:37 PM

  4. 2 Posted by Michiel on 01 Dec, 2016 01:37 PM

    Michiel's Avatar

    Ha, thanks!
    That seems to do the trick:

        "checks" : [

    But I get no results:

      "issues" : [],
      "plugins" : {}

    And I know that website should spit out some results ;)
    Should I specify more arguments in the json options? default is everything right?

  5. Support Staff 3 Posted by Tasos Laskos on 01 Dec, 2016 01:39 PM

    Tasos Laskos's Avatar

    You're missing the audit option, right now you're not auditing any elements, just crawling, see:

  6. Tasos Laskos closed this discussion on 14 Dec, 2016 02:14 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac