A simple bot that uses Selenium to farm Microsoft Rewards written in Python

farshadz1997 farshadz1997 Last update: May 28, 2023

cosmetic cosmetic cosmetic cosmetic

███╗   ███╗███████╗    ███████╗ █████╗ ██████╗ ███╗   ███╗███████╗██████╗ 
████╗ ████║██╔════╝    ██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝██╔══██╗
██╔████╔██║███████╗    █████╗  ███████║██████╔╝██╔████╔██║█████╗  ██████╔╝
██║╚██╔╝██║╚════██║    ██╔══╝  ██╔══██║██╔══██╗██║╚██╔╝██║██╔══╝  ██╔══██╗
██║ ╚═╝ ██║███████║    ██║     ██║  ██║██║  ██║██║ ╚═╝ ██║███████╗██║  ██║
╚═╝     ╚═╝╚══════╝    ╚═╝     ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝╚═╝  ╚═╝
        built by @charlesbel upgraded by @farshadz1997      version 2.0

cosmetic cosmetic

👋 Welcome to the future of automation

A simple bot written in Python that uses selenium to farm Microsoft Rewards.

GUI versions available

PyQt5 version of bot

cosmetic

⭐️New version powered by Flet framework⭐️

cosmetic

Installation

You can also find this repository on Gitlab. You can use the simple installation guide here.

For setting up the bot in termux ( android ), follow here

  • Install requirements with the following command :
    pip install -r requirements.txt
  • Make sure you have Chrome installed (unless your using --edge)
  • Edit the accounts.json.sample with your accounts credentials and rename it by removing .sample at the end.
    If you want to add more than one account, the syntax is the following (mobile_user_agent, proxy and goal are optional). Remove mobile_user_agent, proxy or goal from your account if you don't know how to use them:
    [
        {
            "username": "Your Email",
            "password": "Your Password",
            "totpSecret": "Your TOTP Secret (optional)",
            "mobile_user_agent": "your preferred mobile user agent",
            "proxy": "HTTP proxy (IP:PORT)",
            "goal": "Amazon"
        },
        {
            "username": "Your Email 2",
            "password": "Your Password 2",
            "totpSecret": "Your TOTP Secret (optional)",
            "mobile_user_agent": "your preferred mobile user agent",
            "proxy": "HTTP proxy (IP:PORT)",
            "goal": "Xbox Game Pass Ultimate"
         }
    ]   
  • Due to the limits of Ipapi, it may return an error and cause the bot to stop. You can define the default language and location to prevent it from crashing here.
  • Run the script
    • Use optional arguments
      • --headless You can use this argument to run the script in headless mode (BAN RISK).
      • --no-images Prevent images from loading to increase performance and decrease bandwidth.
      • --dont-check-for-updates Prevents script from checking updates.
      • --shuffle Randomize the order in which accounts are farmed.
      • --redeem Enable auto-redeem rewards based on accounts.json goals.
      • --calculator Opens GUI calculator with custom options. When using this flag the script will not run.
      • --session Use this argument to create session for each account.
      • --start-at TIME This argument takes time in 24h format (HH:MM) to run it at the given time.
      • --everyday This argument makes the script stay open and start again next day at the time you ran it.
      • --fast This argument reduces delays of the script and makes it faster (use this if you have high speed connection).
      • --superfast This argument is faster than --fast (use this if you have a very high speed and reliable connection).
      • --account-browser ACCOUNT This argument opens session for given account if it's already exist else returns error.
      • --error When you use this argument, bot displays crash errors in terminal when it fails.
      • --telegram TOKEN CHAT_ID Sends logs to your telegram through your bot. The bot and TOKEN can be created using this official bot. CHAT_ID can be retrieved via this bot and using the /getid command.
      • --discord WEBHOOK_URL Use this argument to send logs to your Discord server through a webhook.
      • --skip-unusual Click on skip for 5 days on unusual activity detection.
      • --edge Use Microsoft Edge webdriver instead of Chrome.
      • --skip-shopping Skips MSN shopping game.
      • --repeat-shopping Repeat MSN shopping game. (So it runs twice per account consecutively)
      • --no-webdriver-manager Use system installed webdriver instead of webdriver-manager (Needed for ARM devices).
      • --virtual-display Use PyVirtualDisplay (intended for Raspberry Pi users).
      • --on-finish ACTION Action to perform on finish from one of the following: shutdown, sleep, hibernate, exit.
      • --currency CURRENCY Converts your points into your preferred currency. Available currencies: EUR, USD, AUD, INR, GBP, CAD, JPY, CHF, NZD, ZAR, BRL, CNY, HKD, SGD, THB
      • --skip-if-proxy-dead skips farming a particular account whose supplied proxy is no longer active.
      • --recheck-proxy rechecks proxy in case they are reported dead.
      • --dont-check-internet Bot won't look for internet connection if you use this argument.
      • --print-to-webhook Bot will send all the message printed to cli to the webhhok. (discord or telegram argument is required).
      • --accounts-file ACCOUNTS_FILE specify a different account.json file path rather than the default.
      • For example type in your terminal python ms_rewards_farmer.py --start-at 14:30 --everyday --fast --session You don't need to use all of arguments.
    • Session and headless are disabled by default.

Features

  • Bing searches (Desktop, Mobile and Edge) with User-Agents
  • Automatically completes the daily set
  • Automatically completes punch cards
  • Automatically completes other promotions
  • Completes MSN shopping game quiz
  • Headless Mode
  • Multi-Account Management
  • Restarts account when faced with an error
  • Save progress of bot in a log file to detect farmed status if run again
  • Detect suspended accounts
  • Detect locked accounts
  • Detect unusual activities
  • Uses time outs to prevent infinite loops
  • You can assign custom user-agents for mobile like the example above
  • Set to run at a specific time
  • Uses random words for bind searches and uses bing trends if the api fails
  • Support HTTP proxies
  • Auto-redeem rewards
  • Rewards Calculator

AUTO-REDEEM (BETA)

This feature is still in beta! Feel free to try it and report any problems you find. Bear in mind that this feature was designed so it would only redeem one card from one account each time you run the farmer. This is intentional so your accounts are less likely to get banned. If you do not specify any goal in accounts.json, it will default to Amazon Gift Cards


⚠️CAUTION!⚠️

Do not use headless mode, it can cause your account to get suspended from Microsoft Rewards.

Legal Notice!

I and contributors do not endorse breaking Microsoft’s ToS. This is a proof of concept and purely for educational purposes to learn about Python and Selenium. The contributors and I have learned a lot about Python, Selenium, how to collaborate as a team of people remotely, and even using Github. Please take a look at Microsoft ToS.

Support me

Your support will be very appreciated.

  • BTC (BTC network): bc1qn52jx934nd54vhcv6x5xxsrc7z2qvwf6atcut3
  • ETH (ERC20): 0x2486D75EC2675833569b85d77b01C2c37097ECc2
  • LTC: ltc1qc03mnemxewn6z0chfc20yw4samucg6kczmwuf8
  • USDT (ERC20): 0x2486D75EC2675833569b85d77b01C2c37097ECc2

Subscribe to our newsletter