Skip to content

Instantly share code, notes, and snippets.

@cr1901
Created November 16, 2017 15:05
Show Gist options
  • Save cr1901/5f6e378cdf06dea387cfd2eec9db5172 to your computer and use it in GitHub Desktop.
Save cr1901/5f6e378cdf06dea387cfd2eec9db5172 to your computer and use it in GitHub Desktop.
Get Unique ARM Constants
import itertools
valid = itertools.product(range(0,256), [4**i for i in range(0,16)])
const = []
for k, j in valid:
const.append(k*j)
a = list(set(const))
print(len(a))
b = []
for i in a:
if i < 2**32:
b.append(i)
print(sort(b))
print(len(b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment