ammaraskar / pyCraft

Minecraft-client networking library in Python
Other
814 stars 184 forks source link

Batch File #100

Open ghost opened 6 years ago

ghost commented 6 years ago

Is there a way to run a batch file command to run the program and in the batch file enter the account information from the batch file. To allow running it completely from a batch file.

TheSnoozer commented 6 years ago

The start.py (that starts the minecraft client) accepts the following parameters:

--username USERNAME --password PASSWORD --server SERVER

the purpose of each parameter should be self explanatory.

ghost commented 6 years ago

okay thank you

ghost commented 6 years ago

I am trying to make it work with cracked servers. How do I make it not require a password automatically

zacholade commented 6 years ago
--username USERNAME --password PASSWORD --server SERVER --offline OFFLINE
joodicator commented 6 years ago

Note that running a process with a password in its command line can cause security problems, because, in some cases, this information is accessible to other users on the same system, which could result in the password being revealed. For this reason, I do not recommend using start.py to automatically log in to a Mojang account whose security is important.

Instead, read the password from a file that is not readable by any unauthorised person, as I do in mcchat2: https://github.com/joodicator/mcchat2/blob/124c27d8a1f94359202e9c581ec04db79f7d47e3/mcchat2.py#L70-L72 https://github.com/joodicator/mcchat2/blob/124c27d8a1f94359202e9c581ec04db79f7d47e3/mcchat2.py#L134-L144