-
-
Save klemmchr/53053b6d6438df9a9718c23c0d6bbd69 to your computer and use it in GitHub Desktop.
Revisions
-
Christian revised this gist
Oct 17, 2016 . 1 changed file with 19 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ -- http://sqlfiddle.com/#!9/6cc709/1 CREATE FUNCTION `generateGUID`(`playerid` BIGINT UNSIGNED) RETURNS varchar(32) CHARSET latin1 DETERMINISTIC BEGIN DECLARE temp text CHARSET ascii; DECLARE i int; SET i = 0; SET temp = ""; WHILE i < 8 DO SET temp = CONCAT(temp, CHAR(playerid & 0xFF)); SET playerid = playerid >> 8; SET i = i + 1; END WHILE; RETURN MD5(CONCAT("BE", temp)); END -
fank revised this gist
Mar 6, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ -- Microsoft SQL Server -- https://github.com/Fankserver/Microsoft-SQL-Server-Assemblies/tree/master/BattlEye SELECT SteamIdToBattlEyeGUID(76561197996545192); -
fank revised this gist
Oct 29, 2014 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,15 @@ <?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); -
fank revised this gist
Oct 21, 2014 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ <?php //Cheers Rommel $steamID = '76561197996545192'; $temp = ''; for ($i = 0; $i < 8; $i++) { $temp .= chr($steamID & 0xFF); $steamID = $steamID >> 8; } $return = md5('BE' . $temp); echo $return; ?> -
fank revised this gist
Sep 9, 2014 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ 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')); -
fank revised this gist
Aug 13, 2014 . 4 changed files with 15 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,5 @@ 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 hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ 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; This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ // Thanks to nano2k package main import ( "crypto/md5" "fmt" This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # 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() -
fank revised this gist
Jun 29, 2014 . 1 changed file with 23 additions and 29 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,35 +7,29 @@ namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Int64 SteamId = 76561197961199490; 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(); } } } -
fank revised this gist
Jun 29, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,12 +12,12 @@ class Program static void Main(string[] args) { Int64 SteamId = 76561198040949860; sbyte[] parts = { 0, 0, 0, 0, 0, 0, 0, 0 }; byte counter = 0; do { parts[counter++] = (sbyte)(SteamId & 0xFF); } while ((SteamId >>= 8) > 0); String bestring = "BE"; -
fank revised this gist
Jun 28, 2014 . 1 changed file with 41 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ 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 = 76561198040949860; Int64[] parts = { 0, 0, 0, 0, 0, 0, 0, 0 }; byte counter = 0; do { parts[counter++] = SteamId & 0xFF; } while ((SteamId >>= 8) > 0); String bestring = "BE"; for (int i = 0; i < parts.Length; i++) { bestring = bestring + (char)parts[i]; } MD5 md5 = new MD5CryptoServiceProvider(); byte[] textToHash = Encoding.Default.GetBytes(bestring); byte[] result = md5.ComputeHash(textToHash); StringBuilder sb = new StringBuilder(); for (int i = 0; i < result.Length; i++) { sb.Append(result[i].ToString("x2")); } Console.Out.WriteLine(sb.ToString()); } } } -
fank revised this gist
Apr 20, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ ## md5("BE" (2 bytes) + 64-bit SteamID (8 bytes)) -
fank created this gist
Apr 20, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ # md5("BE" (2 bytes) + 64-bit SteamID (8 bytes)) This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ 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]); } std::cout << md5(bestring.str()) << std::endl; This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ 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)) }