SeanDaBlack / KelloggBot

Kellogg bad | Union good | Support strike funds
GNU General Public License v3.0
398 stars 81 forks source link

Now they're doing email verification #50

Closed ghost closed 2 years ago

ghost commented 2 years ago

This seems much harder to get around, yeah?

ghost commented 2 years ago

We could try to use something like guerrillamail, but I'd be worried about them filtering out their domains.

bolshoytoster commented 2 years ago

@KathrynElrod i'm surprised they didn't do this from the start, I think your suggestion of using guerrillamail will be fine until they start filtering out domains.

I wouldn't be surprised if there was a Kellogs dev going through these repos.

ghost commented 2 years ago

at least we're costing them headache and money, haha

cafeclimber commented 2 years ago

Just from quick searching, it looks like 10minutemail gives a random domain? Idk how easy integration would be though

bolshoytoster commented 2 years ago

@cafeclimber we could use a combination of multiple of them.

Currently this issue is top priority so I'm starting work on a fix now.

ghost commented 2 years ago

branch? @bolshoytoster

bolshoytoster commented 2 years ago

@johnmarston139

branch? @bolshoytoster

I'm currently working on my own fork but I could move it to a branch if you'd prefer.

ghost commented 2 years ago

https://10minutemail.net/address.api.php

currently gets a brand new address each time it's called, but there must be a way to pass in a user as a parameter.

ghost commented 2 years ago

no worries, was just curious how you were bypassing the email verification. since this project is Python based and we all love 10minutemail, this may be useful https://pypi.org/project/python-10minutemail/

Scrape the inbox for the one-time code and send it to verify email; continue execution :)

from minutemail import Mail
import time

# Create a new 10 minute mail
mail = Mail()
print(mail)

# Keep on checking for a new mail/message
while True:
    if mail.new_message():  # Check for new mail
        print(mail.fetch_message())  # Fetch all the messages
    time.sleep(2)
ghost commented 2 years ago

currently a slave to capitalism but once i have free time today, I can look into that option if significant progress has not already been made. dont wanna step on any toes

pws1453 commented 2 years ago

@johnmarston139

branch? @bolshoytoster

I'm currently working on my own fork but I could move it to a branch if you'd prefer.

I know some work has been done on my fork - I don't mind making a few diff branches if needed.

pws1453 commented 2 years ago

This branch exists if you need it - should be able to accept PRs for a while https://github.com/pws1453/KelloggBot/tree/email-verification

ghost commented 2 years ago

https://pypi.org/project/python-10minutemail/

@johnmarston139 That looks basically perfect, nice find!

tommmmyb commented 2 years ago

FYI: the bottom of the python-10minutemail github has this warning:

Warning: If you overuse this tool/API, then 10minutemail.com may block your IP address.

Just switching VPN servers might not be sufficient. Maybe the proxy server thing that some people have been experimenting with? Idk if we wanna abuse 10minutemail though, they're not the capitalist scum that we're after

bolshoytoster commented 2 years ago

@tabrown2000 I'm still working on the guerrilla mail verification as well, that doesn't say anything about blocking, the closest I could find was:

Note: The API may be rate limited, but we do not publish our rate limits. Please use this API carefully.

If we alternate between the two providers it should ease the strain on their servers.

ghost commented 2 years ago

@tabrown2000 I'm still working on the guerrilla mail verification as well, that doesn't say anything about blocking, the closest I could find was:

Note: The API may be rate limited, but we do not publish our rate limits. Please use this API carefully.

If we alternate between the two providers it should ease the strain on their servers.

I like this solution! Alternating between 2 providers may spread the load enough

ghost commented 2 years ago

We could also way lower the rate that the tool runs at. With even just 20 people running the script every 10 minutes, that's 120 applications an hour, which would still be enough to mess up their system.

tommmmyb commented 2 years ago

At a glance, guerilla mail looks like the best way to go. Not only does the python package have a built in method for switching servers, but also because I can't seem to get the 10minutemail python package to work.

Anyone else run into a JSONDecodeError just trying to initialize the Mail class in the 10minutemail package?

ghost commented 2 years ago

I havent actually gotten a chance to play around w/ the package yet, just found it doing a quick preliminary search. Apologies if it's borked :P I'm all for w/e the better solution is

tommmmyb commented 2 years ago

Here's a stretch - I found a github repo where someone used Go to create their own guerilla mail server. Just throwin' that out there, I don't even know Go or have a computer to dedicate as a server, but...

https://github.com/flashmob/go-guerrilla

bolshoytoster commented 2 years ago

@tabrown2000

At a glance, guerilla mail looks like the best way to go. Not only does the python package have a built in method for switching servers, but also because I can't seem to get the 10minutemail python package to work.

Anyone else run into a JSONDecodeError just trying to initialize the Mail class in the 10minutemail package?

I didn't know there's a python module for guerrilla, I was just sending the api requests manually.

I've nearly finished doing it this way so I'll submit a pr when I do.

bolshoytoster commented 2 years ago

@pws1453 I've opened the pr if you want to test it out.

pws1453 commented 2 years ago

it's pulled - was in a meeting

bolshoytoster commented 2 years ago

@pws1453 no worries.

cafeclimber commented 2 years ago

Hopefully I'm being helpful and not just spamming a ton of different services, but I also found mail.tm which has an api for numerous languages (including Python). From what I can tell the only restriction is 8 queries per second per IP which seems more than reasonable. I'm not sure the domains are entirely random, but the api is here (last commit 9 mos ago). I'll try to do some testing tonight and give updates on the various apis I've mentioned.

bolshoytoster commented 2 years ago

@cafeclimber

Hopefully I'm being helpful and not just spamming a ton of different services

Don't worry, any suggestion is useful.

I'll see if I can add 10minutemail support now and I'll try mail.tm later if I have time.

Update: It looks like 10minutemail has changed their api, but not the documentation (additionally, about half of the words have been replaced with 'null' for some reason).

Update 2: mail.tm requires an account and 10minutemail won't let you generate a new email - it just gives you the one you had before. I guess it doesn't matter that much as long as guerrilla works

cafeclimber commented 2 years ago

@bolshoytoster I managed to get it working with mail.tm really easily. The only issue is it takes about 3-4 minutes for mail to come in.

Here's a minimal working example:

import pymailtm

mail = pymailtm.MailTm()
acct = mail.get_account() # This randomly generates an account and password

while len(acct.get_messages()) == 0:
    sleep(1)

msgs = acct.get_messages()

print(msgs[0].text)
bolshoytoster commented 2 years ago

@cafeclimber I didn't see the get_account function sorry. It takes ~10 seconds with guerrilla.

If you think the 3-4 minutes is worth it I can add this to the email-verification branch

cafeclimber commented 2 years ago

No worries! Just wanted to make sure all the options were available. I think it could just be a backup option in the event domains start getting blocked, excessive guerilla queries, etc.

bolshoytoster commented 2 years ago

@cafeclimber I can implement this as a timeout for waiting for the confirmation email, and just assume that the email was blocked if it isn't recieved.

ghost commented 2 years ago

@pws1453 @bolshoytoster Awesome work, y’all - once you’re happy with it feel free to open a PR and I can review & merge

bolshoytoster commented 2 years ago

@KathrynElrod I've literally just finished adding mail.tm support.

My fork has some experimental stuff from the #25 fork, so should I open the pr to here or to that fork?

pws1453 commented 2 years ago

I can merge you into my branch now, and we can merge my branch (pr https://github.com/SeanDaBlack/KelloggBot/pull/25) if ya want

bolshoytoster commented 2 years ago

@pws1453 alright, I'll open a pr to your email-support branch then you can merge that to main and hopefully merge the rest with this repo.

pws1453 commented 2 years ago

okay cool send it over

bolshoytoster commented 2 years ago

@pws1453 I've opened it https://github.com/pws1453/KelloggBot/pull/4

pws1453 commented 2 years ago

merged into my main, status reflected in https://github.com/SeanDaBlack/KelloggBot/pull/25

bolshoytoster commented 2 years ago

@pws1453 cheers, I'm going to go to bed now as it's 3:35 am.

ghost commented 2 years ago

Closed by #25