Skip to content

Instantly share code, notes, and snippets.

data = []
for entry in log_entries:
c = checksum(entry)
data.append(c)
map = {}
lrs = True
while lrs:
lrs = calculate_lrs(data)
while lrs:
(line1, c_001)
(line3, c_002) x5
(line4, c_003) x5
(line6, c_004) x3
(line7, c_005)
(line1, c_001)
(line3, c_002)
(line4, c_003)
(line6, c_004) # i = 0
(line3, c_002)
(line4, c_003) # i = 1
(line3, c_002)
(line4, c_003)
(line6, c_004) # i = 2
(line3, c_002)
call_001()
for i in range(0 to 4):
call_002()
call_003()
if i is even:
call_004()
call_005()
class NGram:
def __init__(self, order):
self.order = order
self.buffer = []
def add(self, element):
tmp = None
if not element:
return tmp
@mabj
mabj / fixing_calls.py
Last active October 29, 2019 12:09
IDA Script for fixing calls
import idc
import idautils
import idaapi
import ida_bytes
import ida_idaapi
import logging
logger = logging.getLogger(__name__)
def __create_load_data_segment(data, seg_addr, seg_name):