Skip to content

Instantly share code, notes, and snippets.

View xIvan0ff's full-sized avatar
😘

Hristiyan Ivanov xIvan0ff

😘
View GitHub Profile
---------------------------------------------
--[[
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.
-- 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 = {}
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)