김성주

fixed some comments

......@@ -40,7 +40,6 @@ def detect_vars(line): # detect variables and return range tuples. except for ke
def obfuscate(lines, vars, dictionary, mapper): # obfuscate the code
ret = list()
### write_file('D:/Develop/ori.py', lines)
for line in lines:
var_ranges = detect_vars(line)
......@@ -64,7 +63,6 @@ def obfuscate(lines, vars, dictionary, mapper): # obfuscate the code
ret.append(new_line)
### write_file('D:/Develop/obf.py', ret)
return ret
def create_var_histogram(input, outPath):
......@@ -122,8 +120,6 @@ def obfuscate_files(input, output, var=None, threshold=4000): # obfuscate variab
dictionary = create_dictionary(var)
mapper = create_mapper(len(var))
### obfuscate(codes[0][1], var, dictionary, mapper)
for path, code in codes:
obfuscated = obfuscate(code, var, dictionary, mapper)
......
......@@ -2,7 +2,7 @@ from utils import *
import file_parser
import re
# obfuscator v2 generate random name for methods
# obfuscator v2 generates random name for methods
def random_character(start=False):
if start:
......@@ -75,7 +75,6 @@ def detect_vars(line): # detect variables and return range tuples. except for ke
def obfuscate(lines, vars, dictionary, mapper): # obfuscate the code
ret = list()
### write_file('D:/Develop/ori.py', lines)
for line in lines:
var_ranges = detect_vars(line)
......@@ -99,7 +98,6 @@ def obfuscate(lines, vars, dictionary, mapper): # obfuscate the code
ret.append(new_line)
### write_file('D:/Develop/obf.py', ret)
return ret
def create_var_histogram(input, outPath):
......@@ -157,8 +155,6 @@ def obfuscate_files(input, output, var=None, threshold=4000): # obfuscate variab
dictionary = create_dictionary(var)
mapper = create_mapper_v2(len(var))
### obfuscate(codes[0][1], var, dictionary, mapper)
for path, code in codes:
obfuscated = obfuscate(code, var, dictionary, mapper)
......
......@@ -2,10 +2,6 @@ from utils import *
import re
import keyword
'''
Test multi-line comments
'''
LIBRARYS = list()
def parse_keywords(line, out): # out : output dictionary to sum up frequencies
......@@ -26,7 +22,7 @@ def parse_keywords(line, out): # out : output dictionary to sum up frequencies
if not key or is_number(key) or key[0] in "0123456789":
continue
## Exception code here
## Exception code here if you want
if key in ['from', 'import']:
import_line = True
......@@ -56,6 +52,8 @@ def parse_block(lines): # parse to import / def / class / normal (if, for, etc)
block_stack = [root]
i = 0
L = len(lines)
### commented because of some exceptions
# par_stack = list()
# multi_string_stack = list()
......