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
--------------------------------------------- | |
--[[ | |
Utility method to get the position in front of a creature. | |
orientation: WoW's orientation is a radian, because WoW's circle starts at | |
the top we need the radian_start to make sure we're counting from the top. | |
This is typically the orientation of the calling unit. | |
yards: The distance in front of the unit to target. |
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
-- Utility | |
string.startswith = function(self, str) | |
return self:find('^' .. str) ~= nil | |
end | |
function split(inputstr, sep) | |
if sep == nil then | |
sep = "%s" | |
end | |
local t = {} |
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
import hashlib, secrets | |
def CalculateSRP6Verifier(username, password, salt): | |
g = int(7) | |
N = int("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7", 16) | |
userpassupper = f'{username}:{password}'.upper() | |
h1 = hashlib.sha1(userpassupper.encode('utf-8')).digest() | |
h2 = hashlib.sha1(salt + h1) | |
h2 = int.from_bytes(h2.digest(), 'little') | |
verifier = pow(g,h2,N) |