where is config id in openvas

Support/Development for OpenVAS
bak1234
New Forum User
New Forum User
Posts: 3
Joined: Mon Nov 09, 2020 12:22 am
Location: India

where is config id in openvas

Unread post by bak1234 »

Hii,

Can someone please tell me where is the openvas config id in the interface or how can i find the config id in openvas?
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: where is config id in openvas

Unread post by mikeshinn »

Could you explain a little more about what you want to change?
bak1234
New Forum User
New Forum User
Posts: 3
Joined: Mon Nov 09, 2020 12:22 am
Location: India

Re: where is config id in openvas

Unread post by bak1234 »

Hii,

I am using the following python script from gsm docs available at (https://docs.greenbone.net/GSM-Manual/gos-4/en/omp.html)

len_args = len(args.script) - 1
if len_args is not 2:
message = """
This script creates a new task with specific host and nvt!
It needs two parameters after the script name.
First one is name of the target and the second one is the
chosen host. The task is called target-task

Example:
$ gvm-pyshell ssh newtask target host
"""
print(message)
quit()

target = args.script[1]
host = args.script[2]
task = target + " Task"

# Full and Fast
myconfig_id = "daba56c8-73ec-11df-a475-002264764cea"


# OpenVAS Scanner
myscanner_id = "08b69003-5fc2-4037-a479-93b440211c73"

res=gmp.create_target(target, True, hosts=host)
mytarget_id = res.xpath('@id')[0]

res=gmp.create_task(name=task,
config_id=myconfig_id,
scanner_id=myscanner_id,
target_id=mytarget_id)
mytask_id = res.xpath('@id')[0]

gmp.start_task(mytask_id)


So, my doubt is that in the above code how can I enter my id in "myconfig id" . As we know openvas scanner id is fixed , but from where can I enter myconfig id in the above code which I have marked as red color in the above code.
Post Reply