I have some picture files in NaN.jpg, but now it is not showing picture.
So how to retrive image of NaN.jpg files....

Dani AI

Generated

Two separate problems are being discussed here: a JPG file named "NaN.jpg" that will not display, and a confusion about the hosts file when trying to block websites. The advice below gives focused, verifiable checks and concrete steps for each case that go beyond the earlier replies.

For NaN.jpg

  • "NaN" often means "Not a Number" and can be a filename produced by a buggy script; the file might not actually be a valid JPEG. Make a copy first.
  • Check the file size. If it is 0 bytes the file is gone unless you have a backup or can recover it from disk.
  • Inspect the first few bytes with a hex viewer or a text editor. A valid JPEG starts with the bytes FF D8 and usually contains "JFIF" or "Exif" in the header. If the file begins with "<" it is likely HTML (an error page), not an image.
  • Use inspection tools (ExifTool, JPEGsnoop) or a file-recovery tool (PhotoRec/TestDisk) to identify or recover image data. If headers are missing but image blocks exist, dedicated JPEG-repair utilities can sometimes reconstruct a usable file.
  • If the image came from a website, re-download it and compare sizes and headers. If the filename is literally NaN.jpg but the content is different, the server or downloader produced a bad filename.

For blocking sites with the hosts file (to )

  • The system hosts file is %SystemRoot%\system32\drivers\etc\hosts (on older installs this may be under C:\WINNT). A file named "iamhost" will be ignored; the file must be named exactly "hosts" with no extension.

  • Edit with an elevated editor (or as Administrator). Add lines like:

    127.0.0.1 example.com
    127.0.0.1 www.example.com

    Save the file as plain text and then run ipconfig /flushdns and restart the browser.

  • If changes are not taking effect, check for browser DNS caching, DNS-over-HTTPS/DoT or third-party security software that protects or overrides the hosts file. For stronger blocking use router-level filters or parental-control/URL-filtering software.

Notes: backup any file before editing. As observed, corruption or non-image data is a real possibility; the steps above show how to confirm which and how to recover or block accordingly.

Recommended Answers

All 3 Replies

What exactly do you mean by "NaN.jpg"? I am unsure what you are asking.

i would imagine it is probubly a pic they downloaded or found on a computer, if it is one you yourself put on it, that you know is really a picture, try opening it with every image sofware you can lay your hands on, if you just downloaded it, it may be corrupt, try downloading it again, if you found it on your computer it could be

a.) a blank image
or
b.) not an image at all, there may have been a program that saves something, like config files, in that format

i want to block some website for my pc.
in my pc drivers/etc/host file is not there
but
divers/etc/iamhost file is available. i tried to
block some sites but it doesnot work.
so iamhost file how to use code to block
some sites.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.