/HoneygainAutoClaim

Honeygain Auto Claimer bot for lucky pot, achievements and referrals every day via GitHub actions, python script or Docker file

Primary LanguagePythonMIT LicenseMIT

HoneygainAutoClaim

CodeQL

HoneygainAutoClaim is a 🐍 Python script (bot) that automatically claims your daily bonus, achievements and referrals from 🐝 Honeygain 🍯.
Honeygain is a service that allows you to 💵 earn passive income by sharing your internet connection with others.

Disclaimer

This script is not affiliated with or endorsed by Honeygain. Use it at your own risk and responsibility.
The author is not responsible for any consequences that may arise from using this script. If Honeygain wants me to delete this bot, I'll do it.

License

This project is licensed under the MIT License. For more information, see the LICENSE file.


List of Content

Requirements

Usage

🪟 Windows / 🐧 Linux

  • Clone or download this repository.
    git clone https://github.com/MrLoLf/HoneygainAutoClaim.git
    
  • Navigate in to the directory HoneygainAutoClaim
    cd HoneygainAutoClaim
    
  • Install the required modules with
    python3 -m pip install -r requirements.txt  
    
  • If you run the cron job, it's recommended to navigate back to your home directory with:
    cd ~
    
  • Run the script with
    python3 /absolut folder path/main.py  
    
  • Create a schedule to run the program every day.
  • Enjoy your daily bonus!

🐙 GitHub Actions

Disclaimer

This method might be against GitHub TOS. Use it at your own risk.

Benefits

  • Run w/o PC, VPS, On the fly
  • Keep your email, password or your token safe with env secret from GitHub
  • Automatically run everyday

Usage

Use JWT Token

  1. Go to your Honeygain Dashboard or click here and log in to your Honeygain account
  2. Open the browser's console by pressing F12 button ( or Fn+F12 on some laptops )
  3. Click on the tab Application than click to Local storage and click to https://dashboard.honeygain.com; then you will see key JWT that includes your token, copy this for next steps
  4. Fork this repository 🍴
  5. Go to your forked repository 🍴
  6. Go to Settings > Secrets and Variables > Actions, and click New Repository secret
  7. Use JWT_TOKEN and paste your JWT Token from Steps 3. Create another secret and use IsJWT set to true.
  8. Go to your forked repository 🍴 and go to the Actions tab and press I understand my workflows, go ahead and enable them
  9. Create a file in the .github folder und workflows called daily.yml and paste the below into the file. It should look like this:
name: Daily claim
on:
  schedule:
    - cron: '0 14 * * *' # <- Use UTC Time +0 , change your time here ( 14 is hour , 0 is minutes ) and use 24-hour format

jobs:
  Daily:
    runs-on: ubuntu-latest
    steps:
      - name: Check for IsJWT Secret
        id: IsJWT
        # perform secret check & put boolean result as an output
        shell: bash
        run: |
          if [ "${{ secrets.IsJWT }}" != '' ]; then
            echo "available=true" >> $GITHUB_OUTPUT;
          else
            echo "available=false" >> $GITHUB_OUTPUT;
          fi

      - name: Set IsJWT Value
        if: ${{ steps.IsJWT.outputs.available == 'true' }}
        id: IsJWTValue
        # perform secret check & put boolean result as an output
        shell: bash
        run: |
          if [ "${{ secrets.IsJWT }}" == 'false' ]; then
            echo "value=0" >> $GITHUB_OUTPUT;
          else
            echo "value=1" >> $GITHUB_OUTPUT;
          fi

      - uses: actions/checkout@v4
      - name: Run HoneygainPot with IsJWT Secret
        if: ${{ steps.IsJWT.outputs.available == 'true' }}
        run: python main.py
        env:
          MAIL: ${{ secrets.MAIL }} # <- DO NOT enter your email here, it may leak your information
          PASS: ${{ secrets.PASS }} # <- DO NOT enter your password here, it may leak your information
          JWT_TOKEN: ${{ secrets.JWT_TOKEN }} # <- DO NOT enter your JWT Token here, it may leak your information
          IsJWT: ${{ steps.IsJWTValue.outputs.value }} # <- 0 = Use Mail and Pass ; 1 = Use Token (Default is 1)

      - uses: actions/checkout@v4
      - name: Run HoneygainPot without IsJWT Secret
        if: ${{ steps.IsJWT.outputs.available != 'true' }}
        run: python main.py
        env:
          MAIL: ${{ secrets.MAIL }} # <- DO NOT enter your email here, it may leak your information
          PASS: ${{ secrets.PASS }} # <- DO NOT enter your password here, it may leak your information
          JWT_TOKEN: ${{ secrets.JWT_TOKEN }} # <- DO NOT enter your JWT Token here, it may leak your information
          IsJWT: 0 # <- 0 = Use Mail and Pass ; 1 = Use Token (Default is 1)

Use Mail and Password

  1. Fork this repository 🍴
  2. Go to your forked repository 🍴
  3. Go to Settings > Secrets and Variables > Actions, and click New Repository secret
  4. For the secret name, use MAIL and set your Honeygain email and PASS for your password and IsJWT set to false.
  5. Go to your forked repository 🍴 and go to the Actions tab and press I understand my workflows, go ahead and enable them
  6. See Step 9 from the Use JWT Token section

🐋 Docker

  • Clone or download this repository.
    git clone https://github.com/MrLoLf/HoneygainAutoClaim.git
    
    or use the docker image from docker hub
    docker pull mrlolf/honeygainautoclaim:latest
    
  • Navigate in to the directory HoneygainAutoClaim this isn't needed if the image was used
    cd HoneygainAutoClaim
    
  • To build the Dockerfile, run the command below (this can be skipped if the image was used):
    docker build -t honeygainautoclaim .
    
  • To build it for arm64 like a raspberry pi run this command:
    docker buildx build --platform linux/arm64 -t honeygainautoclaim .
    
  • To run the docker container use on of the commands below. When using the image simply add in front of honeygainautoclaim mrlolf/ it should look like this mrlolf/honeygainautoclaim
    docker run -it  honeygainautoclaim  
    
    or run it without the interactive menu
    docker run -e MAIL="your@email.here" -e PASS="PASSWORD" honeygainautoclaim
    
    or just with the token
    docker run -e JWT_TOKEN="YOURTOKEN" honeygainautoclaim
    
  • Create a schedule to run the program every day.
  • Enjoy your daily bonus!

🕑 Create a schedule

🐙 GitHub Actions

  • Well, GitHub uses UTC time (UTC + 0) for scheduling workflows, so we should convert it to our timezone.

  • For example: If I want to set the daily trigger to trigger at 9:00 PM (UTC + 7), I have to set it to 2:00 PM or 14:00 (24-hour format) (UTC ± 0) (2 + 7 = 9).

    name: Daily claim
    on:
      schedule:
        - cron: '0 14 * * *' # <- Use UTC Time +0 , change your time here ( 14 is hour , 0 is minutes ) and use 24-hour format
    
  • So, if I want the daily trigger to run at 5:00 AM (UTC + 7), I have to set it to 10:00 PM (UTC ± 0) (use 24-hour format):

    name: Daily claim
    on:
      schedule:
        - cron: '0 22 * * *' # <- Use UTC Time +0 , change your time here ( 14 is hour , 0 is minutes ) and use 24-hour format
    

🐧 Linux

  1. crontab -e  
    
  2. Add this line at the bottom 0 8 * * * python3 /absolut folder path/main.py to run the script every day at 8:00 am.

🐋 Docker

  1. You can find the docker container ID by running
    docker ps -a  
    
  2. crontab -e  
    
    Or the windows equivalent via the Task Scheduler.
  3. Add this line at the bottom 0 8 * * * docker start <container_id>. Make sure to replace <container_id> with the ID of your Docker container.

🪟 Windows

  1. Open Task Scheduler.
  2. Click on Create Task.
  3. Enter task name: HoneygainAutoClaim.
  4. Switch to Triggers tab.
  5. Click on New.
  6. Select On a schedule.
  7. Set start date to today, time to 8:00 AM.
  8. Select Daily in Settings.
  9. Click on OK.
  10. Switch to Actions tab.
  11. Click on New.
  12. Select Start a program.
  13. Enter path to Python executable, e.g. C:\Python39\python.exe.
  14. Enter path to, e.g. C:\HoneygainAutoClaim\main.py script to Add arguments.
  15. Click on OK.

Config

🪟 Windows

  • Open the folder where the main.py is being located
  • Navigate in to Config
  • Open the file HoneygainConfig.toml

🐧 Linux

nano /absoulut folder path/HoneygainAutoClaim/Config/HoneygainConfig.toml

Change logging behavior

Disclaimer

Only do this if you know what you are doing. You can break the program and logging with changes made here.

Usage

  • Open main.py
  • Edit this line
      logging.basicConfig(filename='Logs/HoneygainAutoClaim.log', filemode='w', encoding='utf-8', level=logging.INFO,
                          format='%(levelname)s ' '%(asctime)s ' '%(message)s', datefmt='%d/%m/%Y %H:%M:%S') 
  • If you want to keep your old logs you can change the filemode from w to a it uses the default python filemodes.
    By changing this be sure to clean your log sometimes because it can get very large and use a lot of space.
  • To change the logging level simple change INFO to WARN or ERROR
  • If you want to change the format you can remove the time for example by removing %(asctime)s
  • To change the time that's being shown change the datefmt