Bunch of miscellaneous updates
I've dropped the ball on making smaller commits so now here's a big one - Update sig for post-6.40 exes - Some packet handlers have switches for packet sizes. Added a heuristic to capture this information - Consolidated vtable alignment warnings - Added script to debug similarity matrix
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
import time
|
||||
import os
|
||||
import click
|
||||
|
||||
|
||||
def eprint(*args, **kwargs):
|
||||
@@ -38,3 +39,18 @@ def sync_r2_output(r2):
|
||||
output = r2.cmd(f"?vi 123").strip()
|
||||
if output != "123":
|
||||
raise Exception("R2 state never got synced")
|
||||
|
||||
|
||||
class HexIntParamType(click.ParamType):
|
||||
name = "integer"
|
||||
|
||||
def convert(self, value, param, ctx):
|
||||
if isinstance(value, int):
|
||||
return value
|
||||
|
||||
try:
|
||||
if value[:2].lower() == "0x":
|
||||
return int(value[2:], 16)
|
||||
return int(value, 16)
|
||||
except ValueError:
|
||||
self.fail(f"{value!r} is not a valid hex integer", param, ctx)
|
||||
|
||||
Reference in New Issue
Block a user