-
-
Save sensityy/fe527aea75fb340ea3f0dfda94512f08 to your computer and use it in GitHub Desktop.
Revisions
-
sebastienvercammen revised this gist
Dec 15, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ function myFunction() { messages.forEach(function(msg) { var value = msg.getBody() .match(/verify your email/m); if(msg.isInInbox() && value) { var link = msg.getBody().match(/<a href="https:\/\/club.pokemon.com\/us\/pokemon-trainer-club\/activated\/([\w\d]+)"/); -
sebastienvercammen revised this gist
Aug 4, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function myFunction() { var value = msg.getBody() .match(/Verify your email/m); if(msg.isInInbox() && value) { var link = msg.getBody().match(/<a href="https:\/\/club.pokemon.com\/us\/pokemon-trainer-club\/activated\/([\w\d]+)"/); if(link) { -
sebastienvercammen revised this gist
Aug 3, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,11 @@ function myFunction() { if(link) { var url = 'https://club.pokemon.com/us/pokemon-trainer-club/activated/' + link[1]; var options = { "muteHttpExceptions": true }; var status = UrlFetchApp.fetch(url, options).getResponseCode(); Logger.log("[#] Verified (" + status + "): " + url); if(status == 200) { -
sebastienvercammen renamed this gist
Aug 3, 2016 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -38,11 +38,9 @@ function myFunction() { if(status == 200) { verified++; msg.markRead(); if(moveToTrash) { msg.moveToTrash(); } } } } -
sebastienvercammen revised this gist
Aug 3, 2016 . 1 changed file with 19 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ Automatically click all "Verify your email" links in the welcome e-mail from Nintendo Pokémon Trainer Club's signup e-mails. All verified e-mails will be moved to trash unless you set "moveToTrash" to false. How to use: 1. Login to Gmail 2. Go to https://script.google.com/ @@ -13,28 +15,34 @@ function myFunction() { var verified = 0; var moveToTrash = true; var threads = GmailApp.search('in:inbox subject:"Pokémon Trainer Club Activation"'); Logger.log("Found " + threads.length + " threads."); threads.forEach(function(thread) { var messages = thread.getMessages(); Logger.log("Found " + messages.length + " messages."); messages.forEach(function(msg) { var value = msg.getBody() .match(/Verify your email/m); if(value) { var link = msg.getBody().match(/<a href="https:\/\/club.pokemon.com\/us\/pokemon-trainer-club\/activated\/([\w\d]+)"/); if(link) { var url = 'https://club.pokemon.com/us/pokemon-trainer-club/activated/' + link[1]; var status = UrlFetchApp.fetch(url).getResponseCode(); Logger.log("[#] Verified (" + status + "): " + url); if(status == 200) { verified++; if(moveToTrash) { msg.markRead(); msg.moveToTrash(); } } } } -
sebastienvercammen revised this gist
Jul 29, 2016 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,16 @@ /* Automatically click all "Verify your email" links in the welcome e-mail from Nintendo Pokémon Trainer Club's signup e-mails. How to use: 1. Login to Gmail 2. Go to https://script.google.com/ 3. Enter the code, save, run. 4. Wait until fully completed, DO NOT LEAVE THE PAGE! (When finished, the text "running..." at the top will disappear.) 5. Click View > Logs. At the bottom you'll see the total accounts verified. 6. Enjoy */ function myFunction() { var verified = 0; -
sebastienvercammen renamed this gist
Jul 29, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
sebastienvercammen created this gist
Jul 29, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ function myFunction() { var verified = 0; var threads = GmailApp.getInboxThreads(); Logger.log("Found " + threads.length + " threads."); threads.forEach(function(thread) { var messages = thread.getMessages(); Logger.log("Found " + messages.length + " messages."); messages.forEach(function(msg) { if(msg.getSubject() === "Pokémon Trainer Club Activation") { var value = msg.getBody() .match(/Verify your email/m); if(value) { var link = msg.getBody().match(/<a href="https:\/\/club.pokemon.com\/us\/pokemon-trainer-club\/activated\/([\w\d]+)"/); if(link) { var url = 'https://club.pokemon.com/us/pokemon-trainer-club/activated/' + link[1]; var status = UrlFetchApp.fetch(url).getResponseCode(); Logger.log("[#] Verified (" + status + "): " + url); if(status == 200) { verified++; } } } } }); }); Logger.log("Completed " + verified + " verifications."); }