1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[QUESTION] Save a Webpage as 1 html file

Discussion in 'BlackHat Lounge' started by bashhunter, Apr 25, 2012.

  1. bashhunter

    bashhunter Regular Member

    Joined:
    Mar 15, 2012
    Messages:
    211
    Likes Received:
    356
    How do you save a webpage as 1 html files (without attachment)?

    I got this html file a while ago that has all images, script in it and load normally with firefox.

    I some how can't replicate the result however.

    Does anyone know how to do that?

    Please share if you do.
     
  2. OldSalt

    OldSalt Moderator Staff Member Moderator Jr. VIP Premium Member

    Joined:
    May 19, 2009
    Messages:
    1,279
    Likes Received:
    7,437
    Gender:
    Male
    Occupation:
    IT Sys Admin
    Location:
    US, East Coast
    You can't save an HTML doc as just one file if it references any graphics or any external pages like .css or javascripts... it's not like a Word document where you can embed the graphics, html is basically just a text file with instructions for the browser.

    *edit* - actually, the only way would be if you reference the graphics and external files at their original location - like somewhere on the net.
     
  3. paynumbers

    paynumbers BANNED BANNED

    Joined:
    Mar 17, 2012
    Messages:
    14
    Likes Received:
    0
    hi, try httrack
     
  4. bashhunter

    bashhunter Regular Member

    Joined:
    Mar 15, 2012
    Messages:
    211
    Likes Received:
    356
    How do I suppose to do that?
     
  5. bashhunter

    bashhunter Regular Member

    Joined:
    Mar 15, 2012
    Messages:
    211
    Likes Received:
    356
    I owned one actually, but at that time I don't know anything about html and stuff like that.

    Then I accidentally deleted it.
     
  6. OldSalt

    OldSalt Moderator Staff Member Moderator Jr. VIP Premium Member

    Joined:
    May 19, 2009
    Messages:
    1,279
    Likes Received:
    7,437
    Gender:
    Male
    Occupation:
    IT Sys Admin
    Location:
    US, East Coast
    As I said, HTML cannot, repeat - cannot embed graphics files. If it uses an external .css or javascript file, I know of no program that will snatch and embed them into the HTML file (they are text too, but they'd have to be downloaded and embeded into the HTML file in the right way, in the right location).

    The only way this would be possible, would be to modify the page to translate the external links from the format they are most likely in:
    Code:
    <img src=/images/graphic1.jpg">
    
    to an explicit call to the file via the domain name:
    Code:
    <img src="[URL]http://www.mygreatdomain.com/images/graphic1.jpg[/URL]">
    
    Now... I'm sure this is possible, but I don't know of any tools that would do it automagically for you. Of course, I haven't looked either. Paynumbers suggested httrack - you might want to google that and check it out.