
Una prova di concetto che dimostra l'uso di Google Drive per il comando e controllo.
Questo script viene utilizzato per consentire a due socket di comunicare trasmettendo dati tramite Google Drive.
Consulta questo post del blog per maggiori dettagli.
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 devi inviare dati il più velocemente possibile, non impostare alcun polling (-P 0) o jitter (-j 0). Se ricevi un errore per il superamento del limite di velocità dell'API, prova ad aumentare il tempo di polling poco a poco finché non trovi il punto ottimale. Ho scoperto che 0,2 secondi funzionavano bene.