open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.14k stars 600 forks source link

Feature: Notify host that an automation service is using their account #709

Closed smashah closed 4 years ago

smashah commented 4 years ago

This will prevent any clandestine access to accounts without the knowledge of the host account owner.

smashah commented 4 years ago

This will be available in the upcoming version. However, it will happen on the browser and the code to implement it will be obfuscated so that it cannot be commented out.

It will send up to 3 messages:

  1. A text message notifying the use of an automation service
  2. A location message that will show the rough area of the browser IP address (if you're using a proxy it will show the location of the proxy server)
  3. a text message explaining the location message

1 will always be sent.

2 & 3 will only be sent when bypassCSP is set to true (https://open-wa.github.io/wa-automate-nodejs/interfaces/configobject.html#bypasscsp) as 2 and 3 make requests to an IP identification service ('https://api.ipify.org/?format=json') and an IP geolocation service.

By default, bypassCSP is false, meaning the IP request will fail with a CORS error:

Refused to connect to 'https://api.ipify.org/?format=json' because it violates the following Content Security Policy directive: "connect-src 'self' data: blob: https://*.whatsapp.net https://www.facebook.com https://*.giphy.com https://*.tenor.co https://crashlogs.whatsapp.net/wa_clb_data https://crashlogs.whatsapp.net/wa_fls_upload_check https://www.bingapis.com/api/v6/images/search https://*.google-analytics.com wss://*.web.whatsapp.com wss://web.whatsapp.com https://dyn.web.whatsapp.com".

This is normal and can be ignored.

smashah commented 4 years ago

Implemented in v2.0.0 f8ed576

smashah commented 4 years ago

@github-actions run

âš¡ Release! âš¡ ```js (async () => { function exec(cmd) { console.log(execSync(cmd).toString()); } // Config const gitUserEmail = "github-actions[bot]@users.noreply.github.com"; const gitUserName = "github-actions[bot]"; exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`); exec(`git config --global user.email "${gitUserEmail}"`); exec(`git config --global user.name "${gitUserName}"`); exec(`npm i`); exec(`npm run release-ci`); //comment on the issue var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString(); await postComment(result); //create changelog image exec(`npm run release-image`); exec(`git commit -a -m 'updated release-image'`); exec(`git push --force`); })(); ```
smashah commented 4 years ago

Changelog

🚀 Release 2.0.3 (2020-08-25)

TVARecordings commented 3 months ago

Time for more languages? :D