Run a program from an array of bytes without creating a temporary file . c#

后端 未结 3 1817
眼角桃花
眼角桃花 2021-01-25 04:47

I have many .exe files stored on IIS server (MSSQL) that contain reports and access to the file(s) on the servers . (These files will be change on Sundays .)

After conne

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-25 05:16

    Doesn't sound safe either way, why are you storing exécutables in a db to begin with? Who uploads them? Wether they're on the filesystem or not they're just as dangerous if malicious.

    Are those .net exes? If so you could load the assembly into a child appdomain with security restrictions and i'm pretty sure you can do that without copying to disk.

    For regular native exe i don't think it's possible to just launch an exe without a physical file backing it (even in the task manager you can see the path from which a program was launched)

提交回复
热议问题