import utime
file_path = "/network_data.txt"
while True:
try:
# Victim thinks it is requesting data
with open(file_path, "w") as file:
file.write("REQUEST: google.com")
utime.sleep(1) # Allow attacker time to modify
# Read the response
with open(file_path, "r") as file:
response = file.read()
print(f"Victim Received: {response}") # Will receive fake response
except Exception as e:
print("Error:", str(e))
utime.sleep(5) # Send requests every 5 seconds