diff --git a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/LogOnDetails.java b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/LogOnDetails.java index 0640f0c3..b027887d 100644 --- a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/LogOnDetails.java +++ b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/LogOnDetails.java @@ -45,12 +45,20 @@ public class LogOnDetails { private String clientLanguage; + private String machineName; + public LogOnDetails() { accountInstance = SteamID.DESKTOP_INSTANCE; accountID = 0L; clientOSType = Utils.getOSType(); clientLanguage = "english"; + + String envName = System.getenv("COMPUTERNAME"); + if (envName == null) { + envName = System.getenv("HOSTNAME"); + } + machineName = envName + " (JavaSteam)"; } /** @@ -344,4 +352,22 @@ public String getClientLanguage() { public void setClientLanguage(String clientLanguage) { this.clientLanguage = clientLanguage; } + + /** + * Gets the machine name + * + * @return the machine name + */ + public String getMachineName() { + return machineName; + } + + /** + * Sets the machine name + * + * @param machineName the machine name + */ + public void setMachineName(String machineName) { + this.machineName = machineName; + } } diff --git a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/SteamUser.java b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/SteamUser.java index 5d4b4693..6784226d 100644 --- a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/SteamUser.java +++ b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/SteamUser.java @@ -136,6 +136,7 @@ public void logOn(LogOnDetails details) { // we're now using the latest steamclient package version, this is required to get a proper sentry file for steam guard logon.getBody().setClientPackageVersion(1771); // todo: determine if this is still required logon.getBody().setSupportsRateLimitResponse(true); + logon.getBody().setMachineName(details.getMachineName()); logon.getBody().setMachineId(ByteString.copyFrom(HardwareUtils.getMachineID())); // steam guard