Login_script Errors
Hello,
Im having a issue with login script to work. Attached are the login script, the errors from the command lines.
Upgraded to 1.5.1 and ran the command:
What is the right way to call the method: framework.options.session.check_options or just options.session.check_options?
Please scroll down to see the output using options.session.check_options. Just tried both ^
Thanks!
Login Script:
response = http.post( 'https://dev-www.blah.com/login',
parameters: { 'email' => '[email blocked]', 'password' => 'secret12' }, mode: :sync, update_cookies: true )
framework.options.session.check_url = to_absolute( response.headers.location, response.url )
framework.options.session.check_pattern = /logout|LOG OUT/
framework.options.session.check_options = {
# :get, :post, :put, :delete method: :post,
# URL query parameters.
#parameters: {
# 'param1' => 'value'
#},
# Request body parameters -- can also be a String instead of Hash.
#body: {
# 'body_param1' => 'value'
#},
cookies: {
'XSRF-TOKEN' => 'eyJpdiI6IlY1d1JTNEdMV216OUlhd1hJUVZEV2c9PSIsInZhbHVlIjoieGpGVGNUSkExYlB2Tm5lNytQK0lqVkpuOFBQODN5YVpBWW1ROFk2dzJabzVsUDFJdExUTENzNktha1NwT2ZnRlwvSFwvZU1QZk5kdEFSYytJeVlYU3JvUT09IiwibWFjIjoiNjk1YjIxY2Q5YTAzMTk3ODJlMjBjNWMyY2RkYmEwNDdlY2E3NmFkY2I4MmZjZjFkZWFiNzU1YjA1MjQyODRmYyJ9'
}
#headers: {
# 'X-Custom-Header' => 'value'
#}
}
##############################################################################################
output with framework.options.session.check_options in the script:
$arachni --plugin=login_script:script=/home/arachni_login.rb --report-save-path '/home/emailupdate.afr' https://dev-www.blah.com/account/emailVerify Arachni - Web Application Security Scanner Framework v1.5.1
Author: Tasos "Zapotek" Laskos [email blocked] (With the support of the community and the Arachni Team.)
Website: http://arachni-scanner.com
Documentation: http://arachni-scanner.com/wiki
[~] No checks were specified, loading all.
[~] No element audit options were specified, will audit links, forms, cookies, UI inputs, UI forms, JSONs and XMLs.
[*] Initializing...
[*] Preparing plugins...
[~] Login script: Running the script.
[-] [utilities#exception_jail:428] Session: [NoMethodError] undefined method `check_options=' for #Arachni::OptionGroups::Session:0x00000001cc3890
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `eval'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `eval'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `block in prepare'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:47:in `call'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:47:in `block in prepare'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:322:in `call'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:322:in `login_from_sequence'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:245:in `block in login'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:244:in `login'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:57:in `prepare'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:69:in `block (2 levels) in run'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:68:in `block in run'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `each'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `run'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework/parts/state.rb:348:in `prepare'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework.rb:110:in `run'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/ui/cli/framework.rb:80:in `block in run'
[-] [utilities#exception_jail:429] Session:
[-] [utilities#exception_jail:430] Session: Parent:
[-] [utilities#exception_jail:431] Session: Arachni::Session
[-] [utilities#exception_jail:432] Session:
[-] [utilities#exception_jail:433] Session: Block:
[-] [utilities#exception_jail:434] Session: #Proc:0x000000044bc950@/opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:244
[-] [utilities#exception_jail:435] Session:
[-] [utilities#exception_jail:436] Session: Caller:
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:244:in `login'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:57:in `prepare'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:69:in `block (2 levels) in run'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:68:in `block in run'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `each'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `run'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework/parts/state.rb:348:in `prepare'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework.rb:110:in `run'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/ui/cli/framework.rb:80:in `block in run'
[-] [utilities#exception_jail:438] Session: --------------------------------------------------------------------------------
[-] [components/plugins/login_script#prepare:59] Login script: [NoMethodError] undefined method `check_options=' for #Arachni::OptionGroups::Session:0x00000001cc3890
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `eval'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `eval'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `block in prepare'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:47:in `call'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:47:in `block in prepare'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:322:in `call'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:322:in `login_from_sequence'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:245:in `block in login'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:244:in `login'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:57:in `prepare'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:69:in `block (2 levels) in run'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:68:in `block in run'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `each'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `run'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework/parts/state.rb:348:in `prepare'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework.rb:110:in `run'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/ui/cli/framework.rb:80:in `block in run'
[-] [components/plugins/login_script#set_status:99] Login script: An error was encountered while executing the login script.
[~] Login script: Aborting the scan.
[*] ... done.
########################################################################################
options.session.check_options in the script:
arachni --plugin=login_script:script=/home/arachni_login.rb --report-save-path '/home/emailupdate.afr' https://dev-www.blah.com/account/emailVerify
Arachni - Web Application Security Scanner Framework v1.5.1
Author: Tasos "Zapotek" Laskos [email blocked]
(With the support of the community and the Arachni Team.)
Website: http://arachni-scanner.com
Documentation: http://arachni-scanner.com/wiki
[~] No checks were specified, loading all.
[~] No element audit options were specified, will audit links, forms, cookies, UI inputs, UI forms, JSONs and XMLs.
[*] Initializing...
[*] Preparing plugins...
[~] Login script: Running the script.
[-] [utilities#exception_jail:428] Session: [NoMethodError] undefined method `session' for {:script=>"/home/arachni_login.rb"}:Hash
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `eval'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `eval'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `block in prepare'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:47:in `call'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:47:in `block in prepare'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:322:in `call'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:322:in `login_from_sequence'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:245:in `block in login'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:244:in `login'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:57:in `prepare'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:69:in `block (2 levels) in run'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:68:in `block in run'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `each'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `run'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework/parts/state.rb:348:in `prepare'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework.rb:110:in `run'
[-] [utilities#exception_jail:428] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/ui/cli/framework.rb:80:in `block in run'
[-] [utilities#exception_jail:429] Session:
[-] [utilities#exception_jail:430] Session: Parent:
[-] [utilities#exception_jail:431] Session: Arachni::Session
[-] [utilities#exception_jail:432] Session:
[-] [utilities#exception_jail:433] Session: Block:
[-] [utilities#exception_jail:434] Session: #Proc:0x000000052c93b8@/opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:244
[-] [utilities#exception_jail:435] Session:
[-] [utilities#exception_jail:436] Session: Caller:
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:244:in `login'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:57:in `prepare'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:69:in `block (2 levels) in run'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:68:in `block in run'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `each'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `run'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework/parts/state.rb:348:in `prepare'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework.rb:110:in `run'
[-] [utilities#exception_jail:437] Session: /opt/arachni/system/gems/gems/arachni-1.5.1/ui/cli/framework.rb:80:in `block in run'
[-] [utilities#exception_jail:438] Session: --------------------------------------------------------------------------------
[-] [components/plugins/login_script#prepare:59] Login script: [NoMethodError] undefined method `session' for {:script=>"/home/arachni_login.rb"}:Hash
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `eval'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `eval'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:29:in `block in prepare'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:47:in `call'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:47:in `block in prepare'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:322:in `call'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:322:in `login_from_sequence'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:245:in `block in login'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/session.rb:244:in `login'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/components/plugins/login_script.rb:57:in `prepare'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:69:in `block (2 levels) in run'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `call'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/utilities.rb:425:in `exception_jail'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:68:in `block in run'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `each'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/plugin/manager.rb:65:in `run'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework/parts/state.rb:348:in `prepare'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/lib/arachni/framework.rb:110:in `run'
[-] [components/plugins/login_script#prepare:59] Login script: /opt/arachni/system/gems/gems/arachni-1.5.1/ui/cli/framework.rb:80:in `block in run'
[-] [components/plugins/login_script#set_status:99] Login script: An error was encountered while executing the login script.
[~] Login script: Aborting the scan.
[*] ... done.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Tasos Laskos on 25 Apr, 2017 12:54 PM
Try using
framework.session.check_options
rather thanframework.options.session.check_options
.Tasos Laskos closed this discussion on 25 Apr, 2017 12:54 PM.