From 69d7eea18bc78f976ac615e6da8f11ac56213a5a Mon Sep 17 00:00:00 2001 From: merrychap Date: Thu, 25 Jan 2018 16:33:49 +0500 Subject: [PATCH] changed setup.py; little fixies --- MANIFEST.in | 1 + setup.py | 6 ++++-- shellen/asms/baseexc.py | 4 ++-- shellen/asms/disasm.py | 3 ++- shellen/fetcher.py | 4 ++-- shellen/shell.py | 2 +- shellen/syscalls/base_handler.py | 4 ++-- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index e69de29..9235230 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -0,0 +1 @@ +recursive-include shellen/syscalls * diff --git a/setup.py b/setup.py index 14f7226..6ecd829 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='shellen', - version='0.1.1', + version='0.1.6', description='Interactive environment for crafting shellcodes. Also, it just can be used as a simple assembler/disassembler', long_description=long_description, url='https://github.com/merrychap/shellen', @@ -33,8 +33,10 @@ 'License :: OSI Approved :: MIT License', 'Intended Audience :: Information Technology' ], - keywords=['shellcode', 'pwn', 'assembler', 'disassembler'], + keywords=['shellcode', 'pwn', 'assembler', 'disassembler', 'syscalls'], packages=['shellen', 'shellen/opt', 'shellen/asms', 'shellen/syscalls'], + include_package_data=True, + packge_data={'shellen/syscalls':['linux_tables/*.json']}, install_requires=['keystone-engine', 'capstone', 'colorama', 'termcolor', 'terminaltables'], python_requires='>=3', entry_points={ diff --git a/shellen/asms/baseexc.py b/shellen/asms/baseexc.py index babc317..c5d214d 100644 --- a/shellen/asms/baseexc.py +++ b/shellen/asms/baseexc.py @@ -3,7 +3,7 @@ from archsconf import * from opt.appearance import cprint, make_colors -from terminaltables import SingleTable +from terminaltables import SingleTable, AsciiTable, DoubleTable from abc import ABC, abstractmethod @@ -107,7 +107,7 @@ def archs(self): for j in range(len(filtered)): cur_row.append('' if i >= len(filtered[j]) else make_colors(filtered[j][i])) table.append(cur_row) - rtable = SingleTable(table) + rtable = DoubleTable(table) rtable.inner_heading_row_border = False return rtable.table diff --git a/shellen/asms/disasm.py b/shellen/asms/disasm.py index 17e4ab6..d4f81d0 100644 --- a/shellen/asms/disasm.py +++ b/shellen/asms/disasm.py @@ -50,4 +50,5 @@ def __init__(self, arch): def print_res(self, res): for line in res: - cprint("\t0x{:08X}:\t{:<8}{}".format(line.address, line.mnemonic, line.op_str)) \ No newline at end of file + cprint("\t0x{:08X}:\t{:<8}{}".format(line.address, line.mnemonic, line.op_str)) + cprint('\n') \ No newline at end of file diff --git a/shellen/fetcher.py b/shellen/fetcher.py index b57710f..ba4f029 100644 --- a/shellen/fetcher.py +++ b/shellen/fetcher.py @@ -5,7 +5,7 @@ from opt.appearance import cprint, make_colors -from terminaltables import SingleTable +from terminaltables import SingleTable, DoubleTable SHELL_URL = 'http://shell-storm.org/api/?s={}' @@ -73,7 +73,7 @@ def __get_colored_row(self, row): def fetch_table(self, pattern, os='linux', arch=X86_32, count=0): cprint('\n[*] Connecting to shell-storm.org...') rowtable = self.fetch(pattern, os, arch, count, True) - return SingleTable(rowtable) + return DoubleTable(rowtable) def sort_rows(self, table, count): def bytes_len(row): diff --git a/shellen/shell.py b/shellen/shell.py index 7d07c0b..00c752c 100644 --- a/shellen/shell.py +++ b/shellen/shell.py @@ -181,7 +181,7 @@ def dsm(self): cprint('\n[+] Changed to dsm (disassembly) mode\n') def archs(self): - cprint(self.pexec.archs()) + cprint('\n' + self.pexec.archs() + '\n') def clear(self): os.system('cls' if os.name == 'nt' else 'clear') diff --git a/shellen/syscalls/base_handler.py b/shellen/syscalls/base_handler.py index 7ae1d35..48c7cfb 100644 --- a/shellen/syscalls/base_handler.py +++ b/shellen/syscalls/base_handler.py @@ -7,7 +7,7 @@ from difflib import SequenceMatcher -from terminaltables import SingleTable +from terminaltables import SingleTable, DoubleTable EMPTY_VALUE = '-' @@ -53,7 +53,7 @@ def get_table(self, arch, pattern, colored=False, verbose=False): value = command[hd] cur_tb_field.append(self.__make_colored_field(value, hd, verbose=verbose)) table.append(cur_tb_field) - return SingleTable(table) + return DoubleTable(table) def __make_colored_field(self, field, hd, verbose=False): if hd == NAME_FIELD: