
Uma prova de conceito demonstrando o uso do Google Drive para comando e controle.
Este script é usado para permitir que dois sockets se comuniquem enquanto retransmitem dados através do Google Drive.
Veja este post do blog para mais detalhes.
pip2 install google-auth google-auth-oauthlib google-auth-httplib2 python-dateutil google-api-python-client
Usage: google_socks.py [options]
Options:
-h, --help show this help message and exit
--setup Setup script with Drive App
-c CREDS Index of creds in credentials array to use (default: 0)
-d Delete files with names provided to -s and -r
-l Enable Socket Mode: Listener
-i IP Enable Socket Mode: Connect
-p PORT Port number for socket mode (default: 8000)
-s SEND Sending channel (default: 0)
-r RECV Receiving channel (default: 1)
-P POLL Poll every x seconds (default: 0)
-j JITTER Amount of randomness in polling (default: 1.0)
-v Enable verbose output
--debug Enable debug output
Se você precisar enviar dados o mais rápido possível, defina sem polling (-P 0) ou jitter (-j 0). Se receber um erro por exceder o limite de taxa da API, tente aumentar o tempo de polling aos poucos até encontrar um ponto ideal. Descobri que 0,2 segundos funcionou bem.