Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: how to extract original string from binary files?

by haukex (Archbishop)
on May 19, 2016 at 18:00 UTC ( [id://1163507]=note: print w/replies, xml ) Need Help??


in reply to Re^2: how to extract original string from binary files?
in thread how to extract original string from binary files?

Hi Swapnil,

For various reasons I think it's best to just continue working via this site, that way everyone can learn from this thread. I already mentioned two ways you can convert your binary data to a format you can post here, to add more examples to that list there's A simple hex dump in pure Perl and various Windows tools available.

However, posting your binary data here won't help much if we don't know what format the file is in - the file format is actually much more important than the binary data. I see you've tried to describe it in the root node, but it's difficult to read, try using <code> tags.

Regards,
-- Hauke D

Replies are listed 'Best First'.
Re^4: how to extract original string from binary files?
by swapy345 (Initiate) on May 20, 2016 at 09:55 UTC

    Hi Haukex,

    Please check the hex dump of binary. 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 ) 00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 012345678 +9ABCDEF 00000000 41 52 52 41 59 28 30 78 - 31 65 62 64 63 66 30 30 ARRAY(0x1 +ebdcf00 00000010 29 sharing code as well. #!/usr/bin/perl #use Data::Hexdumper; open(FH, '<:raw', "binary1.txt") or die "help"; #open(FH1, "test1.txt"); binmode FH; #binmode FH1; use Encode qw/encode decode/; use Data::Dumper; use Data::HexDump; while ( (read (FH, $buffer, 256)) != 0 ) { $hex = unpack("H*", $buffer); $hex .= ' ' x ( length($hex) < 48 ? 48 - length($hex) : 0 ); push @rec, "$hex $_"; print "\n"; print HexDump \@rec; } close (FH); If site provide browse option it would be great help! :) Regards, Swapnil

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1163507]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found