In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to use Python to make Wechat jump plug-in", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use Python to make Wechat jump plug-in bar!
Starting with the update of Wechat's latest version 6.6.1 a few days ago, WeChat Mini Programs's game "Jump" seems to have swept the moments overnight.
It is even more popular than the plane war game five or six years ago. This kind of Mini Game is popular not only because it is magic and interesting, but more importantly, it can compete for friends!
After the launch of the "jump" Mini Game, many students who are ready to forge ahead have ruined their bright vision for this holiday.
In order to jump a few more steps and the ranking of moments.
People go like this throughout the holiday:
Just jump and dance.
Jump on the subway, squat on the toilet, jump on the elevator
Every second of silence can't be wasted.
In the office, you should always be alert to the back.
The job we talked about. I can't help myself!
But a lot of people danced all afternoon.
No more than 100 points.
But 3/4 of the people on the list are in more than three digits.
It really cuts me to the heart.
Today, the editor is here to tell you how to get a high score and how to occupy the top of the moments.
Introduction to get high marks
The normal version of the high-scoring secret book goes like this:
If you can pick right in the middle every time, you can get + 2 points. If you jump to the middle in succession, you will be + 4, + 6, + 8, + 10.
Jump on top of the sewer cover and stay for 2 seconds until the sewer sound directly + 5 minutes.
Jump on the Rubik's cube and stay for 2 seconds. When the Rubik's cube becomes a regular employee, it will be + 10 points directly.
Jump on top of the music box, stay for 2 seconds, wait for the music to play will directly + 30 minutes
Jump to the convenience store and stay for 2 seconds. When the convenience store opens, it will be + 15 minutes.
The above is for ordinary users, but it is too Low for us programmers. The next thing we want to talk about is how to achieve high scores from a technical level:
Achieve high score by technical means
By means of Python
Some people have already used Python to play the jump game on Github, and they can get as many points as they want.
GitHub address: https://github.com/wangshub/wechat_jump_game
Steps:
Android phones open USB debugging, set "developer options" USB debugging.
The computer is connected to the USB line of the phone to ensure that the device id can be found by executing adb devices.
Interface to Wechat jump game, click to start the game.
Run python wechat_junp_auto.py. If the phone interface shows USB authorization, please click OK.
Very interesting! To put it simply: use the computer to help you play Wechat jump, fully automatic, no manual. Effect:
Here to sort out a slightly more complete operation steps, take Mac as an example, Win's idea is the same.
In addition, the Android phone is used here, and the iOS is similar, but you need to download a 5.5GB Xcode.
1. Download the program, open the link below, click clone or download on the right, and then click download zip.
2. Extract the zip document, move the folder to the desktop, open the folder, and you will see a lot of things:
3. Open the "terminal" that comes with the mac system, which is a command line application. Just use cmd for win.
4. Enter the folder through the terminal, and the command line is as follows:
~ / Decktop/wechat_jump_game-master
5. Install pip, enter sudo easy_install pip at the terminal and enter enter, you may have to enter the password.
6. Install various dependent programs, enter pip install-r requirements.txt in the terminal and enter, and the system will be installed automatically.
Requirements.txt is a txt document in a folder that says which programs will be installed automatically.
Pip is the program installed in step 5. If it is not installed, pip install-r requirements.txt will not be able to execute.
7, install adb, open the link below to see, there are three ways, the second is recommended, is English, if you do not understand English can Baidu Chinese course.
Https://stackoverflow.com/questions/31374085/installing-adb-on-mac-os-x
8. Open the settings of Android phone-developer options-USB debugging (if there is no developer option, Baidu can open the developer options), connect the phone and computer with USB cable, the phone may pop up a dialog box and click "agree".
If the villain does not jump after running the script, please check whether "USB debugging (safe mode)" is turned on, and remember to open the USB simulation click by the way.
9. Enter adb devices in the terminal, and if you see the following message, it means that adb has been installed correctly and that the computer has successfully detected the mobile phone.
If your system is Win10 or Win8, you may need to set "disable forced driver signing" first.
Otherwise, there will be the following "the hash value of the file is not in the specified directory" can not install the adb driver problem, online tutorials, please learn by yourself.
10. Open Wechat and jump to start. Enter python wechat_jump_auto.py at the terminal, and the game will start automatically. Please run the corresponding * .py file according to the resolution of your phone.
Note:
I have jumped many times, and finally I will fall out of the box. For the time being, I can only jump to 1800 + points at most. I can't keep jumping.
The resolution is different, the configuration file is also different, take a look at the config folder.
Do not brush too high, someone brushed to 4000, as a result, the score was cleared by Wechat.
Experimental results:
As long as you are patient, you are king.
Let's take a look at the code. The Main section has a While loop that repeats all the time as long as you don't stop.
There are three main custom functions called in the Main code, and a time.sleep is used to delay:
Pull_screenshot () # get the image
Find_piece_and_board (im) # get the coordinate values of two points according to the image
Jump (math.sqrt ((board_x-piece_x) * * 2 + (board_y-piece_y) * * 2)) # calculate the pressing time and JUMP based on the distance between two points and the phone pixel
Pull_screenshot ()
This function mainly uses adb to obtain images. By the way, "adb" here, adb is the bridge between the Android phone and the PC side, allowing users to operate the phone comprehensively on the computer.
With adb tools, we can manage devices and perform operations such as installing software, system upgrades, running Shell commands, and so on. For example, "pull" means to get the files in the device. If you want to know more about ADB, please learn by yourself.
Find_piece_and_board ()
Get the coordinate system (piece_x, piece_y, board_x, board_y) of the current villain's position and landing point according to the image, which is the core of this script.
Jump
Calculate the pressing time required according to the set "long pressing time coefficient", which is derived from the phone resolution, the pressing time setting is not less than 200ms, and the core command is adb "input swipe".
"input swipe" simulates the sliding event of a finger on the screen, which becomes a long press if the coordinates of the two points do not change.
The setting of the four variables in the code is: "swipe_x1,swipe_y1,swipe_x2,swipe_y2 = 320410320410", so it is a simulated long press, in fact, sliding is also possible.
Fake POST request for brushing points
In addition to using Python to achieve high scores, some netizens have revealed that they can directly falsify POST requests to brush scores and change scores directly.
Yesterday, there was an article on the V2EX website entitled "Wechat hop can directly change the score, POST request is not verified …" "the article received a lot of exposure, the post pointed out that WeChat Mini Programs has loopholes, jump Mini Game can directly change the score.
According to the guidelines of the post, user Zhu Pengfei found that even the source code of WeChat Mini Programs and Mini Game can be downloaded directly. You only need to know the appid and version number to directly construct the source code package of URL download with the suffix wxapkg without any verification.
According to the official account "Mini column platform" of Wechat, Wechat officials have fixed the loophole as of 23:50 on January 1. However, it is said that some old versions of Wechat can still grab the packet address.
The last Wechat has fixed Bug (some versions have not been fixed), but as long as you make good use of the first two strategies and grasp the rhythm, it will be fine before you enter the moments.
At this point, I believe that "how to use Python to make Wechat jump plug-in" have a deeper understanding, might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
I hope you can read it carefully and learn
© 2024 shulou.com SLNews company. All rights reserved.