Command:
var
Syntax:
Copy var < var_nam e > = < valu e >
Example:
Copy var myVar = 'Text here'
print myVar
Text here
You can use variables in several diverse ways, here are some examples:
In commands:
Copy var url = "http://example.com"
server url
In options:
Copy zirkul(plugin )# url: varname
Within formatted string values:
Copy zirkul(scanner )# url "http://{{var_name}}"
zirkul(scan )# summary: "My Scan for {{var_name}}"
There are also reserved variables for dates, time, paths or objects.
Current date:
Copy print date
Mar-27-2095
Current time:
Copy print now
2095-03-27 13:52:56
Current time in UTC time zone:
Copy print utcnow
2024-03-27 19:55:29
Current day of the month in numeric format:
Current month in numeric format:
Current year in numeric format:
Current hour, minute and second:
Copy print 'Time = {{hour}} : {{minute}} : {{second}}'
Time = 12 : 35 : 47
Current working directory:
Copy print working_path
/Applications/zirkul.app/Contents/MacOS
Path based on agent current location:
Copy print binary_path
/user/Documents
The scan object is created when a scan is loaded or created, you can use the object directly or it's attributes as follows:
Copy zirkul#scan 2
[ + ] Vulnerability data retrieved from server: Success
[ + ] Scan data retrieved from server: Success
zirkul(scan )#print scan
Current scan:
==================================================
id = > 2
targetid = > 339
subject = > 'Network Scan - Internal'
description = > '192.168.90.0/24'
scan_type = > 'Network Scan'
status = > 'Completed'
created_date = > '2021-01-18 13:12:13'
created_by = > 'user@example.com'
created_api = > False
last_modified_date = > '2024-03-26 21:00:10'
last_modified_by = > 'admin@zirkul.com'
last_modified_api = > False
Attributes:
ip = > '192.168.90.0/24'
testing_environment_type = > 'Internal'
assignee = > 'user@client.com'
Compliance:
rating = > 'F'
critical = > 1
high = > 4
medium = > 78
low = > 16
informational = > 0
zirkul(scan )#print scan.scan_type
Network Scan
zirkul(scan )#
The target object is created when a target is loaded, you can use the object directly or it's attributes as follows:
Copy zirkul#target 1
[ ! ] Target loaded successfully: 1
zirkul#print target
Current target:
==================================================
id = > 1
target_type = > 'Network range'
owner = > < not se t >
name = > 'Dolphin'
description = > 'Internal network in Dolphin offices'
created_date = > '2021-01-18 13:11:47'
created_by_api = > False
created_by = > 'user@example.com'
last_modified_date = > '2021-10-21 21:31:00'
last_modified_by_api = > False
last_modified_by = > 'user@example.com'
Compliance:
rating = > 'A+'
critical = > 0
high = > 0
medium = > 0
low = > 0
informational = > 0
zirkul#
zirkul#print target.name
Dolphin
zirkul#
There's also an object called 'issues' created by the internal scanner or plugins containing the list of issues detected in the current session, you can get the summary of all issues as well as details for every specific issue as follows:
Copy zirkul#print issues
Local issues data:
==================================================
issues.count => 15
issues.critical => 0
issues.high => 0
issues.medium => 3
issues.low => 12
issues.info => 0
==================================================
You can also get more details from any issue:
print issues[1]
print issues[1].details
zirkul#print issues.count
15
zirkul#print issues[1].type
Missing X-Frame-Options Header
Last updated 8 months ago