Skip to content

Commit 93363f6

Browse files
authored
Merge pull request #32 from knownsec/dev
Dev
2 parents 06e957b + f440622 commit 93363f6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

zoomeye/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111

1212
__name__ = 'zoomeye'
1313
__package__ = 'zoomeye'
14-
__version__ = ' 2.0.4.3'
14+
__version__ = ' 2.0.4.4'
1515
__site__ = "https://www.zoomeye.org/doc"

zoomeye/show.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ def convert_str(s):
3434
d = {
3535
'\n': '\\n',
3636
'\r': '\\r',
37-
'\t': '\\t'
37+
'\t': '\\t',
38+
'\b': '\\b',
39+
'\a': '\\a',
3840
}
3941
for c in s:
40-
if ord(c) in range(32, 127):
41-
res.append(c)
42-
elif c in d.keys():
42+
if c in d.keys():
4343
res.append(d[c])
4444
else:
45-
res.append('\\x%.2x' % ord(c))
45+
res.append(c)
4646
return ''.join(res)
4747

4848

@@ -320,9 +320,9 @@ def print_filter_history(fileds, hist_data, condition=None):
320320
for condition_item in condition:
321321
k, v = condition_item.split('=')
322322
re_result = re.search(str(v), str(item_item), re.I | re.M)
323-
content = "\033[31m{}\033[0m".format(re_result.group())
324323
# replace to highlight
325324
if re_result:
326-
item_item = item_item.replace(re_result.group(), content)
325+
content_item = "\033[31m{}\033[0m".format(re_result.group())
326+
item_item = str(item_item).replace(re_result.group(), content_item)
327327
content += "{:<27}".format(item_item)
328328
printf(content)

0 commit comments

Comments
 (0)