aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rwxr-xr-xdelf.py3
-rwxr-xr-xload.py14
3 files changed, 8 insertions, 12 deletions
diff --git a/README.md b/README.md
index 5c3289d..c68185a 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
+
+[![Total alerts](https://img.shields.io/lgtm/alerts/g/bloodstalker/delf.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/bloodstalker/delf/alerts/)
+
# delf
delf is an ELF dump tool.<br/>
diff --git a/delf.py b/delf.py
index 60b2697..b152bd0 100755
--- a/delf.py
+++ b/delf.py
@@ -1,10 +1,7 @@
#!/usr/bin/python3
-import argparse
import code
-import readline
import signal
-import sys
from load import premain, CLIArgParser, SigHandler_SIGINT
def main():
diff --git a/load.py b/load.py
index da361d6..7ce1f4a 100755
--- a/load.py
+++ b/load.py
@@ -19,12 +19,9 @@
#**********************************************************************************************************************/
import argparse
import sys
-import readline
import code
import signal
-import os
import sys
-import shutil
from capstone import *
from capstone.x86 import *
@@ -1020,7 +1017,6 @@ class ELF(object):
strrep.append(str(chr(byte)))
print(format(byte, '02x') + ' ', end='')
else:
- pass
strrep += str(chr(byte))
print(format(byte, '02x') + ' ', end='')
count += 1
@@ -1084,7 +1080,7 @@ class ELF(object):
pad_list = [byte2int(self.elfhdr.ei_pad)]
type_list = [byte2int(self.elfhdr.e_type)]
machine_list = [byte2int(self.elfhdr.e_machine)]
- version_list = [byte2int(self.elfhdr.e_version)]
+ e_version_list = [byte2int(self.elfhdr.e_version)]
entry_list = [byte2int(self.elfhdr.e_entry)]
phoff_list = [byte2int(self.elfhdr.e_phoff)]
shoff_list = [byte2int(self.elfhdr.e_shoff)]
@@ -1254,11 +1250,11 @@ class ELF(object):
self.so.seek(byte2int(section.sh_offset))
self.dyn_section = self.so.read(byte2int(section.sh_size))
length = int(len(self.dyn_section))
- tag_type = int()
- type_string = str()
- value = int()
+ #tag_type = int()
+ #type_string = str()
+ #value = int()
dummy = {}
- jmp_val = int()
+ #jmp_val = int()
if self.size == 64: jmp_val = 8
elif self.size == 32: jmp_val = 4
else: jmp_val = 8; print("self.size is not set for class elf.going with 8 as a default.")