Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231

    Lightbulb Security Layer : EFIS Method

    I have a way to protect files from stolen by crackers or others, My Way Is EFIS (Embedding Files In Sources), with this way we can change our files in the codes and put it between codes (On Global Function or any section or use it as local!)
    i create a program to parse file to Codes that usable between your codes, then in runtime you copy file on memory from codes or copy it in hard disk (i write some function for these jobs)

    File Parser.exe

    use this application (great GUI thanks reteset) for Parsing files to codes, How ?

    in 'Table Name' Field enter your file name or a variable name no difference just you must know this name for use it on app (Note :this name follow provision of variable name (Not srart with numbers, ...))

    in 'File To Parse' field you must enter addresss of file that you want parsed to codes.

    in 'Save To' field you must enter addresss of file that you want parsed codes saved to it.

    in the end this app create a file like below that you must include it in your app :

    Code:
    Test = {"8606185513116067142","2335244402573734501","7299525919160618305","8461225900329037677"}
    Test.Size = 36
    Test.B1=103Test.B2=105Test.B3=110Test.B4=46
    Test.Bytes = 4
    Codes Helper :

    Codes Helper are some function that help you back your files from those codes to memory or to a file and then use it

    these functions are :


    FileTable2Memory(File_Table, mem)

    with this func you can copy your file from those codes to memory and use it with this way your file not created on hard disk.

    first parameter is table name that before you choose it in above examp my table name is 'Test'

    second parameter is a memory pointer that allocated with Test.Size bytes (size is important)

    return nothing

    for examp see this (i create apz of examp1, see attachments)

    Code:
    Test ={"8606185513116067142","2335244402573734501","7299525919160618305","8461225900329037677"}
    Test.Size = 36
    Test.B1=103Test.B2=105Test.B3=110Test.B4=46
    Test.Bytes = 4
    
    mem = Memory.Allocate(Test.Size) -- create memory with Test.Size
    FileTable2Memory(Test, mem) -- Copy file from code to memory
    Dialog.Message("", Memory.GetString(mem, -1, Ascii)) -- Print File bolt from memory
    Memory.Free(mem) -- Kill memory of file


    Memory2File(Mem, File_Name)

    with this func you can create your file from memory (that created from those codes) on your hard disk and then use it.

    first parameter is memory pointer (that created from those codes)

    second parameter is the filename on your hard disk, if you set it ':temp:' function generate a file random in your temp then return address of it.

    return name of file if you set second parameter ':temp:'.


    for examp see this (i create apz of examp2, see attachments)

    Code:
    Test ={"8606185513116067142","2335244402573734501","7299525919160618305","8461225900329037677"}
    Test.Size = 36
    Test.B1=103Test.B2=105Test.B3=110Test.B4=46
    Test.Bytes = 4
    
    mem = Memory.Allocate(Test.Size) -- create memory with Test.Size
    FileTable2Memory(Test, mem) -- Copy file from code to memory
    filename = Memory2File(mem, ":temp:") -- create file from memory to hard disk
    Dialog.Message("", TextFile.ReadToString(filename)) -- Print File from hard disk
    File.Delete(filename, false, false, false, nil) -- Delete File
    Memory.Free(mem) -- Kill memory of file


    FileTable2File(File_Table, File_Name)

    with this func you can create your file bolt from codes to file on hard disk and then use it.

    first parameter is table name that before you choose it in above examp my table name is 'Test'

    second parameter is the filename on your hard disk, if you set it ':temp:' function generate a file random in your temp then return address of it.

    return name of file if you set second parameter ':temp:'.


    for examp see this (i create apz of examp3, see attachments)

    Code:
    Test ={"8606185513116067142","2335244402573734501","7299525919160618305","8461225900329037677"}
    Test.Size = 36
    Test.B1=103Test.B2=105Test.B3=110Test.B4=46
    Test.Bytes = 4
    
    filename  = FileTable2File(Test, ":temp:") -- create file bolt from codes to hard disk
    Dialog.Message("", TextFile.ReadToString(filename)) -- Print File from hard disk
    File.Delete(filename, false, false, false, nil) -- Delete File
    Memory.Free(mem) -- Kill memory of file

    with this method (EFIS) you can increase your security of files and program and prevent from stealing your files, this is a new layer.

    with this your program is portable you can send one page codes to your friends that include many files or you can post your codes that include files.

    I work on it for improve it and any help and info is familiar.
    please post any bug, any question, any suggestion or anything you know.

    this Method use Memory Plugin This is important every time use the latest Version of Memory plugin.

    i very work on it your reply create me happy.
    Enjoy
    beforehand thanks for your replys.
    AMSWaves.
    Attached Files

  2. #2
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Very nice method,

    I had something just like this called LuaInclude (including files in lua)
    but I discontinued this because including files to the plugins compiled in the AMS Action Plugin Compiler is now possible too.

    I'm loving this, a nice extra piece of safety!
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  3. #3
    Join Date
    May 2007
    Location
    Sydney, Australia
    Posts
    1,546
    Now this looks interesting ... downloading and installing now. Am keen to have a look at the potential of this. Great idea.

  4. #4
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    I had a chance to peruse your code. Very nice idea. This will come in handy as an additional security layer for sure.
    It would be even cooler if you could include the code for file to table parsing as code instead of just a program so we could parse multiple files at once (or does it already do that and I missed it?).

    Thanks for sharing.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  5. #5
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    I got an idea...why not just include all of these new functions for the security layer directly in your memory plugin? Now that would be convenient.

    Also, the file parser program is only returning the Size and not the Bytes or the other info about the file (which causes errors in the helper code).
    Last edited by Centauri Soldier; 08-14-2009 at 12:08 AM.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  6. #6
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231
    Quote Originally Posted by Imagine Programming View Post
    Very nice method,

    I had something just like this called LuaInclude (including files in lua)
    but I discontinued this because including files to the plugins compiled in the AMS Action Plugin Compiler is now possible too.

    I'm loving this, a nice extra piece of safety!
    thanks Imagine Programming,
    i never see that (LuaInclude) but anyway i think this is a good way for files.

  7. #7
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231
    thanks mystica and Centauri Soldier,

    Quote Originally Posted by Centauri Soldier View Post
    It would be even cooler if you could include the code for file to table parsing as code instead of just a program so we could parse multiple files at once (or does it already do that and I missed it?).
    your right i must add Multiply files to program but codes for parsing file, i think is better stay surreptitious for now, but if you want create a multiply file parser use FileParser.dll in the root of program and use it like this :

    Code:
    Application.LoadActionPlugin("FileParser.dll");
    err = FileParser.DoJob(Source File Name, Output File Name, Table Name)
    if err == 1 then
      -- Job Done Successfully
    elseif err == -1 then
      -- Error in create file
    elseif err == 0 then
      -- Error in open file
    end

    Quote Originally Posted by Centauri Soldier View Post
    I got an idea...why not just include all of these new functions for the security layer directly in your memory plugin? Now that would be convenient.
    no i think this is better codes stay Open for all developer so all body can help me to improve this Method, but any way you can create a plugin for yourself or share it, but i recommended these Codes stay open and all advanced programmer can change it.

    Quote Originally Posted by Centauri Soldier View Post
    Also, the file parser program is only returning the Size and not the Bytes or the other info about the file (which causes errors in the helper code).
    no file parser change your files to code to table that include size of file size of extra bytes and core of files, not just Size of files.
    you get error on helper codes ? where line on what size of file please post if you get error.
    Last edited by AMSWaves; 08-14-2009 at 03:51 AM.

  8. #8
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by AMSWaves View Post
    thanks Imagine Programming,
    i never see that (LuaInclude) but anyway i think this is a good way for files.
    Yeah because I discontinued it, this is safer. What I do is basicly include the files in a luafile and compile the luafile (The files are encrypted in lua). But I could write a plugin that is required for the decompiling though.

    See attached
    Attached Images
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  9. #9
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    The error occurs because the file parser is not including the additional file info.

    In your example2 the lines after the table are...
    Code:
    image.Size = 24455
    image.B1=127image.B2=221image.B3=124image.B4=241image.B5=87image.B6=255image.B7=217
    image.Bytes = 7
    In the output file made by the file parser, the lines after the table are...
    Code:
    image.Size = 145674
    See how I'm missing the info about bytes and the other bit as well. If I plug code(the two missing lines of code that is) from your example into my project then it works but shouldn't those lines have been put in by the file parser?

    Thanks for the parsing code by the way. That will open few more doors with this tool.
    Last edited by Centauri Soldier; 08-14-2009 at 01:32 PM.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  10. #10
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231

    Lightbulb

    Quote Originally Posted by Centauri Soldier View Post
    The error occurs because the file parser is not including the additional file info.

    In your example2 the lines after the table are...
    Code:
    image.Size = 24455
    image.B1=127image.B2=221image.B3=124image.B4=241image.B5=87image.B6=255image.B7=217
    image.Bytes = 7
    In the output file made by the file parser, the lines after the table are...
    Code:
    image.Size = 145674
    See how I'm missing the info about bytes and the other bit as well. If I plug code(the two missing lines of code that is) from your example into my project then it works but shouldn't those lines have been put in by the file parser?
    thanks, yea you are right this is a bug for files that have size with coefficient of 8 but your file size (145674) have two additional bytes if your file size is 145672 this bug comes.

    one line in Codes Helper.lua is wrong (line 23) i change it and reupload it (see attachment).

    in line 23 :
    Code:
      if File_Table.Bytes then
    that must be
    Code:
      if File_Table.Bytes > 0 then
    and new File Parser(1.1.0.0) now support multiple files and lua compiler for compile lua files. (See attachment)

    (Every Time you can download latest File Parser and Codes Helper from this Thread and from My Site)

    Re test your file with these new files and again report sequel.

    Thanks for report and reply.
    Attached Files
    Last edited by AMSWaves; 08-15-2009 at 06:59 AM.

Tags for this Thread

Posting Permissions

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