diff --git a/honkai.ico b/honkai.ico new file mode 100644 index 0000000..ffb03c6 Binary files /dev/null and b/honkai.ico differ diff --git a/license b/license new file mode 100644 index 0000000..b43e8ed --- /dev/null +++ b/license @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 SLIME + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/march_cord.py b/march_cord.py new file mode 100644 index 0000000..09cd4bd --- /dev/null +++ b/march_cord.py @@ -0,0 +1,37 @@ +import win32ui +from pypresence import Presence +from time import sleep, time + +def wrap(id): # JIC discord isnt open + app = None + while not app: # loop if no app + try: app = Presence(id) + except: sleep(15) # zZ + return app + + +def is_honkai(): + try: win32ui.FindWindow('Qt5QWindowIcon', 'Star Rail') # Qt5QWindowIcon = honkai star rail window + except win32ui.error: return False # if not found ;-; + return True # if found ;) + +def _(mod): + honkai = is_honkai() + if (not honkai) and (mod): + app.close() # close app + return False # mod = False + if (honkai) and (not mod): + app.connect() # connect app + app.update(large_image='honkai', start=time()) # update uwO + return True # mod = True + + return mod # return mod + +app = wrap('1040182356092395550') # app id +mod = False + +while 'mod': # inf loop + try: mod = _(mod) + except: mod = False # if discord closes ;-; + sleep(15) # zZ + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..758ed39 --- /dev/null +++ b/readme.md @@ -0,0 +1,20 @@ +# march_cord +Pretty [**honkai star rail**](https://hsr.hoyoverse.com/) discord presence~ + +Uh...sometimes windows thinks **`march_cord.exe`** is a malware cause of **`pyinstaller`** being used by a lot of attackers. +If you still don't trust it. welp, use python script to build an executable yourself [**`march_cord.py`**](./march_cord.py). + +## Build yourself +download [**`honkai.ico`**](./march_cord.py) and [**`march_cord.py`**](./march_cord.py)~ +```sh +> pyinstaller -i'honkai.ico' -w -F march_cord.py +``` + +## Download +**>** [**`march_cord.zip`**](https://github.com/purpleblueslime/march_cord/releases/tag/v1.0.0/march_cord.zip).\ +**>** *unzip* [**`march_cord.zip`**](https://github.com/purpleblueslime/march_cord/releases/tag/v1.0.0/march_cord.zip).\ +**>** *paste* **`march_cord.exe`** to **`users/./appdata/roam/microsoft/wins/start/programs/startup`**, and it'll run on startup! ;) + +![march_img](https://user-images.githubusercontent.com/84064124/235434352-5e5abcc4-b7dc-420c-8fc2-72faa0d4c010.png) + +*byee~* \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..aa980b5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pywin32 +pypresence \ No newline at end of file