Now about the Tor. Tor uses a chain of computers to make a connection so if any one of them closes the connection because of inactivity, the whole chain breaks.
So what we are going to do is
- Detect through which port Tor is connected(we might ask this from the user in the installation script)
- Snoop packets going through that port and if there is no packet sent within a specified time interval send a packet to say bing(google will block us after sometime)
- The script will run all the time
- If the connection has been lost(no activity for a threshold time interval) stop the script from sending packets.