Giter VIP home page Giter VIP logo

kelloggbot's Introduction

KelloggBot

Setup
Usage

Credit to SeanDaBlack for the basis of the script.

main.py is selenium python bot. sc.js is a the base of the ios shortcut [COMING SOON]

Setup

On mac/pc:

pip install -r requirements.txt

This will install webdriver-manager to automatically download the correct chrome driver. If you are having issues opening having it open chrome, check https://github.com/SergeyPirogov/webdriver_manager.

Poppler must be installed for pdf2image. Follow the instructions at https://pdf2image.readthedocs.io/en/latest/installation.html to install.

You will also need to install ffmpeg if it is not already installed: Mac installation guide Windows installation guide

LaTeX must also be installed for resume generation. If you're unsure where to start with that, follow the official instructions. (Mac users: I'd recommend using Homebrew to install BasicTex.)

python main.py to run. It will loop until you kill the job. ctrl + c in your terminal to give HR a break (optional).

Mac:

You might also get a trust issue with the downloaded driver being unverified. To fix that, run

xattr -d com.apple.quarantine chromedriver

this just tells the OS it's safe to use this driver, and Selenium will start working. See https://timonweb.com/misc/fixing-error-chromedriver-cannot-be-opened-because-the-developer-cannot-be-verified-unable-to-launch-the-chrome-browser-on-mac-os/ for more info.

Usage

usage: A script to automate very legitimate applications to kellogg's production plants affected by union strikes
       python3 main.py [-h] [--debug] [--mailtm]

options:
  -h, --help  show this help message and exit
  --debug     Puts script in a 'debug' mode where the Chrome GUI is visible
  --mailtm    Uses mail.tm instead of guerrilla mail by default

Kellogg bad | Union good | Support strike funds

kelloggbot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kelloggbot's Issues

Missing LICENSE

I see you have no LICENSE file for this project. The default is copyright.

I would suggest releasing the code under the GPL-3.0-or-later or AGPL-3.0-or-later license so that others are encouraged to contribute changes back to your project.

Cycle IP addresses

This isn't an issue per se, but if there are multiple submissions from the same ip address, it's likely they can just filter for non-unique on their database and drop those submissions.

Good work so far!

Maybe I'm just being dumb, but could I please have a hand?

So I was trying to install and run KelloggBot, and I believe I have everything set up, all the files in the proper PATH, and such. Upon running python main.py in CMD, I get this:

`DevTools listening on ws://127.0.0.1:1684/devtools/browser/68f9b174-8099-4da8-80d1-689e36fae52b
FAILED TO START DRIVER: Message: session not created: This version of ChromeDriver only supports Chrome version 87
Current browser version is 96.0.4664.110 with binary path C:/Users/%username%/AppData/Local/Google/Chrome/Application/chrome.exe

USING GUERRILLA TO CREATE EMAIL
EMAIL CREATED
FAILED TO CREATE ACCOUNT: local variable 'driver' referenced before assignment
FAILED TO FILL OUT APPLICATION AND SUBMIT: local variable 'driver' referenced before assignment
Traceback (most recent call last):
File "C:\Users\%username%\Downloads\KelloggBot-main\main.py", line 276, in main
fill_out_application_and_submit(driver, random_city, fake_identity)
UnboundLocalError: local variable 'driver' referenced before assignment

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\%username%\Downloads\KelloggBot-main\main.py", line 288, in
main()
File "C:\Users\%username%\Downloads\KelloggBot-main\main.py", line 280, in main
driver.close()
UnboundLocalError: local variable 'driver' referenced before assignment`

I'm not sure what they are referring to by Chrome version 87. I do have an old version of Chrome for playing Flash games still, installed as a portable version in my downloads folder.

Sorry for the dumb question, but I was wondering if I could have a hand. Thanks, I hope you have a great rest of the day, whoever is reading this :-)

Use less obviously fake fake email addresses

Currently it seems like it would be fairly easy to set up an automated system to detect the fake email addresses this uses, for example the first four I got were all either example.org or example.net addresses, it might be worth it to throw in some more domains into the mix to throw a wrench in that.

[SUGGESTION] Phone Extensions

I just got this set up this morning, but I noticed that every single generated phone number has an extension. May want to change that up.

reCaptcha complains about automated queries when running headlessly

Throwing an issue found during development of #25 here. Recaptcha seems not to like Chrome's headless browser/

<div style="">
        <div>
            <div>
                <div class="rc-doscaptcha-header">
                    <div class="rc-doscaptcha-header-text" style="font-size: 22px;">Try again later</div>
                </div>
                <div class="rc-doscaptcha-body">
                    <div class="rc-doscaptcha-body-text" tabindex="0" style="font-size: 16px;">Your computer or network
                        may be sending automated queries. To protect our users, we can\'t process your request right
                        now. For more details visit <a
                            href="https://developers.google.com/recaptcha/docs/faq#my-computer-or-network-may-be-sending-automated-queries"
                            target="_blank">our help page</a>.</div>
                </div>
            </div>
            <div class="rc-doscaptcha-footer">
                <div class="rc-footer">
                    <div class="rc-separator"></div>
                    <div class="rc-controls">
                        <div class="primary-controls">
                            <div class="rc-buttons">
                                <div class="button-holder reload-button-holder"><button
                                        class="rc-button goog-inline-block rc-button-reload rc-button-disabled"
                                        title="Get a new challenge" value="" id="recaptcha-reload-button"
                                        disabled=""></button></div>
                                <div class="button-holder audio-button-holder"><button
                                        class="rc-button goog-inline-block rc-button-audio rc-button-disabled"
                                        title="Get an audio challenge" value="" id="recaptcha-audio-button"
                                        disabled=""></button></div>
                                <div class="button-holder image-button-holder"><button
                                        class="rc-button goog-inline-block rc-button-image rc-button-disabled"
                                        title="Get a visual challenge" value="" id="recaptcha-image-button" disabled=""
                                        style="display: none;"></button></div>
                                <div class="button-holder help-button-holder"><button
                                        class="rc-button goog-inline-block rc-button-help rc-button-disabled"
                                        title="Help" value="" id="recaptcha-help-button" disabled=""></button></div>
                                <div class="button-holder undo-button-holder"><button
                                        class="rc-button goog-inline-block rc-button-undo" title="Undo" value=""
                                        id="recaptcha-undo-button" tabindex="0" style="display: none;"></button></div>
                            </div>
                            <div class="verify-button-holder"><button
                                    class="rc-button-default goog-inline-block rc-button-default-disabled" title=""
                                    value="" id="recaptcha-verify-button" disabled="">Verify</button></div>
                        </div>
                        <div class="rc-challenge-help" style="display:none" tabindex="0"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>

Error "FAILED TO FILL OUT APPLICATION AND SUBMIT: [WinError 2] The system cannot find the file specified"

File not found?
I'm on Windows 11 using Python 3.10.0
Here's a portion of my logs:

 Please use find_element() instead
  driver.find_element_by_xpath(CREATE_AN_ACCOUNT_BUTTON).click()
USING GUERRILLA TO CREATE EMAIL
EMAIL CREATED
C:\Users\kyler\KelloggBot\main.py:88: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead
  driver.find_element_by_xpath(XPATHS_2.get(key)).send_keys(info)
C:\Users\kyler\KelloggBot\main.py:91: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead
  select = Select(driver.find_element_by_id(COUNTRY_REGION_CODE_LABEL))
C:\Users\kyler\KelloggBot\main.py:93: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead
  select = Select(driver.find_element_by_id(COUNTRY_REGION_OF_RESIDENCE_LABEL))
C:\Users\kyler\KelloggBot\main.py:96: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead
  driver.find_element_by_xpath(READ_ACCEPT_DATA_PRIVACY_STATEMENT_ANCHORTAG).click()
C:\Users\kyler\KelloggBot\main.py:98: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead
  driver.find_element_by_xpath(ACCEPT_BUTTON).click()
C:\Users\kyler\KelloggBot\main.py:101: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead
  driver.find_element_by_xpath(CREATE_ACCOUNT_BUTTON).click()
C:\Users\kyler\KelloggBot\main.py:122: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead
  driver.find_element_by_xpath(VERIFY_EMAIL_INPUT).send_keys(passcode)
C:\Users\kyler\KelloggBot\main.py:123: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead
  driver.find_element_by_xpath(VERIFY_EMAIL_BUTTON).click()
successfully made account for fake email [email protected]
FAILED TO FILL OUT APPLICATION AND SUBMIT: [WinError 2] The system cannot find the file specified

I am using the latest master branch version.

Updates for installation readme

I had some issues installing on Ubuntu/Mint and figured I'd share in case the maintainers here feel it's worth updating the readme.

Chrome

  • I was getting a driver error until I installed google chrome. Maybe this is obvious but I didn't initially know I needed the chrome app instaled.

LaTeX

  • the pdf command was hanging for me (no errors). It wasnt until I installed texlive-full that it worked. It may be that this is overkill, but wasn't sure.

Thank you, this is awesome BTW.

Salary numbers?

The salary range question on the application is given a random number between 15 and 35, could this be done in a more convincing way? I'm assuming it was written with the thought that "15" means "I expect a salary of $15,000." But then why wouldn't it just be 15000?

It's also asks for "Salary Range," so maybe we should be inputting something like "$25,000-$30,000" or "20k-25k"
Also, I don't think anyone is looking specifically for a salary of "17k" or "31k", I feel like it should be multiples of 5k

LaTeX resume generator

Thinking it might help obfuscate applications if each resume is custom and aligns with the rest of the data present. Willing to work on it just want to know if its something worth completing first

Well, they added a reCaptcha -_-

failed to fill out app and submit: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="109:topBar"]"}

autoscab - generalizing kelloggbot

love what you've done here. am rearchitecting to make easier to extend for other unions in the future with some prior webscraping code i've written. absolutely LOVE the resume generator. would love to work together, solidarity forever <3

FAILED TO CREATE ACCOUNT: list index out of range

I'm on a mac, I have everything installed and set up. When I run the bot, and it goes to create an account, I get this error message: FAILED TO CREATE ACCOUNT: list index out of range

What am I doing wrong?

Regenerate the resume with certain frequency

You can write a GitHub Action that generates a new resume with a new filename and different content so that it's not flagged by the file being the same and having the exact same hash.

Invalid Session ID After Running for a While

`FAILED TO START DRIVER: Message: element not interactable: element has zero size
(Session info: chrome=96.0.4664.93)

Traceback (most recent call last):
File "C:\Users\14143\PycharmProjects\KelloggBot\main.py", line 285, in main
fill_out_application_and_submit(driver, random_city, fake_identity)
File "C:\Users\14143\PycharmProjects\KelloggBot\main.py", line 166, in fill_out_application_and_submit
driver.implicitly_wait(10)
File "C:\Users\14143\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 911, in implicitly_wait
self.execute(Command.SET_TIMEOUTS, {
File "C:\Users\14143\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\14143\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidSessionIdException: Message: invalid session id

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\14143\PycharmProjects\KelloggBot\main.py", line 297, in
main()
File "C:\Users\14143\PycharmProjects\KelloggBot\main.py", line 289, in main
driver.close()
File "C:\Users\14143\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 688, in close
self.execute(Command.CLOSE)
File "C:\Users\14143\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\14143\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidSessionIdException: Message: invalid session id

FAILED TO CREATE ACCOUNT: Message: invalid session id

FAILED TO FILL OUT APPLICATION AND SUBMIT: Message: invalid session id

Process finished with exit code 1
`

Need error handling for lines 134/135

Lines 134 & 135 occasional throw a "no such element" error, which breaks the main while loop and exits the script. I fixed it by putting a simple try/except block around lines 131-172. Didn't make a pull request cause there's definitely a better solution.

Session info: chrome=96.0.4664.93, macOS Monterey v12.0.1

"Syntax errors" regardless of python version used

This is on Debian Sid, so technically unsupported regardless, but perhaps the fix will be something simple.

When using either python which seems to be the correct python version based on the README, or python3, I get syntax errors, yet they're different depending on the version of python used. I don't know python well enough yet to say why this is happening, but perhaps you'll have an idea.

python == Python 2.7.18

  File "req.py", line 11
    print = functools.partial(print, flush=True)
          ^
SyntaxError: invalid syntax

python3 == Python 3.9.9

python3 req.py
  File "/home/valence/src/KelloggBot/req.py", line 75
    match key:
          ^
SyntaxError: invalid syntax

Starbucks fires workers attempting to unionize, next steps?

In light of today's news, is anyone involved in forking this project for a Starbucks-specific re-write? Or is there any other projects working on something similar? Seems like now would be a good time to get on top of it, since the location that fired the workers will likely be trying to hire scabs soon. Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.