Skip to content

TomyCesaille/whatsapp-tracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ff2f873 · Apr 16, 2021

History

25 Commits
Apr 16, 2021
Apr 19, 2020
Jan 29, 2021
Apr 19, 2020
Mar 30, 2020
Apr 16, 2021
Apr 16, 2021
Apr 19, 2020
Jan 29, 2021
Apr 3, 2020
Apr 16, 2021
Apr 16, 2021
Apr 16, 2021
Apr 16, 2021

Repository files navigation

whatsapp-tracking

Proof of concept about tracking contacts in WhatsApp.

DISCLAIMER: This is a Proof of Concept to raise awareness. Don't use the source code to track someone, don't be a dick.

grafana

architecture

The POC is composed of:

  • The Node.js WhatsApp scraper robot - Gather the data
  • The InfluxDB 2.0 service - Store the data
  • The Grafana 6.7 service - Visualize the data

setup

# run the InfluxDB and Grafana services
docker-compose up -d influxdb grafana

influxDB setup

  • Go to http://localhost:9999, setup an admin account
    • Name the initial organization like you want, initial-org for instance
    • Name the initial bucket anything, like yolo, we won't use the initial one because there will be sample data in it
  • Create a new bucket whatsapp-tracking
  • Generate a token whatsapp-tracking-scraper with write permission to whatsapp-tracking bucket
  • Generate a token grafana with 'all access'

grafana setup

  • Go to http://localhost:3000, setup an admin account
  • Add the data source using the plugin Flux (InfluxDB) [BETA] (for InfluxDB 2.0)
    • URL: http://influxdb:9999
    • with credentials: true
    • Organization: initial-org
    • Default Bucket: whatsapp-tracking
    • Token: the grafana token
  • Import the dashboard (file grafana-dashboard.json)

scraper setup

Create a file .env in the root directory to setup your environment.

CONTACT_TARGET=YourContactName
INFLUXDB_TOKEN=The whatsapp-tracking-scraper token
INFLUXDB_ORG=initial-org
INFLUXDB_BUCKET=whatsapp-tracking

scraper usage Windows

# init the robot
npm install
# run the robot
node index.js

scraper usage docker

docker-compose up scraper
# Look at `./data/screenshots/` to get the QR code peering.