Google deprecated the v3 API endpoint (sb-ssl.google.com). Update the
script to use the v4 Lookup API (safebrowsing.googleapis.com/v4).
Key changes:
- Switch from GET to POST with JSON body (required by v4 API)
- Use http.post() with correct host/port/path/options signature
- Set platformTypes to ANY_PLATFORM (was WINDOWS in the broken attempt)
- Include UNWANTED_SOFTWARE threat type alongside MALWARE and
SOCIAL_ENGINEERING
- Parse the JSON response with json.parse() instead of string-searching
the body (the old approach could false-positive on request echoes)
- Deduplicate matched threat types in output
- Detect the safe case via empty body / bare {} rather than status 204
- Update documentation URLs from deprecated code.google.com to
developers.google.com
Fixes#1474
- Add support for HTTPS
- Add support for IPv6
- Add support for more than one path argument
- Properly identify the Location header in the HTTP response
- Properly identify the destination host in the Location header
- Leverage normalized IP address comparison
- Avoid processing the HTTP response body, possibly "endless"
- Add the found IP address as a new scan target (optionally)
Close#3218, close#3191)
Frame:new() was populating the value as a 16-bit integer while
Frame:build_ether_frame() was expectng a two-byte string
Ethertype constants from various locations have been migrated to packet.lua
* Structured output
* Fix adding new targets: was adding the multicast address, not the
discovered unicast address.
* Extract service name and host name from responses
* broadcast-dns-service-discovery now lists services under each unicast
address instead of under the single multicast/broadcast address.