Skip to content

Commit

Permalink
add[patcher]: safety improvements and room card visitor/boot count (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
VensGTH authored Jul 5, 2024
1 parent a4f6deb commit 94dbc47
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 249 deletions.
245 changes: 2 additions & 243 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,79 +100,6 @@ Network Trash Folder
Temporary Items
.apdisk

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### VisualStudioCode template
.vscode/*
!.vscode/settings.json
Expand All @@ -195,6 +122,7 @@ __pycache__/

# Distribution / packaging
.Python

# scripts/
develop-eggs/
dist/
Expand Down Expand Up @@ -273,7 +201,6 @@ ipython_config.py
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
Expand Down Expand Up @@ -353,168 +280,15 @@ $RECYCLE.BIN/
### VirtualEnv template
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
.Python
[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal
[Ss]cripts
pyvenv.cfg
.venv
pip-selfcheck.json

### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
# scripts/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

### VisualStudioCode template
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

### Linux template
*~

Expand All @@ -530,23 +304,8 @@ cython_debug/
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### VirtualEnv template
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
.Python
[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal
[Ss]cripts
pyvenv.cfg
.venv
pip-selfcheck.json

### Custom
IMVUClient
imvuContent
library
*.exe

*.exe
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A modified IMVU client that unlocks useful features.

**Features**

* Unlocked photo mode (including `*hiresnob` and `*hiresnobg`) in shop
* Unlocked photo mode (including `*hiressnap` and `*hiresnobg`) in shop
* New room filters: 'Non-Empty' and '1 Person'
* Use any product with `*use <id>` command
- Note: Only other users with modified clients will see clothes
Expand Down
Binary file added scripts/devicefingerprint.pyd
Binary file not shown.
6 changes: 6 additions & 0 deletions t5de/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ def copy(self):
Client.CLIENT_PATH, os.path.join(self.cwd, 'IMVUClient'),
ignore=shutil.ignore_patterns('*.lock')
)

print('COPYING: devicefingerprint.pyd')

shutil.copy(
os.path.join(self.cwd, 'scripts/devicefingerprint.pyd'), os.path.join(self.cwd, 'IMVUClient')
)

def patch(self, patchers, dry_run=False):
"""
Expand Down
38 changes: 38 additions & 0 deletions t5de/patches/interface/RoomCardPatch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from ...patch import InterfacePatch


class RoomCardPatch(InterfacePatch):
def __init__(self):
super(RoomCardPatch, self).__init__()
self.register('ROOM_CARD_HTML', 'dialogs/room_card/index.html', 'fullness-label')
self.register('ROOM_CARD_JS', 'dialogs/room_card/roomCard.js', r'results.participants =')
self.register('ROOM_CARD_CSS', 'dialogs/room_card/roomCard.css', r'\#owner\-label')
self.register('ROOM_CARD_CSS_2', 'dialogs/room_card/roomCard.css', r'^\#owner-label, \#language-label, \#rating-label')
self.register('ROOM_CARD_CSS_3', 'dialogs/room_card/roomCard.css', r'^\#owner-name, \#language-name, \#fullness-label')

def patch(self, context):
if context.pattern == 'ROOM_CARD_HTML':
context.write(context.line)
context.write('<div id="extras-label">', indent=6)
context.write('<div id="visitors-label"><script id="inline_translate">_iT("Visitors: ", "inline_translate")</script>'
'<span class="notranslate"><span id="visitors-count"></span></span></div>', indent=7)
context.write('<div id="boot_count-label"><script id="inline_translate">_iT("Boot Count: ", "inline_translate")</script>'
'<span class="notranslate"><span id="boot-count"></span></span></div>', indent=7)
context.write('</div>', indent=6)
elif context.pattern == 'ROOM_CARD_JS':
context.write("\n")
context.write('$(\'#visitors-count\').text((results.visitors_count && results.visitors_count >= 0) ? results.visitors_count : "N/A");', indent=3)
context.write('$(\'#boot-count\').text((results.boot_count && results.boot_count >= 0) ? results.boot_count : "N/A");\n\n', indent=3)
context.write(context.line)
elif context.pattern == 'ROOM_CARD_CSS':
context.write('#extras-label > * {\n')
context.write(' display: inline-block;\n')
context.write('}\n\n')
context.write('#visitors-label {\n')
context.write(' margin-right: 10px;\n')
context.write('}\n\n')
context.write(context.line)
elif context.pattern == 'ROOM_CARD_CSS_2':
context.write(context.line.replace(' {', ', #visitors-label, #boot_count-label {'))
elif context.pattern == 'ROOM_CARD_CSS_3':
context.write(context.line.replace(' {', ', #visitors-count, #boot-count {'))
1 change: 1 addition & 0 deletions t5de/patches/interface/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
from ShopTogetherPatch import ShopTogetherPatch
from AvatarCardPatch import AvatarCardPatch
from ShopModePatch import ShopModePatch
from RoomCardPatch import RoomCardPatch
19 changes: 14 additions & 5 deletions t5de/patches/python/TelemetryPatch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ...patch import PythonPatch

import base64

class TelemetryPatch(PythonPatch):
def __init__(self):
Expand All @@ -14,7 +14,7 @@ def __init__(self):
self.register('TELEMETRY_7', 'main/clientapp.py', r'sendLogsOnLogin')
self.register('TELEMETRY_8', 'main/SendIMVULogs.py', r'def send')
self.register('TELEMETRY_9', 'main/SendIMVULogs.py', r'def send_internal')
self.register('TELEMETRY_10', 'imvu/account.py', r'fingerprint\.deviceFingerprint\(\)')
self.register('TELEMETRY_10', 'imvu/devicefingerprint.py', r'import')
self.register('TELEMETRY_11', 'imvu/log.py', r'def getRecords')

def patch(self, context):
Expand Down Expand Up @@ -48,9 +48,18 @@ def patch(self, context):
context.skip(32)
context.write('return False', indent=1)
elif context.pattern == 'TELEMETRY_10':
fingerprint = 'RlB2NFVFTTZWMmx1Wkc5M2N6b3lMalV1TVM0ekxqQTZPam89'
context.write('data = base64.b64decode(\'{}\').decode(\'utf-8\')'.format(fingerprint), indent=2)
context.write('si[\'bluecava_fingerprint\'] = data', indent=2)
fp = base64.b64decode("ZGV2aWNlZmluZ2VycHJpbnQucHlk").decode('utf-8')
context.skip(8)
context.write('def __load():')
context.write('import imp, os, sys', indent=2)
context.write('try:', indent=2)
context.write('dirname = os.path.dirname(__loader__.archive)', indent=3)
context.write('except NameError:', indent=2)
context.write('dirname = sys.prefix', indent=3)
context.write("path = os.path.join(dirname, \'{}\')".format(fp), indent=2)
context.write('mod = imp.load_dynamic(__name__, path)', indent=2)
context.write('__load()')
context.write('del __load')
elif context.pattern == 'TELEMETRY_11':
context.write(context.line)
context.write('self.clearRecords()', indent=2)

0 comments on commit 94dbc47

Please sign in to comment.