tag:support.arachni-scanner.com,2012-07-01:/discussions/questions/12949-correct-way-to-use-login_script-plugin-when-adding-a-scan-using-rest-apiArachni: Discussion 2016-08-24T12:15:02Ztag:support.arachni-scanner.com,2012-07-01:Comment/405497862016-08-16T14:40:58Z2016-08-16T14:40:59Zcorrect way to use login_script plugin when adding a scan using REST api<div><p>Hi,</p>
<p>I am writing a client to run Arachni scans using the REST API
and I want to utilize the login_script plugin but i am unable to
write the JSON payload correctly. i couldn't find any REST API
examples that utilize plugins.</p>
<p>I tried several variations, the latest being:<br>
plugins : { "login_script" : "script=c:\loginScript.js" }</p>
<p>How should it be written? Should i be using the 'browser'
parameter?</p>
<p>Also, should I put my script in the specified path on the
Arachni server machine?</p>
<p>Thanks,<br>
Dor</p></div>DorGtag:support.arachni-scanner.com,2012-07-01:Comment/405497862016-08-16T20:12:55Z2016-08-16T20:12:55Zcorrect way to use login_script plugin when adding a scan using REST api<div><p>Hello,</p>
<p>You were close:</p>
<pre>
<code> plugins : { "login_script" : { "script": "c:\loginScript.js" } }</code>
</pre>
<p>And yes, the script needs to be on the server.</p>
<p>Cheers</p></div>Tasos Laskostag:support.arachni-scanner.com,2012-07-01:Comment/405497862016-08-18T07:39:10Z2016-08-18T07:39:11Zcorrect way to use login_script plugin when adding a scan using REST api<div><p>Thanks!<br>
The plugin is now loaded correctly.<br>
the tool is still not passing the login page and i don't know why
(i'm using a js very similar to the example in the 'Logging in and
maintaining a valid session' page) but the original issue is
solved.</p>
<p>Dor</p></div>DorGtag:support.arachni-scanner.com,2012-07-01:Comment/405497862016-08-18T08:52:52Z2016-08-18T08:52:52Zcorrect way to use login_script plugin when adding a scan using REST api<div><p>I can't know what's going on without access to the page and the
login script.<br>
If I were you I'd switch to a Ruby script since it allows you more
control over the browser and it's more straight forward.</p>
<p>Cheers</p></div>Tasos Laskos