Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. is there any way to create a new Process from a Stream? [modified]

is there any way to create a new Process from a Stream? [modified]

Scheduled Pinned Locked Moved C#
question
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Demasoni
    wrote on last edited by
    #1

    alternative for this:

    MemoryStream ms = new MemoryStream();
    ms.Write("one exe file");
    Process.Start(ms);

    :)) i have an encoded exe, i want to decode it on memorystream and then run it, so nobody can see original exe file! so i can not use a temp file on HDD! other way?

    modified on Tuesday, September 8, 2009 10:06 AM

    L OriginalGriffO D L 4 Replies Last reply
    0
    • D Demasoni

      alternative for this:

      MemoryStream ms = new MemoryStream();
      ms.Write("one exe file");
      Process.Start(ms);

      :)) i have an encoded exe, i want to decode it on memorystream and then run it, so nobody can see original exe file! so i can not use a temp file on HDD! other way?

      modified on Tuesday, September 8, 2009 10:06 AM

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Write it to a temporary file?

      1 Reply Last reply
      0
      • D Demasoni

        alternative for this:

        MemoryStream ms = new MemoryStream();
        ms.Write("one exe file");
        Process.Start(ms);

        :)) i have an encoded exe, i want to decode it on memorystream and then run it, so nobody can see original exe file! so i can not use a temp file on HDD! other way?

        modified on Tuesday, September 8, 2009 10:06 AM

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        This may sound like a stupid question, but why would you want to do that? If you have the process name, path and parameters why put it to a stream fisrt? If the stream contains more than the name, path and parameters, then what do you expect to happen with the excess data?

        No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        1 Reply Last reply
        0
        • D Demasoni

          alternative for this:

          MemoryStream ms = new MemoryStream();
          ms.Write("one exe file");
          Process.Start(ms);

          :)) i have an encoded exe, i want to decode it on memorystream and then run it, so nobody can see original exe file! so i can not use a temp file on HDD! other way?

          modified on Tuesday, September 8, 2009 10:06 AM

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          There is no other way. You have to write it to a temporary file. Besides, if your app requires that kind of security, you're still not going to stop the right person from grabbing it straight out of memory.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          1 Reply Last reply
          0
          • D Demasoni

            alternative for this:

            MemoryStream ms = new MemoryStream();
            ms.Write("one exe file");
            Process.Start(ms);

            :)) i have an encoded exe, i want to decode it on memorystream and then run it, so nobody can see original exe file! so i can not use a temp file on HDD! other way?

            modified on Tuesday, September 8, 2009 10:06 AM

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            you might create a (temporary) memory-resident file system, create a file in there, and execute it. Google + some stamina required. klik[^] :)

            Luc Pattyn


            Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.


            modified on Tuesday, September 8, 2009 1:04 PM

            D 1 Reply Last reply
            0
            • L Luc Pattyn

              you might create a (temporary) memory-resident file system, create a file in there, and execute it. Google + some stamina required. klik[^] :)

              Luc Pattyn


              Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.


              modified on Tuesday, September 8, 2009 1:04 PM

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              Luc Pattyn wrote:

              you might create a (temporary) memory-resident file system, create a file in there, and execute it. Google + some stamina required.

              I was going to suggest writing his own Loader in place of Windows version, but I thought it would have been a bit too overboard. ;)

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008
              But no longer in 2009...

              L 1 Reply Last reply
              0
              • D Dave Kreskowiak

                Luc Pattyn wrote:

                you might create a (temporary) memory-resident file system, create a file in there, and execute it. Google + some stamina required.

                I was going to suggest writing his own Loader in place of Windows version, but I thought it would have been a bit too overboard. ;)

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007, 2008
                But no longer in 2009...

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #7

                Dave Kreskowiak wrote:

                a bit too overboard.

                Nah. If and when we go too overboard, we get a "plz send me the code" reply to straighten us out. :laugh:

                Luc Pattyn


                Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.


                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups