Last active
August 29, 2024 17:52
-
-
Save Fank/11127158 to your computer and use it in GitHub Desktop.
ArmA 3 / DayZ-Standalone - BattlEye GUID calculation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::stringstream bestring; | |
__int64 steamID = 76561197996545192; | |
__int8 i = 0, parts[8] = { 0 }; | |
do parts[i++] = steamID & 0xFF; | |
while (steamID >>= 8); | |
bestring << "BE"; | |
for (int i = 0; i < sizeof(parts); i++) { | |
bestring << char(parts[i]); | |
} | |
// I used this md5 library http://www.zedwood.com/article/cpp-md5-function | |
std::cout << md5(bestring.str()) << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Int64 SteamId = 76561197996545192; | |
byte[] parts = { 0x42, 0x45, 0, 0, 0, 0, 0, 0, 0, 0 }; | |
byte counter = 2; | |
do | |
{ | |
parts[counter++] = (byte)(SteamId & 0xFF); | |
} while ((SteamId >>= 8) > 0); | |
MD5 md5 = new MD5CryptoServiceProvider(); | |
byte[] beHash = md5.ComputeHash(parts); | |
StringBuilder sb = new StringBuilder(); | |
for (int i = 0; i < beHash.Length; i++) | |
{ | |
sb.Append(beHash[i].ToString("x2")); | |
} | |
Console.Out.WriteLine(sb.ToString()); | |
Console.In.Read(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Thanks to nano2k | |
package main | |
import ( | |
"crypto/md5" | |
"fmt" | |
) | |
func main() { | |
steamid := 76561197996545192 | |
h := md5.New() | |
h.Write([]byte("BE")) | |
for i := 0; i < 8; i++ { | |
h.Write([]byte{byte(steamid & 0xFF)}) | |
steamid >>= 8 | |
} | |
fmt.Printf("Battleye GUID: %x", h.Sum(nil)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var crypto = require('crypto'); | |
var int64 = require('int64-native'); | |
var md5Hash = crypto.createHash('md5'); | |
var steamId = new int64('76561197996545192'); // The steamid must be a STRING! not a number! | |
md5Hash.update('BE'); | |
for (var i = 0; i < 8; i++) { | |
md5Hash.update(String.fromCharCode(steamId.and(0xFF).toNumber())); | |
steamId = steamId.shiftRight(8); | |
} | |
console.log(md5Hash.digest('hex')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Cheers Rommel | |
/* Verify that following value is higher than 2147483647(32bit): | |
echo PHP_INT_MAX; | |
*/ | |
$steamID = '76561197996545192'; | |
$temp = ''; | |
for ($i = 0; $i < 8; $i++) { | |
$temp .= chr($steamID & 0xFF); | |
$steamID >>= 8; | |
} | |
$return = md5('BE' . $temp); | |
echo $return; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks to gunlinux | |
import md5 | |
steamid=76561197996545192 | |
temp = "" | |
for i in range(8): | |
temp += chr((steamid & 0xFF)) | |
steamid >>= 8 | |
m = md5.new("BE"+temp) | |
print m.hexdigest() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Microsoft SQL Server | |
-- https://github.com/Fankserver/Microsoft-SQL-Server-Assemblies/tree/master/BattlEye | |
SELECT SteamIdToBattlEyeGUID(76561197996545192); |
There is also the AllianceApps API: https://allianceapps.io/beguid
Or if you would like to host it yourself: https://github.com/Multivit4min/beguid-converter
Edit: Just realized I shared this link already :D
But no, you cannot convert it directly (without a rainbow table).
Guid and UID Calculator Discord Bot
https://github.com/siegmund0/SteamID64ToGUID-Discord-Bot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes you can.
Use the free reverse-lookup / converter: https://devt0ols.net/converter
Available on each browser and any mobile device.
Valid lookup values: Steam (Vanity) URL, Steam ID, Steam ID 3, Steam ID 64, BattlEye ID, Bohemia ID
REST API
https://devt0ols.net/converter/?inc=help/api
Example response:
Discord BOT
https://devt0ols.net/converter/?inc=main/bot
Invitation link: ID Bot
The BOT is able to lookup and convert each of the mentioned values above.