-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6639aef
commit d35abd2
Showing
8 changed files
with
291 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
THIS SCRAPER IS A RESEARCH BASED PROJECT, WE DON'T ENCOURAGE THE MISUSE OF THIS TOOL FOR BAD INTENTIONS. | ||
|
||
THE DEVELOPERS ARE NOT RESPONSIBLE FOR ANY MISUSE OF THIS TOOL. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const { acceptInvitation } = require('./utils/acceptInvitation') | ||
|
||
|
||
|
||
const start = async (event, context) => { | ||
try { | ||
const [{ destination, url }] = event.Records.map(sqsMessage => { | ||
try { | ||
return JSON.parse(sqsMessage.body); | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
}) | ||
|
||
console.info('Starting Function') | ||
|
||
console.info('Accepting Invitation', url) | ||
|
||
const result = await acceptInvitation(url) | ||
|
||
if (result === 'accepted') { | ||
console.info(`Invitation Acepted for ${destination}`) | ||
} else { | ||
console.error(result) | ||
} | ||
|
||
} catch (error) { | ||
console.error(error) | ||
} | ||
|
||
} | ||
|
||
module.exports = { | ||
start | ||
} |
40 changes: 40 additions & 0 deletions
40
AutomationServices/EmailFowardingAccept/utils/acceptInvitation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const chromium = require('chrome-aws-lambda'); | ||
const puppeteer = require("puppeteer-core") | ||
|
||
const acceptInvitation = async (url) => { | ||
|
||
return new Promise(async (resolve, reject) => { | ||
try { | ||
const browser = await chromium.puppeteer.launch({ | ||
executablePath: await chromium.executablePath, | ||
args: [...chromium.args, '--enable-features=NetworkService'], | ||
defaultViewport: chromium.defaultViewport, | ||
headless: chromium.headless, | ||
}); | ||
|
||
const page = await browser.newPage(); | ||
|
||
await page.goto(url, { | ||
waitUntil: ["networkidle0", "load", "domcontentloaded"] | ||
}); | ||
|
||
await page.waitForTimeout(3000); | ||
|
||
await page.click('input[type=submit]') | ||
|
||
await page.waitForTimeout(1000); | ||
|
||
await browser.close() | ||
|
||
resolve('accepted') | ||
} catch (error) { | ||
reject(error) | ||
} | ||
}); | ||
|
||
|
||
} | ||
|
||
module.exports = { | ||
acceptInvitation | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
AutomationServices/EmailsForwardingReader/parsers/gmail/FowardingConfirmation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
module.exports.forwardingConfirmation = (text) => { | ||
const EMAIL_DESTINATION = text.substring(0, text.indexOf(' has requested to')).trim() | ||
const URL_CONFIRMATION = text.substring((text.indexOf('confirm the request:') + 20), text.indexOf('If you')).trim() | ||
|
||
return { | ||
EMAIL_DESTINATION, | ||
URL_CONFIRMATION, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,37 @@ export default { | |
"MONGO_SECRET": "password", | ||
"MONGO_SET": "replicas_only", | ||
"MONGO_USER": "FlavioAandres", | ||
"SRV_CONFIG": false // Note the SRV CONFIG flag off | ||
"SRV_CONFIG": false, // Note the SRV CONFIG flag off | ||
"EMAIL_USERNAME": "[email protected]", //Only needed if you will not use the emails process with SES | ||
"EMAIL_PASSWORD": "PASSWORD", //Only needed if you will not use the emails process with SES | ||
"SECRET_KEY": "GENERATE_ME!", | ||
"BODY_REQUEST": "", | ||
"EMAIL_RECIPIENTS": ["[email protected]"], | ||
"USER_POOL_ARN": "arn:aws:cognito-idp:us-east-1:ID:userpool/us-east-1_ID", | ||
"TWILIO_ACCESS_TOKEN": "TOKEN", | ||
"TWILIO_SECTRET_KEY" : "SECRET_TOKEN", | ||
"TELEGRAM_BOT_KEY": "TELEGRAM_KEY" | ||
} | ||
``` | ||
|
||
```js | ||
{ | ||
"MONGO_HOST": "mongodb+srv://USER:[email protected]/DATABASE?authSource=admin&replicaSet=REPLICASET&w=majority&readPreference=primary&appname=Personal%20Finances&retryWrites=true&ssl=true", | ||
"MONGO_PORT": 27017, | ||
"MONGO_SECRET": "", | ||
"MONGO_SET": "", | ||
"MONGO_USER": "", | ||
"MONGO_DATABASE": "", | ||
"SRV_CONFIG": true, //Note SRV CONFIG flag on | ||
"EMAIL_USERNAME": "[email protected]", //Only needed if you will not use the emails process with SES | ||
"EMAIL_PASSWORD": "PASSWORD", //Only needed if you will not use the emails process with SES | ||
"SECRET_KEY": "GENERATE_ME!", | ||
"BODY_REQUEST": "", | ||
"USER_POOL_ARN": "arn:aws:cognito-idp:us-east-1:ID:userpool/us-east-1_ID", | ||
"EMAIL_RECIPIENTS": ["[email protected]"], | ||
"TWILIO_ACCESS_TOKEN": "TOKEN", | ||
"TWILIO_SECTRET_KEY" : "SECRET_TOKEN", | ||
"TELEGRAM_BOT_KEY": "TELEGRAM_KEY" | ||
} | ||
``` | ||
|
||
|
Oops, something went wrong.