Learn how to a build a cloud-first strategyRegister Now


find length of file depend on end marker

Posted on 2011-10-31
Medium Priority
Last Modified: 2012-05-12

after i run this command to search about end marker of jpeg file:

xxd image.raw | grep -i "ffd9" | head -n 7 ===>

0082560 2903 9068 ffd9 4bb1 f6d2 c69c 1a4c 7195      (..h[.K......nq

how i can calculate length of jpeg file include footer depend on output ?

Question by:ang3lus
  • 2
  • 2

Expert Comment

ID: 37055316
Search for FFD8 which is the start of image and FFD9 which is the end of image, you'll then get the image size. Refer to detail JPG format here http://en.wikipedia.org/wiki/JPEG for more information.

Author Comment

ID: 37055458

there is no possible to find length of file depend only on output.

cause the
the solution of above question is from output :

ffd9 end at 0082565 and the length of file is 0082566.

I am not understand how 0082565 has been calculated and how length become 0082566( 0082565 +1)


Accepted Solution

raysonlee earned 1000 total points
ID: 37055494
As the dump starts from byte 0 of the file, as shown in the output 29 is the 82560'th byte, d9 is the 82565'th byte, adding byte 0 will get the total file length of 82566.

Author Closing Comment

ID: 37055563
many Thanks

you are helping me alot

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The foremost challenge encountered by an investigator at the very beginning of a forensics investigation is, accessing a file/data to read/view its contents. Owing to the fact, a platform is necessary for both; opening as well as examining any file.…
In this era, as you know, cybercrime and other sorts of frauds using the internet has increased day by day. We should protect our information assets and confidential information from getting exploiting by the attacker or intruders. Most of the fraud…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question