There is a way if I can get a script from a web-server then execute it
only in PC's memory? The aim is that I don't want any temp file during
building. I want my scripts un-hackable, but script library during
build to asm makes a temp file what you can "stole" and recompile or
can able to reverse. I don't want this. There is a way to turn off
temp files during compiling? (as I know almost similar than caching,
but even you turn off caching, builder DO make temp files even so)
Thanks in advise
In that scenario, it is not possible to make it "unhackable." The script or code can, at the least, be imaged from memory. However, disabling the temp file cache may protect your code to a degree. As to whether it is supported, someone else will have to answer you.
Also keep in mind that these are not temporary files, strictly
speaking. These are the cache files stored in the System Temp folder.
Cheers,
Oleg
On Dec 11, 7:51 am, Simon <si...@darqmuse.com> wrote:
> On a similar vein -- is it possible to check for the existence of the temp
> file, and if it exists, load that instead of spending the time to recompile?
>
> On Sat, Dec 10, 2011 at 12:55 PM, Desert Serenity <
>
>
>
> desert.serenity.subscripti...@gmail.com> wrote:
> > **
>
> > In that scenario, it is not possible to make it "unhackable." The script
> > or code can, at the least, be imaged from memory. However, disabling the
> > temp file cache may protect your code to a degree. As to whether it is
> > supported, someone else will have to answer you.
>
> > ----- Original message -----
> > > Hello!
>
> > > There is a way if I can get a script from a web-server then execute it
> > > only in PC's memory? The aim is that I don't want any temp file during
> > > building. I want my scripts un-hackable, but script library during
> > > build to asm makes a temp file what you can "stole" and recompile or
> > > can able to reverse. I don't want this. There is a way to turn off
> > > temp files during compiling? (as I know almost similar than caching,
> > > but even you turn off caching, builder DO make temp files even so)
>
> > > Thanks in advise- Hide quoted text -
>
> - Show quoted text -
Forget for a second about CS-Script... Consider
ICodeCompiler.CompileAssemblyFromSource.
It takes the source code (not the path to the file with the source
code) and compiles it into assembly. If you specify
CompilerParameters.GenerateInMemory it will generate the in-memory
assembly without the assembly file on file system. Well, it is what
you would expect...
This is what will happen under the hood:
- CLR creates the temp file with your source code
- CLR executes csc.exe against source file
- csc.exe generates the assembly file
- CLR loads the assembly file in memory from the byte stream
- CLR deletes source code file and the assembly file
Thus because the actual compiler does not allow file-less compilation
I did not want to pretend that CS-Script engine does.
Saying that, I am looking forward to see Roslyn officially released so
I can replace ICodeCompiler with it. From my early experiments with
Roslyn it looks like it indeed delivers file-less compilation.
Cheers,
Oleg
I think remote codes - for example - from a web server will be more
secure. Even if there is a way that we can able to extrace a memory
segment image to "steal" a program, or hack it. But it's more hard
than catch a file in time made by OS, or watch temp folder and copy
the new temp file by compiler.
In one word, as I've asked: an only memory compiling as you've said:
file-less compiling would be very cool!
I'm looking forward your solution!
Regards
> > Thanks in advise- Idézett szöveg elrejtése -
>
> - Idézett szöveg megjelenítése -
On dec. 11, 08:44, Oleg Shilo <oleg.sh...@gmail.com> wrote:
> We'll just need to wait until Roslyn is out :)
>
> Oleg
>
> > > - Idézett szöveg megjelenítése -- Idézett szöveg elrejtése -