Hacking [Question] Converting Payload Bin into .js

  • Thread starter Thread starter Ronhero
  • Start date Start date
  • Views Views 2,488
  • Replies Replies 3
Sure, with a few lines of Python (excuse the crude example):

Code:
#!/usr/bin/python3

import sys
import binascii

filename = sys.argv[1]

print("var payload = [", end='')

with open(filename, 'rb') as input_file:
    word = input_file.read(4)
    while word:
        output = binascii.hexlify(word)
        print("0X%s, " % output.decode('utf-8'), end='')
        word = input_file.read(4)

print("]")
 
  • Like
Reactions: cearp and Ronhero
Sure, with a few lines of Python (excuse the crude example):

Code:
#!/usr/bin/python3

import sys
import binascii

filename = sys.argv[1]

print("var payload = [", end='')

with open(filename, 'rb') as input_file:
    word = input_file.read(4)
    while word:
        output = binascii.hexlify(word)
        print("0X%s, " % output.decode('utf-8'), end='')
        word = input_file.read(4)

print("]")

dang who the heck is this guy. A new strange pokemon has appeared. Howdy stranger.
 
  • Like
Reactions: Ronhero
Sure, with a few lines of Python (excuse the crude example):

Code:
#!/usr/bin/python3

import sys
import binascii

filename = sys.argv[1]

print("var payload = [", end='')

with open(filename, 'rb') as input_file:
    word = input_file.read(4)
    while word:
        output = binascii.hexlify(word)
        print("0X%s, " % output.decode('utf-8'), end='')
        word = input_file.read(4)

print("]")

Wow thanks i didn't expect to see an answer to this question
 
  • Like
Reactions: cearp

Site & Scene News

Popular threads in this forum