AnsweredAssumed Answered

Expand IP Range

Question asked by jdratcliffe on Jan 16, 2014
Latest reply on Feb 7, 2014 by jdratcliffe

Hello,

I am new to the Qualys API and using the API V2 quick reference guide, I haven't been able to find a way to expand out the IP range that is provided when using the following URL command.  I am scripting all of our automation using shell scripting (bash/ksh) and was wondering if anyone had any ideas on how to do this or if there was any code I could use.

 

API V2 curl command

curl -u username:password -H 'X-Requested-With:QualysApiExplorer' 'https://qualysapi.qualys.com/api/2.0/fo/asset/ip/' -d 'action=list&tracking_method=IP&compliance_enabled=1'

 

Example Response

...

...

...

<IP_RANGE>10.10.10.20-10.10.10.33</IP_RANGE>

<IP>10.11.12.13</IP>

<IP_RANGE>10.12.12.1-10.12.13.255</IP_RANGE>

<IP_RANGE>10.13.13.52-10.13.13.63</IP_RANGE>

<IP>10.14.15.16</IP>

...

...

...

 

Thanks for your help!

Outcomes