Giter Club home page Giter Club logo

Comments (13)

mindstorm38 avatar mindstorm38 commented on May 31, 2024 1

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.

GoodDay360 avatar GoodDay360 commented on May 31, 2024 1

@mindstorm38 Thanks. I managed to make it work.

from portablemc.

mindstorm38 avatar mindstorm38 commented on May 31, 2024

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.

GoodDay360 avatar GoodDay360 commented on May 31, 2024

@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.

GoodDay360 avatar GoodDay360 commented on May 31, 2024

@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.

GoodDay360 avatar GoodDay360 commented on May 31, 2024

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.

mindstorm38 avatar mindstorm38 commented on May 31, 2024

How are you calling PMC in you launcher?

from portablemc.

GoodDay360 avatar GoodDay360 commented on May 31, 2024

@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.

mindstorm38 avatar mindstorm38 commented on May 31, 2024

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).

image

from portablemc.

mindstorm38 avatar mindstorm38 commented on May 31, 2024

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.

GoodDay360 avatar GoodDay360 commented on May 31, 2024

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.

mindstorm38 avatar mindstorm38 commented on May 31, 2024

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.

mindstorm38 avatar mindstorm38 commented on May 31, 2024

I close the issue for now, if you are stuck again comment here!

from portablemc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.