TelOne operates the Plain old telephone service (POTS) in Zimbabwe and provides a handy web page for doing phone number enquiries. But what if I want to do it in PowerShell or Python? What if I don’t want to open a browser and do enquiries?
The image below shows a snapshot of this request in IE with the Developer Tools open. Also observe the Content type returned.
As a result using
curl or the
Invoke-WebRequest cmdlet in PowerShell we can grab subscriber details on a phone number OR person name lookup.
In the example above we are search for subscriber details for someone with the name
$response.Content outputs a string containing the response which in this case is json. Visually inspecting the json you can quickly see the results of an expected query.