This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NGram: | |
def __init__(self, order): | |
self.order = order | |
self.buffer = [] | |
def add(self, element): | |
tmp = None | |
if not element: | |
return tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call_001() | |
for i in range(0 to 4): | |
call_002() | |
call_003() | |
if i is even: | |
call_004() | |
call_005() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(line1, c_001) | |
(line3, c_002) x5 | |
(line4, c_003) x5 | |
(line6, c_004) x3 | |
(line7, c_005) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = [] | |
for entry in log_entries: | |
c = checksum(entry) | |
data.append(c) | |
map = {} | |
lrs = True | |
while lrs: | |
lrs = calculate_lrs(data) | |
while lrs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = [0, 1, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2] | |
lrs = calculate_lrs(data) # [0, 1, 2, 2, 2, 2] <= First While | |
while lst: | |
lrs = calculate_lrs() | |
# [2, 2] <= Second while |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import logging | |
import hashlib | |
import numpy | |
from random import randint | |
from itertools import groupby, chain | |
logger = logging.getLogger(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['call_0', 'call_1', 'call_2', 'call_2', 'call_2', 'call_2', 'call_0', 'call_1', 'call_2', 'call_2', 'call_2', 'call_2'] | |
[{'label': 'call_0', 'repeated': 2}, {'label': 'call_1', 'repeated': 2}, {'label': 'call_2', 'repeated': 8}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compressors = [] | |
for i in range(1,level): | |
compressors.append(Compressor(i)) | |
for e in data: | |
e1 = checksum(e) | |
c = compressors[0] | |
out = c.add(e1) | |
for c in compressor[1:]: | |
out = c.add(out) |
OlderNewer