• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import requests
2
3
4server_address = "192.168.1.42"
5api_address = "https://api.ipify.org"
6
7# https://api.ipify.org should be allowed on default
8print(requests.get(f"http://{server_address}/public_ip", params={"api": api_address}).content.decode())
9
10# Now let's use an address which isn't on the allow list. This is an MAC address to Vendor API.
11# If tcp_mon_block is running and filtering the Flask's server PID, this request should fail! otherwise we should receive a response
12api_address = "https://api.macvendors.com/00:0c:29:de:b1:fd"
13
14print(requests.get(f"http://{server_address}/public_ip", params={"api": api_address}).content.decode())
15