+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Senior Member counterstrikewi's Avatar
    Join Date
    Apr 2009
    Location
    \??\.\PhysicalDrive0:\+00h
    Posts
    1,982

    i have a string containing the data for a file, how can i execute this string?

    i have a string containing the data for a file, how can i execute this string?

    i could use CreateProcessEx by Aphex, but that requires a pointer

    Code:
    procedure ResourceToMem;
    var
      ResInfo: HRSRC;
      ResSize: LongWord;
      Handle: THandle;
      ResData: Pointer;
    begin
     
      //Locate our resource information from within the resource data
      ResInfo := FindResource(SysInit.HInstance, pchar('a01'), RT_RCDATA);
     
      if ResInfo <> 0 then
      begin
        //Get the size of our resource information
        ResSize := SizeofResource(SysInit.HInstance, ResInfo);
        if ResSize <> 0 then
        begin
          //Get the handle to our resource information
          Handle := LoadResource(SysInit.HInstance, ResInfo);
          if Handle <> 0 then
          begin
            //Store our data into the resource
            ResData := LockResource(Handle);
     
            //Execute it!
            createprocessex(ResData);
          end;
        end;
    end;
    i have seen this code by Krippler

    i could use this except, i need to decrypt the ResData before executing it

    his code doesnt give a chance :0

    help?
    DelphiBasics - Ultimate Delphi Resource for Beginners
    www.delphibasics.info

  2. #2
    Senior Member cracksman's Avatar
    Join Date
    Dec 2006
    Location
    behind your little sister
    Posts
    1,611
    FindResource(SysInit.HInstance, un-crypt(pchar('a01')), RT_RCDATA);

    why wouldn't that work?
    I Retired. stop asking me questions. you can find me on msn or ic0de.

  3. #3
    Senior Member counterstrikewi's Avatar
    Join Date
    Apr 2009
    Location
    \??\.\PhysicalDrive0:\+00h
    Posts
    1,982
    because you havent retreived the string data from the crypter

    your code just un-encrypts the location of the resource, which is the string a-01 :S


    i have an encrypted file on the resources of the loader (stub)

    i need to get the file off the resources as a string

    decrypt it (which returns a string)

    and then execute it
    DelphiBasics - Ultimate Delphi Resource for Beginners
    www.delphibasics.info

  4. #4
    Senior Member Syntax_err's Avatar
    Join Date
    Jun 2008
    Posts
    593
    Code:
            ResData := LockResource(Handle);
            dString = Allocate(ResSize)
    i don't know how to do it , make dString points to ResData value
    then decrypt it as normal string , and execute it

    Code:
            //Execute it!
            createprocessex(@dString);
    idk alot of pointers stuff , Delphiers may help ^^ good luck
    لا إله إلا الله محمد رسول الله
    Non c?? dio solo allah e Mohammed ?? il messaggero di Allah
    There is no God but allah ,and Mohammed is the messenger of Allah


    Мустафа

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to use string in C++
    By acidrain in forum Off-Topic
    Replies: 2
    Last Post: 28-05-2009, 13:24
  2. File Time String?
    By mjrod5 in forum Delphi Help
    Replies: 6
    Last Post: 28-03-2009, 22:07
  3. Read / Writte in a xml file to save string data
    By snake in forum Delphi Help
    Replies: 0
    Last Post: 18-02-2007, 22:16
  4. Get the string before @, from string... help pls.
    By Xploit in forum Delphi Help
    Replies: 3
    Last Post: 31-12-2005, 15:39
  5. error in read file string....?
    By Dark Angel in forum Delphi Help
    Replies: 9
    Last Post: 01-09-2005, 19:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.