-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump version to 0.2.5 Fix README.md lines
- Loading branch information
1 parent
b2a059b
commit 995746d
Showing
6 changed files
with
160 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": { | ||
"collapsed": true, | ||
"ExecuteTime": { | ||
"start_time": "2023-04-22T10:04:13.452175Z", | ||
"end_time": "2023-04-22T10:04:13.647320Z" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import wmi\n", | ||
"import gc\n", | ||
"wmic = wmi.WMI()\n", | ||
"process = wmic.Win32_Process(name=\"cloudmusic.exe\")\n", | ||
"process = [p for p in process if '--type=' not in p.ole_object.CommandLine]\n", | ||
"if not process:\n", | ||
" raise RuntimeError('No candidate process found')\n", | ||
"elif len(process) != 1:\n", | ||
" raise RuntimeError('Multiple candidate processes found!')\n", | ||
"else:\n", | ||
" process = process[0]\n", | ||
" pid = process.ole_object.ProcessId\n", | ||
" del process\n", | ||
" del wmic\n", | ||
" gc.collect()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": { | ||
"collapsed": false, | ||
"ExecuteTime": { | ||
"start_time": "2023-04-22T10:04:13.646295Z", | ||
"end_time": "2023-04-22T10:04:13.692753Z" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from pyMeow import open_process, get_module, r_float64, close_process, get_module, r_bytes, r_uint\n", | ||
"import psutil\n", | ||
"\n", | ||
"process = open_process(pid)\n", | ||
"ps_util_process = psutil.Process(pid)\n", | ||
"base_address = get_module(process, 'cloudmusic.dll')['base']" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 7, | ||
"metadata": { | ||
"collapsed": false, | ||
"ExecuteTime": { | ||
"start_time": "2023-04-22T10:08:53.381381Z", | ||
"end_time": "2023-04-22T10:09:29.931530Z" | ||
} | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"found current at 0xa74570: 55.765\n", | ||
"found song array offset at 0xb24f28: 1458767558\n", | ||
"found length at 0xb25d18: 255.24\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"for offset in range(0xA70000, 0xC20000): # Change to estimated memory range\n", | ||
" found_songarray = False\n", | ||
" found_length = False\n", | ||
" found_current = False\n", | ||
" try:\n", | ||
" songid_array = r_uint(process, base_address + offset)\n", | ||
" song_id = r_bytes(process, songid_array, 0x14).decode('utf-16')\n", | ||
" if song_id == '1458767558': # Change to current song ID\n", | ||
" print(f'found song array offset at {hex(offset)}: {song_id}')\n", | ||
" found_songarray = True\n", | ||
" except Exception as e:\n", | ||
" pass\n", | ||
"\n", | ||
" try:\n", | ||
" length = r_float64(process, base_address + offset)\n", | ||
" if length > 255 and length < 256: # Change to song length, in seconds\n", | ||
" print(f'found length at {hex(offset)}: {length}')\n", | ||
" found_length = True\n", | ||
" except Exception as e:\n", | ||
" pass\n", | ||
"\n", | ||
" try:\n", | ||
" current = r_float64(process, base_address + offset)\n", | ||
" if current > 55 and current < 56: # Change to current progress, in seconds\n", | ||
" print(f'found current at {hex(offset)}: {current}')\n", | ||
" found_current = True\n", | ||
" except Exception as e:\n", | ||
" pass\n", | ||
" if found_songarray and found_length and found_current:\n", | ||
" break" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.2" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
play 爱你没错 by 雷小宝 and run the brute force scirpt in test.ipynb | ||
play 爱你没错 by 雷小宝 and run the brute force scirpt in scanning.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.