Comments (13)
You can use this launcher in anything you want as long as you mention the use of the project!
For the password in the command line, I already rejected the suggestion from another one because it seemed too risky to me. Process command lines can be seen by anybody with sufficient privileges on a computer, and this would leak your password to any administrator. Also, this feature will not work with Microsoft login because you need in this case to input the password in a web browser.
However, I understand why this feature can be useful for scripts that want to use PMC, so I'm open to suggestions if you have any idea how to securely transfer a password to the launcher.
from portablemc.
@mindstorm38 Thanks. I managed to make it work.
from portablemc.
I've seen this error before, but I could not remember how and when.
Could you provide more information about your friend's installation of the launcher, and what is the command line used here?
from portablemc.
@mindstorm38 I just use normal command line: start fabric:1.17.1
. But I already found why it happened. The problem is PMC script isn't download/install Java properly. I fixed this by change Java path.
from portablemc.
@mindstorm38 Anyway can u add a way to input the account password in start command instead of input it after the command start started ? Thanks. And also I used your launcher/script to make this launcher: https://github.com/GoodDay360/Tempest-Launcher
Hope you don't mind
from portablemc.
I did know a way. Since I use pyqt to make UI there is a way that allow user to input password field and blur so user can't see their password. (For Mojang account). But for Microsoft account I'm okay with it since it need to be login in webbrowser.
from portablemc.
How are you calling PMC in you launcher?
from portablemc.
@mindstorm38 I convert your PMC into .exe and use subprocess to start comment like: loader.exe start fabric:{version} -u {username} -jvm...
.
You can try install my launcher and u can do some explore. My launcher path: %APPDATA%/.Tempest Launcher
. And u can input some string into login password input to see what I mean by blur.
I use pyinstaller to convert the script. Since pyinstaller give window defender false flag. If the program isn't working turn off window defender but most PC no need to turn off
from portablemc.
The fact that you blur the password on the UI side doesn't prevent the password from being leaked, because when you run the sub process, the entire command line is stored by the system. As you can see in the following screenshot, you can see the command line of the Minecraft process by querying the system (the command to do that is Get-WmiObject Win32_Process -Filter "name = 'javaw.exe'"
on powershell). The most secure way might be to send the password to the process input (stdin
).
from portablemc.
To do that you can use Popen
with communicate
, you can put the password (with a line return character at the end) in the input. If the launcher ask for the password, the input will be used as far as I know.
from portablemc.
What you mean is there a way to auto input the password once PMC is asking for password ? I just want to make user easily put password in UI and transfer it to PMC.
from portablemc.
Yes that's it, you can give an input to the process, and it can be the password (don't forget the line return character, \n
, it actually "enter" the password). I guess you're are currently using subprocess.run
, to send an input you just have to use subprocess.Popen
and then call communicate
on the Popen object (check subprocess module documentation).
from portablemc.
I close the issue for now, if you are stuck again comment here!
from portablemc.
Related Issues (20)
- Wayland support HOT 4
- Console addon is broken on Python 3.11 HOT 4
- Stopped resolving loader for quilt out of nowhere HOT 10
- Quilt has too many Parents HOT 4
- API Question HOT 1
- API Question HOT 5
- --jvm is ignored / crash at launch forge installer HOT 33
- portablemc Fails to Authenticate user HOT 19
- Stuck on "Resolving version 1.19..." or similar text HOT 1
- KeyError: 'path' when running on MacOS HOT 8
- Unexpected Error while loading libraries / startup HOT 6
- Wrong fabric version meta id
- I don't understand how to properly install HOT 1
- Optifine installation HOT 1
- Rewrite launcher for v4 HOT 42
- Crashes when attempting to enter or create a world HOT 6
- Lwjgl 3.3.2 HOT 2
- FileNotFoundError: [Errno 2] No such file or directory: '~/Library/Application Support/minecraft/jvm/java-runtime-gamma/bin/java' HOT 1
- not able to login when launching HOT 1
- Api Microsoft login question HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portablemc.