-
Bug
-
Resolution: Fixed
-
Low
-
4.20.12
-
None
-
1
-
Severity 3 - Minor
-
Issue Summary
This is reproducible on Data Center: (yes)
Discovery - any version.
Discovery>Scan Setting tab supports various combinations of statements to compile the list of IPs to be scanned. This includes an IP range indicated withing a text file.
Discovery can also use modifiers e.g. '!' to exclude an IP/Range from the List to scan.
However, the Modifier does not work exactly the same when using a combination of an IP range and a Text file:
Assuming a text file "IPRange.text" contains the following IP range: 10.0.0.10-15:
See the following cases:
Scan Setting IP range | Actual number of IPs to be scanned | Expected number of IPs to be scanned | |
---|---|---|---|
1 | 10.0.0.1-9;IPRange.text | 15 ![]() |
15 |
2 | 10.0.0.1-9;IPRange.text! | 9 ![]() |
9 |
3 | 10.0.0.0/24;10.0.0.10-15! | 248 ![]() |
248 |
4 | 10.0.0.0/24;IPRange.text! | 254 ![]() |
248 |
Steps to Reproduce
- In the .../Discovery folder (Disco Installation folder) save a text file: .txt file containg the IP range: 10.0.0.10-15
- Configure 4 Scan settings in Discovery each with a range as indicated above
- Execute Discovery.exe -r <scan setting ID> for each of the scan settings
- check the logs - each main log's header (log named with 00000) for the List of IPs to scan
Expected Results
See table above, and below - logs for cases #1-3
<1> 12-Dec-2022 15:11:43 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:11:43 : ScanSetting: 00001 with entire Range: 10.0.0.1-9;IPRange.txt 12-Dec-2022 15:11:43 : Generating list of IP's to scan from range: 10.0.0.1-9 12-Dec-2022 15:11:43 : Generating list of IP's to scan from range: 10.0.0.10-15 12-Dec-2022 15:11:43 : Getting 15 IP's to scan. <2> 12-Dec-2022 15:11:51 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:11:51 : ScanSetting: 00002 with entire Range: 10.0.0.1-9;IPRange.txt! 12-Dec-2022 15:11:51 : Can't generating ip list from range: IPRange.txt 12-Dec-2022 15:11:51 : Generating list of IP's to scan from range: 10.0.0.1-9 12-Dec-2022 15:11:51 : Getting 9 IP's to scan. <3> 12-Dec-2022 15:11:55 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:11:55 : ScanSetting: 00003 with entire Range: 10.0.0.0/24;10.0.0.10-15! 12-Dec-2022 15:11:55 : Generating list of IP's to scan from range: 10.0.0.0/24 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.10 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.11 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.12 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.13 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.14 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.15 12-Dec-2022 15:11:55 : Getting 248 IP's to scan.
Actual Results
The file is ignored BEFORE calculating the IP range (see Case 2 log above).
See table above, and below - log for case #4
"Can't generate ip list from range: IPRange.txt"
<4> 12-Dec-2022 15:12:00 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:12:00 : ScanSetting: 00004 with entire Range: 10.0.0.0/24;IPRange.txt! 12-Dec-2022 15:12:00 : Can't generating ip list from range: IPRange.txt 12-Dec-2022 15:12:00 : Generating list of IP's to scan from range: 10.0.0.0/24 12-Dec-2022 15:12:00 : Getting 254 IP's to scan.
Workaround
Create a duplicated file, e.g. IPRangeNegate.txt indicating the IP range with the ! modifier IN the file: 10.0.0.10-11!
This means that any change to one file requires the other file to be maintained as well.
Use Case:
I have one IP range of iOS devices stated in a text file, and scanned with scan setting id 00001. The rest of my Subnet is Linux devices scanned in scan setting id 00002.
As a customer, I would like to maintain one text file with the IP range of my iOS Hosts, while not scanning these IPs when scanning the full Subnet range, hence Scan setting 0002 should ignor the IPs already scanned in Scan setting 0001 ...
- mentioned in
-
Page Failed to load
[JSDSERVER-12235] Assets Discovery - Text file IP range is NOT subtracted from a noted Scan Setting Range
Remote Link | New: This issue links to "Page (Confluence)" [ 781728 ] |
Fix Version/s | Original: 3.1.8 [ 61995 ] |
Fix Version/s | New: Discovery 3.1.8 [ 105616 ] |
Fix Version/s | New: 3.1.8 [ 61995 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Waiting for Release [ 12075 ] | New: Closed [ 6 ] |
Status | Original: In Progress [ 3 ] | New: Waiting for Release [ 12075 ] |
Support reference count | New: 1 |
Status | Original: Needs Triage [ 10030 ] | New: In Progress [ 3 ] |
Assignee | New: Viktor Kryvoruchko [ 21ad8969f413 ] |
Description |
Original:
h3. Issue Summary
This is reproducible on Data Center: (yes) Discovery - any version. Discovery>[Scan Setting tab|https://confluence.atlassian.com/insightapps/scan-settings-1085180664.html] supports various combinations of statements to compile the list of IPs to be scanned. This includes an IP range indicated withing a text file. Discovery can also use modifiers e.g. '!' to exclude an IP/Range from the List to scan. However, the Modifier does not work exactly the same when using a combination of an IP range and a Text file: Assuming a text file "IPRange.text" contains the following IP range: 10.0.0.10-15: See the following cases: || ||Scan Setting IP range||Actual number of IPs to be scanned||Expected number of IPs to be scanned|| |1|10.0.0.1-9;IPRange.text|15 (/)|15| |2|10.0.0.1-9;IPRange.text!|9 (/)|9| |3|10.0.0.0/24;10.0.0.10-15!|248 (/)|248| |4|10.0.0.0/24;IPRange.text{*}!{*}|254 (x) |248| h3. Steps to Reproduce # In the .../Discovery folder (Disco Installation folder) save a text file: .txt file containg the IP range: 10.0.0.10-15 # Configure 4 Scan settings in Discovery each with a range as indicated above # Execute Discovery.exe -r <scan setting ID> for each of the scan settings # check the logs - each main log's header (log named with 00000) for the List of IPs to scan h3. Expected Results See table above, and below - logs for cases #1-3 {code:java} <1> 12-Dec-2022 15:11:43 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:11:43 : ScanSetting: 00001 with entire Range: 10.0.0.1-9;IPRange.txt 12-Dec-2022 15:11:43 : Generating list of IP's to scan from range: 10.0.0.1-9 12-Dec-2022 15:11:43 : Generating list of IP's to scan from range: 10.0.0.10-15 12-Dec-2022 15:11:43 : Getting 15 IP's to scan. <2> 12-Dec-2022 15:11:51 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:11:51 : ScanSetting: 00002 with entire Range: 10.0.0.1-9;IPRange.txt! 12-Dec-2022 15:11:51 : Can't generating ip list from range: IPRange.txt 12-Dec-2022 15:11:51 : Generating list of IP's to scan from range: 10.0.0.1-9 12-Dec-2022 15:11:51 : Getting 9 IP's to scan. <3> 12-Dec-2022 15:11:55 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:11:55 : ScanSetting: 00003 with entire Range: 10.0.0.0/24;10.0.0.10-15! 12-Dec-2022 15:11:55 : Generating list of IP's to scan from range: 10.0.0.0/24 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.10 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.11 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.12 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.13 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.14 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.15 12-Dec-2022 15:11:55 : Getting 248 IP's to scan. {code} h3. Actual Results The file is ignored BEFORE calculating the IP range. See table above, and below - log for case #4 "Can't generate ip list from range: IPRange.txt" {noformat} <4> 12-Dec-2022 15:12:00 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:12:00 : ScanSetting: 00004 with entire Range: 10.0.0.0/24;IPRange.txt! 12-Dec-2022 15:12:00 : Can't generating ip list from range: IPRange.txt 12-Dec-2022 15:12:00 : Generating list of IP's to scan from range: 10.0.0.0/24 12-Dec-2022 15:12:00 : Getting 254 IP's to scan.{noformat} h3. Workaround Create a duplicated file, e.g. IPRangeNegate.txt indicating the IP range with the ! modifier IN the file: 10.0.0.10-11! This means that any change to one file requires the other file to be maintained as well. h4. Use Case: I have one IP range of iOS devices stated in a text file, and scanned with scan setting id 00001. The rest of my Subnet is Linux devices scanned in scan setting id 00002. As a customer, I would like to maintain one text file with the IP range of my iOS Hosts, while not scanning these IPs when scanning the full Subnet range, hence Scan setting 0002 should ignor the IPs already scanned in Scan setting 0001 ... |
New:
h3. Issue Summary
This is reproducible on Data Center: (yes) Discovery - any version. Discovery>[Scan Setting tab|https://confluence.atlassian.com/insightapps/scan-settings-1085180664.html] supports various combinations of statements to compile the list of IPs to be scanned. This includes an IP range indicated withing a text file. Discovery can also use modifiers e.g. '!' to exclude an IP/Range from the List to scan. However, the Modifier does not work exactly the same when using a combination of an IP range and a Text file: Assuming a text file "IPRange.text" contains the following IP range: 10.0.0.10-15: See the following cases: || ||Scan Setting IP range||Actual number of IPs to be scanned||Expected number of IPs to be scanned|| |1|10.0.0.1-9;IPRange.text|15 (/)|15| |2|10.0.0.1-9;IPRange.text!|9 (/)|9| |3|10.0.0.0/24;10.0.0.10-15!|248 (/)|248| |4|10.0.0.0/24;IPRange.text{*}!{*}|254 (x)|248| h3. Steps to Reproduce # In the .../Discovery folder (Disco Installation folder) save a text file: .txt file containg the IP range: 10.0.0.10-15 # Configure 4 Scan settings in Discovery each with a range as indicated above # Execute Discovery.exe -r <scan setting ID> for each of the scan settings # check the logs - each main log's header (log named with 00000) for the List of IPs to scan h3. Expected Results See table above, and below - logs for cases #1-3 {code:java} <1> 12-Dec-2022 15:11:43 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:11:43 : ScanSetting: 00001 with entire Range: 10.0.0.1-9;IPRange.txt 12-Dec-2022 15:11:43 : Generating list of IP's to scan from range: 10.0.0.1-9 12-Dec-2022 15:11:43 : Generating list of IP's to scan from range: 10.0.0.10-15 12-Dec-2022 15:11:43 : Getting 15 IP's to scan. <2> 12-Dec-2022 15:11:51 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:11:51 : ScanSetting: 00002 with entire Range: 10.0.0.1-9;IPRange.txt! 12-Dec-2022 15:11:51 : Can't generating ip list from range: IPRange.txt 12-Dec-2022 15:11:51 : Generating list of IP's to scan from range: 10.0.0.1-9 12-Dec-2022 15:11:51 : Getting 9 IP's to scan. <3> 12-Dec-2022 15:11:55 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:11:55 : ScanSetting: 00003 with entire Range: 10.0.0.0/24;10.0.0.10-15! 12-Dec-2022 15:11:55 : Generating list of IP's to scan from range: 10.0.0.0/24 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.10 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.11 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.12 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.13 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.14 12-Dec-2022 15:11:55 : Ignoring IP: 10.0.0.15 12-Dec-2022 15:11:55 : Getting 248 IP's to scan. {code} h3. Actual Results The file is ignored BEFORE calculating the IP range (see Case 2 log above). See table above, and below - log for case #4 "Can't generate ip list from range: IPRange.txt" {noformat} <4> 12-Dec-2022 15:12:00 : --------------- Start Discovery (3.1.6.0 - 6CBD1) scan --------------- 12-Dec-2022 15:12:00 : ScanSetting: 00004 with entire Range: 10.0.0.0/24;IPRange.txt! 12-Dec-2022 15:12:00 : Can't generating ip list from range: IPRange.txt 12-Dec-2022 15:12:00 : Generating list of IP's to scan from range: 10.0.0.0/24 12-Dec-2022 15:12:00 : Getting 254 IP's to scan.{noformat} h3. Workaround Create a duplicated file, e.g. IPRangeNegate.txt indicating the IP range with the ! modifier IN the file: 10.0.0.10-11! This means that any change to one file requires the other file to be maintained as well. h4. Use Case: I have one IP range of iOS devices stated in a text file, and scanned with scan setting id 00001. The rest of my Subnet is Linux devices scanned in scan setting id 00002. As a customer, I would like to maintain one text file with the IP range of my iOS Hosts, while not scanning these IPs when scanning the full Subnet range, hence Scan setting 0002 should ignor the IPs already scanned in Scan setting 0001 ... |