Giter Club home page Giter Club logo

hanime-auto-coins-collector's Introduction

Hanime auto coin collector

Hanime mobile app gives some coins as reward on clicking an ad. This has a timeout of 3 hours. It gets really annoying to open the app every 3 hours to click on an ad.

This script when run, will forge a request to the server claiming that you have clicked on the ad. The server then adds the coins to your account. It still checks the last clicked time, so you can only run this once every 3 hours. But this makes it easier to automate getting coins, just set a cronjob that'll execute the script periodically every 3 hours.

Tested on current version 3.7.1

Usage

  1. Clone this repository
  2. Install all the requirements: pip install -r requirements.txt
  3. Open .env file and enter your hanime email and password
  4. Run the script.

If you get any errors or need any help, feel free to open an issue.

How does it work?

When we observe the requests made by the app to it's server, we'll see that, to get coins the app makes a request containing a reward token. The server then validates the reward token and gives us the coins. The token is generated on the client side somewhere when you click on an ad.

What we'd like to do is directly send this request through a script without ever clicking on an ad. So we want to reverse engineer the app a bit to understand how this token is generated.

Hanime app is based on react native framework. So the main logic of the program is mostly written in javascript. Decompiling the apk we get the minified javascript. We quickly find the token generation mechanism. The token is just a SHA-256 hash of a dynamically generated string concatenated with the current time. The server verifies if the hash matches and checks whether if 3 hours have passed since last click on ad.

We can generate random tokens now, but when we try sending this request we get an

{"errors":["Unauthorized"]}

in response. On inspection of actual requests made by the app, we see that it includes headers called X-Claim, X-Signature. These are probably used to verify whether if the request comes from the actual app or a script like this one. X-Claim is just the current time in epoch time standard. But some reversing is required to know how is X-Signature generated.

This time the signature wasn't generated in the javascript code, but inside the react native modules in java. Again the signature turned out to be SHA-256 hash of a dynamically generated string based on current time.

After this we can include these headers in our request each time to make fake requests.

hanime-auto-coins-collector's People

Contributors

alistair1231 avatar golumpa avatar ipdan4ik avatar weaveache avatar

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

Watchers

 avatar  avatar

hanime-auto-coins-collector's Issues

Total Coins

Love the script, thank you for your hard work. This is purely a QOL suggestion...was wondering if in the output you could add a new total coin amount? I personally would use it to trigger an alert to tell me when I had the 4100 needed for premium. Something like:

[] Logged in as john_doe
[
] Coins count: 1000
[*] Last clicked on Mon Jan 1 00:00:00 2022 UTC
You received 120 coins.
New total coins: 1120

I could then set up an alert to trigger immediately after that run, instead of waiting the full three hours to get the coin total the next run. Absolutely no worries if you can't find the time. Thanks again!

Changing UTC to any other timezone

First of all tysm for the macro, I've used it for only two days now and it works fluently. I automated it with a simple batch script so that it grinds automatically on a rdp, it would be cool if you can also add a batch script to the rep which runs the getcoins.py automatically after 3 hours, so that other pple can automate it too without any coding. My real question is how to change the timezone, I don't have much experience with python bc I only use batch scripts and ahk for personal things. So it would be nice if anyone can teach me what to edit in the sc so that it shows the time in my timezone (CEST atm)

Logs are glitched

The logs are often glitched f.e. random numbers between the text and lately I am also getting a Error on the logs but it's still working. It also says that the coins already got claimed although they shouldn't be claimed before.

Screenshot_20220427-195909_Microsoft Remote Desktop.jpg

Screenshot_20220427-195921_HTV 371.jpg

Tutorial

Hi guys

I never use python or java language, any idea to run this script?. any idea to make more simple just like have GUI on it?

How to get this working?

Screenshot 2023-02-13 165354

Screenshot 2023-02-13 170227

  1. I have downloaded the folder.
  2. I have installed all the pip install -requirements.txt
  3. I have opened the .env filed and entered hanime username and password.
  4. placed the hanime ps file in startup.
  5. how to run this file pls. help

**Please Help, I am not a programmer and would be much grateful if there is a step by step instructions. Thank you.

KeyError

hi, im fairly new to programming and espetially python so this might be a stupid question, but im getting the following error message when i try to run the code:

Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

Traceback (most recent call last):
File "C:\Users\grafi\Desktop\hanime-auto-coins-collector-main\getcoins.py", line 117, in
main()
File "C:\Users\grafi\Desktop\hanime-auto-coins-collector-main\getcoins.py", line 97, in main
info = login(s, hanime_email, hanime_password)
File "C:\Users\grafi\Desktop\hanime-auto-coins-collector-main\getcoins.py", line 46, in login
return getInfo(response.text)
File "C:\Users\grafi\Desktop\hanime-auto-coins-collector-main\getcoins.py", line 54, in getInfo
"session_token": received["session_token"],
KeyError: 'session_token'

Help would be greatly appreciated

Android

How do I install the the requirements file on android

Doesn't work after running

I downloaded the respository and tried to run it by "py getcoins.py". I freshly installed python 3.9.6 and it said I did not have requests and dateutil which I installed by from "pip install requests/python-dateutil". After I get this error when I try to run the py file.

[*] Logged in as Redacted
[*] Coins count: 0
Traceback (most recent call last):
  File "C:\Users\Dromu\Documents\hanime-auto-coins-collector-main\getcoins.py", line 102, in <module>
    main()
  File "C:\Users\Dromu\Documents\hanime-auto-coins-collector-main\getcoins.py", line 90, in main
    print(f"[*] Last clicked on {parser.parse(info['last_clicked']).ctime()} UTC")
  File "C:\Users\Dromu\AppData\Local\Programs\Python\Python39\lib\site-packages\dateutil\parser\_parser.py", line 1368, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "C:\Users\Dromu\AppData\Local\Programs\Python\Python39\lib\site-packages\dateutil\parser\_parser.py", line 640, in parse
    res, skipped_tokens = self._parse(timestr, **kwargs)
  File "C:\Users\Dromu\AppData\Local\Programs\Python\Python39\lib\site-packages\dateutil\parser\_parser.py", line 719, in _parse
    l = _timelex.split(timestr)         # Splits the timestr into tokens
  File "C:\Users\Dromu\AppData\Local\Programs\Python\Python39\lib\site-packages\dateutil\parser\_parser.py", line 201, in split
    return list(cls(s))
  File "C:\Users\Dromu\AppData\Local\Programs\Python\Python39\lib\site-packages\dateutil\parser\_parser.py", line 69, in __init__
    raise TypeError('Parser must be a string or character stream, not '
TypeError: Parser must be a string or character stream, not NoneType

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.