2

i have implemented a c program where raw packets are received from the network and saved in a binary file. Thing is i cant open that binary file. i tried opening it using terminal,but i am getting permission denied.

I used

sudo ./sniff_data.bin 

and its displaying

sudo: ./sniff_data.bin: command not found
Rinzwind
  • 299,756
  • If you're getting packets from some sort of sniffer it is probably running as root, and the data probably needs appropriate permissions set before you can read it. – chronitis Nov 06 '13 at 09:17
  • @Rinzwind, i have added the commands which was used – shishira Nov 06 '13 at 09:22

1 Answers1

4

Regarding

sudo ./sniff_data.bin 

A bin file is NOT an executable. You need software that can open a BIN file to view the BIN file.

What you want is probably

sudo hexdump sniff_data.bin 

Another method:

sudo strings sniff_data.bin 

This will show all the text strings inside the file.


For graphical methods viewing binaries see: What are some good GUI binary viewers/editors?

Rinzwind
  • 299,756
  • oh alright thanks a lot :) . but cant i view the file without using the terminal? – shishira Nov 06 '13 at 09:31
  • if you want a graphical method see this: http://askubuntu.com/questions/19479/what-are-some-good-gui-binary-viewers-editors ;) – Rinzwind Nov 06 '13 at 11:17