Scan host for single IP
hazcod opened this issue · comments
Expected behavior
I want to scan a host (1 IP) with a given domain name to use during web scanning.
Actual behavior
API returns CREATE_TARGET requires a host
.
Steps to reproduce
Go:
CreateTarget(&openvas.Target{
Text: targetId,
ID: targetId,
Name: targetId,
Hosts: []string{server.DomainName},
ExcludeHosts: ips,
}
So in this case I have .e.g google.com
which is represented by multiple IPs.
I want to scan one of those IPs with domain name google.com
.
(This is often used for e.g. web virtual hosts)
Hi, this is the scan repository. I guess you are trying to create a target via our protocol API but the protocol is not provided by the scanner. It is part of the gvmd component. Additionally we don't provide any Go Lang based API therefore we really can't help you. Please contact the developer of the Go Lang library.
Hi @bjoernricks , while I provided a Go example, it's actually more a conceptual question.
Can we scan a specific IP while providing a hostname that's used for e.g. HTTP hosts?
Yes you can. But this is not a bug in our software rather then a support question which belongs to https://community.greenbone.net/
See https://docs.greenbone.net/GSM-Manual/gos-6/en/scanning.html#scanning-vhosts for virtual host scanning.
Seems I missed that, thank you @bjoernricks .