I was wondering if someone had an idea how to extract with 'jq' the following strings; 'ip, port' from the input files available on Rapid7 opendata website:
Any help would be very appreciated,
Thanks
I was wondering if someone had an idea how to extract with 'jq' the following strings; 'ip, port' from the input files available on Rapid7 opendata website:
Any help would be very appreciated,
Thanks
$ wget https://opendata.rapid7.com/sonar.https/2020-07-26-1595771130-https_get_50880.json.gz
$ zcat 2020-07-26-1595771130-https_get_50880.json.gz | jq '.ip,.port' | head
"73.71.198.224"
50880
"3.228.14.207"
50880
"175.139.245.229"
50880
"162.208.16.163"
50880
"58.58.213.88"
50880
zcat 2020-07-26-1595771130-https_get_50880.json.gz | jq -r '"\(.ip):\(.port)"' | head
73.71.198.224:50880
3.228.14.207:50880
175.139.245.229:50880
162.208.16.163:50880
58.58.213.88:50880
18.130.113.90:50880
54.216.22.17:50880
15.236.60.123:50880
77.54.234.109:50880
71.37.173.187:50880
Thanks to @peak for the improvement!