Hacking [Question] Converting Payload Bin into .js

MostlyUnharmful

Well-Known Member
Member
Joined
Feb 8, 2018
Messages
410
Trophies
0
Age
41
XP
1,433
Country
Italy
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
D

Deleted User

Guest
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

Ronhero

Too Weird to Live, Too Rare to Die
OP
Member
Joined
Jun 28, 2014
Messages
3,470
Trophies
0
Location
Arizona Bay
Website
127.0.0.1
XP
2,031
Country
United States
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
General chit-chat
Help Users
    DEMONGreninjaPG @ DEMONGreninjaPG: i see it that scared my grandma earlier