Skip to content

Instantly share code, notes, and snippets.

@chezsick
Last active August 18, 2018 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chezsick/8b2207ae9d3d1328d42c26b3d08e423a to your computer and use it in GitHub Desktop.
Save chezsick/8b2207ae9d3d1328d42c26b3d08e423a to your computer and use it in GitHub Desktop.
The Sick's Hash Of BLE TOU, args :::: prog number_byteshash ; UPDATE! ::::::::::: Custome The Position And The Modulo Instead byte
import sys
u = bytearray(sys.stdin.read())
p = 0
m = 0
c = 0
o = 0
for h in range(int(sys.argv[1]),int(sys.argv[2])):
s = 0
for i in range(len(u)):
p = (pow(i,2)*(h-2)-i*(h-4))/2
c = p*u[i]
s = s + c
o = s/(1+h)
n = o % 256
sys.stdout.write(bytearray([n]))
import sys
u = bytearray(sys.stdin.read())
p = 0
m = 0
c = 0
o = 0
for h in range(int(sys.argv[1]),int(sys.argv[2])):
s = 0
for i in range(len(u)):
p = (pow(i,2)*(h-2)-i*(h-4))/2
c = p*u[i]
s = s + c
o = s/(1+h)
n = o % int(sys.argv[3])
sys.stdout.write("%s " %(n))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment