Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: MS DOS goinng in a range (can't explain much here)  (Read 6668 times)

0 Members and 1 Guest are viewing this topic.

ehsan_08

    Topic Starter


    Rookie

    MS DOS goinng in a range (can't explain much here)
    « on: February 25, 2009, 09:52:58 PM »
    ok
    u guys prolly know about the files putted into image thing

    so i made a script:
    Code: [Select]
    @echo off
    title File2Image
    cls
    echo press enter, to chose from a set of options
    pause
    cls
    ECHO.
    ECHO 1. Archive into image
    ECHO 2. Other file types into image (must inlcude the extension)
    set choice=
    set /p choice=Pick your Choice
    if not '%choice%'=='' set choice=%choice:~0,1%
    if '%choice%'=='1' goto :rar
    if '%choice%'=='2' goto :other
    ECHO "%choice%" is not valid please try again

    :rar
    cls
    echo What is the name of the file/archive? (dont put rar at the end)
    set /p archive=
    copy /b image.jpg+%archive%.rar new_image.jpg
    echo done
    echo done
    echo done
    echo done
    pause

    :other
    cls
    echo What is the name of the file? (put extensions at the end)
    set /p otherfiles=
    copy /b image.jpg+%otherfiles%.rar new_image.jpg
    echo done
    echo done
    echo done
    echo done
    pause


    the code works prefect, but its hard on multiple files :(

    any ideas to improve it and make it easier?
    maybe drag and drop-able, im pretty sure u can't do that  on cmd

    what u guys think?
    ideas?

    just want a discussion, or improve it in anyway :)

    Dias de verano

    • Guest
    Re: MS DOS goinng in a range (can't explain much here)
    « Reply #1 on: February 26, 2009, 12:24:55 AM »
    1. What does it do?
    2. What does "prolly" mean?

    devcom



      Apprentice

      Thanked: 37
      Re: MS DOS goinng in a range (can't explain much here)
      « Reply #2 on: February 26, 2009, 06:53:40 AM »
      it looks like some kind of binder... are you trying to bind virus with jpg?
      Download: Choice.exe

      ehsan_08

        Topic Starter


        Rookie

        Re: MS DOS goinng in a range (can't explain much here)
        « Reply #3 on: February 27, 2009, 05:02:31 PM »
        nooo
        do u guys accuse everyone who ask for help here to be doing something wrong?


         
        first, it just copys a file inside a jpg file, thats it

        second, no virus! this is really good for hiding some important files, i think anti-viruses pick this up by now

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        Re: MS DOS goinng in a range (can't explain much here)
        « Reply #4 on: February 27, 2009, 05:29:11 PM »
        Why would you need to hide a file inside a .jpg ? ?
        " Anyone who goes to a psychiatrist should have his head examined. "

        macdad-



          Expert

          Thanked: 40
          Re: MS DOS goinng in a range (can't explain much here)
          « Reply #5 on: February 27, 2009, 05:41:42 PM »
          and a jpeg isnt an archive so you cant store files in there like you can with a ZIP...you could save a TXT file with the JPEG ext...
          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.

          ehsan_08

            Topic Starter


            Rookie

            Re: MS DOS goinng in a range (can't explain much here)
            « Reply #6 on: February 27, 2009, 06:04:29 PM »
            .RAR files!
            im hiding porn, if that stops the questioning.

            im just making this for a friend

            macdad-



              Expert

              Thanked: 40
              Re: MS DOS goinng in a range (can't explain much here)
              « Reply #7 on: February 27, 2009, 06:11:31 PM »
              dang(me and my big mouth).....reporting...
              If you dont know DOS, you dont know Windows...

              Thats why Bill Gates created the Windows NT Family.

              Carbon Dudeoxide

              • Global Moderator

              • Mastermind
              • Thanked: 169
                • Yes
                • Yes
                • Yes
              • Certifications: List
              • Experience: Guru
              • OS: Mac OS
              Re: MS DOS goinng in a range (can't explain much here)
              « Reply #8 on: February 27, 2009, 08:27:49 PM »
              Just create a RAR archive with a password. Done.

              BC_Programmer


                Mastermind
              • Typing is no substitute for thinking.
              • Thanked: 1140
                • Yes
                • Yes
                • BC-Programming.com
              • Certifications: List
              • Computer: Specs
              • Experience: Beginner
              • OS: Windows 11
              Re: MS DOS goinng in a range (can't explain much here)
              « Reply #9 on: February 27, 2009, 08:31:06 PM »
              the idea if hiding a file within a image only works for lossless formats and when you literally modify the bits of the image oh so subtlely and hide some information in them, which you can later retrieve.

              You can't do drag and drop with batch files, to answer that question.
              I was trying to dereference Null Pointers before it was cool.

              Dias de verano

              • Guest
              Re: MS DOS goinng in a range (can't explain much here)
              « Reply #10 on: February 28, 2009, 12:11:28 AM »
              What ehsan_08 proposes is, as devcom noted, called "binding".

              Using binary copy, (copy /b) you can append a rar file to a jpeg and create a composite file with a .jpg file extension. This file, if clicked by Mom, will open as a jpeg and show the image desired, e.g. a 1962 Chevy or whatever convincing decoy is appropriate.

              HOWEVER!

              Now open that composite .jpg file in WinRAR from the file menu (select "all files" in the file type dropdown) and lo and behold, WinRAR finds the RAR archive and shows its contents which you can then view and/or extract.

              Or command line RAR will see and process it quite happily.

              I just tried it. It works. Just one thing to watch... If the original disguising jpeg is above a certain size, WinRAR will fail to open the archive and give a message that the archive is in an unknown format or damaged. I tried a 1.1 MB jpeg which failed, and a 330 KB one which worked. I don't know where the barrier is exactly. Achieve further security by passwording the RAR file, and by setting "do not show encrypted filenames" in WinRAR options.

              Picture guide here

              http://howto.helpero.com/howto/Hide-Files-in-JPEG-Images_70.html

              A word of warning... this sort of thing is well known to law enforcement/security agencies, and also to professional data thieves, so I would not rely on it for protection from them! A simple hex dump of the "jpeg" will reveal the multiple file headers. Strictly fun-level domestic stealth with this technique.

              As has been noted, steganography is another thing altogether...

              And now a little gripe... I wish people, before jumping into a thread and stating that this or that thing is "impossible" or "won't work", would just take a minute or so to use Google, and/or do a little experimenting.

              I found that picture guide by typing "join jpeg and rar file" (without the quotes) into Google.

              the idea if hiding a file within a image only works for lossless formats and when you literally modify the bits of the image oh so subtlely and hide some information in them, which you can later retrieve.

              Steganography is where you hide data inside another file, e.g. in the lowest bits of a 24 bit bmp, the file size is unaffected, the picture looks the same to the naked eye, but what is described above is taking advantage of a quirk in the way certain files use headers to identify themselves, to append one file to another.

              You can't do drag and drop with batch files, to answer that question.

              Try this:

              1. Create a batch file

              Code: [Select]
              @echo off
              echo. %1
              echo. %2
              echo. %3
              echo. %4
              echo. %5
              echo. %6
              echo. %7
              echo. %8
              echo. %9
              pause

              2. Save it on your desktop (or anywhere else)

              3. In Explorer, highlight between 1 and 9 files and drag them onto the batch file's icon.

              4. Tell me what you see.
              « Last Edit: February 28, 2009, 01:54:29 AM by Dias de verano »

              ehsan_08

                Topic Starter


                Rookie

                Re: MS DOS goinng in a range (can't explain much here)
                « Reply #11 on: February 28, 2009, 01:10:27 AM »
                 :o wow

                dude ur a genius!
                and this isn't much for protection, i just wanted to create something useful, and learn new things like this....

                1 question how ever, i never got %1 ect...
                u think i can mix these with this part of the script:

                some how, this:
                copy /b image.jpg+%1+2% new_image.jpg



                thanks again!

                Dias de verano

                • Guest
                Re: MS DOS goinng in a range (can't explain much here)
                « Reply #12 on: February 28, 2009, 01:16:25 AM »
                Code: [Select]
                @echo off
                copy /b "image.jpg"+"%1" "new_image.jpg"

                Drag the rar file onto the batch.

                Use quote marks if filenames may contain spaces.

                use DEL "%1" to delete rar file when done.




                ehsan_08

                  Topic Starter


                  Rookie

                  Re: MS DOS goinng in a range (can't explain much here)
                  « Reply #13 on: February 28, 2009, 02:18:23 AM »
                  thanks, that made this alot easier!

                  thanks again

                  Dias de verano

                  • Guest
                  Re: MS DOS goinng in a range (can't explain much here)
                  « Reply #14 on: February 28, 2009, 02:24:37 AM »
                  Code: [Select]
                  @echo off
                  copy /b "image.jpg"+"%1" "%~dpn1.jpg"

                  Copy new jpg into same drive (d) and folder (p) as rar file and give it same name part before extension (n) as rar file

                  Remove d and p to save to same folder as batch file