Skip to content

Commit

Permalink
WIP scanning for V3.0.0
Browse files Browse the repository at this point in the history
Bump pyMeow to 1.43.25
  • Loading branch information
aliencaocao committed Aug 3, 2023
1 parent 0242ca4 commit 6548178
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 52 deletions.
128 changes: 77 additions & 51 deletions scanning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"found version: 2.10.11.4930\n"
"found version: 3.0.1.5106\n"
]
}
],
Expand Down Expand Up @@ -37,20 +37,20 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-05T03:34:54.602764900Z",
"start_time": "2023-07-05T03:34:54.384030300Z"
"end_time": "2023-08-03T14:16:41.522841Z",
"start_time": "2023-08-03T14:16:41.323571800Z"
}
}
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 7,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"base_address: 0x78C30000\n"
"base_address: 0x7FF822920000\n"
]
}
],
Expand All @@ -64,80 +64,106 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-05T03:34:54.628988200Z",
"start_time": "2023-07-05T03:34:54.605766600Z"
"end_time": "2023-08-03T15:23:33.260932700Z",
"start_time": "2023-08-03T15:23:33.209886500Z"
}
}
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 9,
"outputs": [
{
"data": {
"text/plain": "float"
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(r_float64(process, base_address + 0x18ed7c8))"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-08-03T15:23:48.142023800Z",
"start_time": "2023-08-03T15:23:48.115999600Z"
}
}
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-05T03:35:14.273201900Z",
"start_time": "2023-07-05T03:34:54.678987400Z"
"end_time": "2023-08-03T15:34:20.154014300Z",
"start_time": "2023-08-03T15:28:38.934284600Z"
}
},
"outputs": [
{
"data": {
"text/plain": " 0%| | 0/28684288 [00:00<?, ?it/s]",
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "cfac647b05264812861ac5d217589176"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"found current at 0xA7A580: 64.524000\n",
"found song array offset at 0xB2BCB0: 411349068\n",
"found length at 0xB2CA98: 277.995102\n"
"found current at 0x18ED7C8: 33.710000\n",
"found length at 0x192D548: 255.240000\n"
]
}
],
"source": [
"import math\n",
"from tqdm.auto import tqdm\n",
"\n",
"found_songarray = False\n",
"found_length = False\n",
"found_current = False\n",
"for offset in range(0xA70000, 0xC20000): # Change to estimated memory range\n",
"for offset in tqdm(range(0x18e0000, 0x343b000)): # Change to range of cloudmusic.dll in cheat engine\n",
" if found_songarray and found_length and found_current:\n",
" break\n",
" try:\n",
" songid_array = r_uint(process, base_address + offset)\n",
" string = '411349068' # Change to current song ID\n",
" song_id = r_bytes(process, songid_array, len(string) * 2).decode('utf-16')\n",
" if song_id == string:\n",
" print('found song array offset at 0x%X: %s' % (offset, song_id))\n",
" found_songarray = True\n",
" except Exception as e:\n",
" pass\n",
" if not found_songarray:\n",
" try:\n",
" songid_array = r_uint(process, base_address + offset)\n",
" string = '1458767558' # Change to current song ID\n",
" song_id = r_bytes(process, songid_array, len(string) * 2).decode('utf-16')\n",
" if song_id == string:\n",
" print('found song array offset at 0x%X: %s' % (offset, song_id))\n",
" found_songarray = True\n",
" except Exception as e:\n",
" pass\n",
" \n",
" if not found_length:\n",
" try:\n",
" length = r_float64(process, base_address + offset)\n",
" if math.floor(length) == 255: # Change to song length, in seconds\n",
" print('found length at 0x%X: %f' % (offset, length))\n",
" found_length = True\n",
" except Exception as e:\n",
" pass\n",
"\n",
" try:\n",
" length = r_float64(process, base_address + offset)\n",
" if math.floor(length) == 277: # Change to song length, in seconds\n",
" print('found length at 0x%X: %f' % (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 math.floor(current) == 64: # Change to current progress, in seconds\n",
" print('found current at 0x%X: %f' % (offset, current))\n",
" found_current = True\n",
" except Exception as e:\n",
" pass"
" if not found_current:\n",
" try:\n",
" current = r_float64(process, base_address + offset)\n",
" if math.floor(current) == 33: # Change to current progress, in seconds\n",
" print('found current at 0x%X: %f' % (offset, current))\n",
" found_current = True\n",
" except Exception as e:\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": 3,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-07-05T03:35:14.277359Z",
"start_time": "2023-07-05T03:35:14.275350500Z"
}
}
}
],
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'2.10.10.4509': {'current': 0xA77580, 'song_array': 0xB282CC},
'2.10.10.4689': {'current': 0xA79580, 'song_array': 0xB2AD10},
'2.10.11.4930': {'current': 0xA7A580, 'song_array': 0xB2BCB0},
'3.0.1.5106': {'current': 0x18ED7C8, 'song_array': 0x0, 'length': 0x192D548},
}
interval = 1

Expand Down
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pyMeow @ https://github.com/qb-0/pyMeow/releases/download/1.27.15/pyMeow-1.27.15.zip
pyMeow @ https://github.com/qb-0/pyMeow/releases/download/1.43.25/pyMeow-1.43.25.zip
WMI
pypresence
pyncm
Expand Down

0 comments on commit 6548178

Please sign in to comment.