Skip to content

Commit

Permalink
add and update argument commands
Browse files Browse the repository at this point in the history
  • Loading branch information
savjaylade84 committed Oct 3, 2022
2 parents 376336f + 242e8bf commit 7207ce1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
22 changes: 11 additions & 11 deletions HexToTxtFile.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@


def extractFileToHexFormat(file,text):
with open(f'{file}','rb') as file:
with open(f'{text}','w') as text:
text.write(str(file.read()))

file = input('[executable filename]:')
text = input('[text filename]: ')
extractFileToHexFormat(file,text)



def extractFileToHexFormat(file,text):
with open(f'{file}','rb') as file:
with open(f'{text}','w') as text:
text.write(str(file.read()))

file = input('[executable filename]:')
text = input('[text filename]: ')
extractFileToHexFormat(file,text)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Hidden Code Image Injector <br>
<<<<<<< HEAD
## tools that help inject,extract,and remove executable code <br>
## in a image using python <br>

=======
## tools that help inject,extract,and remove executable code <br>in a image using python <br>
>>>>>>> 242e8bf1542116297586f9a576a77613b3495bda
## How to use it <br>
```python3 img-injector [option] <image-name> <executable code>```
Expand Down
5 changes: 1 addition & 4 deletions img-inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import argparse
import time


parser = argparse.ArgumentParser(
description='''python tools for injecting,extracting,and removing executable code in the image.''',
formatter_class=argparse.RawDescriptionHelpFormatter,epilog='''
Expand Down Expand Up @@ -49,7 +48,7 @@
,help='give more update in the process (default is in silent)'
,action='store_true'
,default=False)

parser.add_argument('-t','--transferFile',
help='transfer hex from executable file to text file'
,action='store_true'
Expand All @@ -58,7 +57,6 @@
args = parser.parse_args()



'''
this will only prompt if verbose argument is on
Expand Down Expand Up @@ -193,7 +191,6 @@ def remove(image):
prompt('removing is complete.','progress-check',True)
prompt('process is done','progress-check',True)
prompt('program exiting','process',True)

except FileNotFoundError:
prompt('Error: failed to extract code in a image',True)
else:
Expand Down

0 comments on commit 7207ce1

Please sign in to comment.