C#结束语在其它应用程序的应用程序 [英] C# Wrapping an application within another application

查看:152
本文介绍了C#结束语在其它应用程序的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想,以确保某些应用程序对某些人没有教他们如何添加加密或认证,所以我想到了嘲讽了一个简单的应用程序启动另一个应用程序,如果一些密码或验证函数返回true。我将如何包装应用程序,以便只发射将能够访问该文件?

I want to secure some applications for some people without teaching them how to add an encryption or authentication, so I thought about mocking up a simple application that launches another application if some password or authentication function returns true. How would I wrap the application so that only the launcher would be able to access the file?

推荐答案

如果包装的(保护)的应用程序进行管理,可以嵌入它作为一个加密的字节数组,然后调用的Assembly.Load(rawBytes )和使用反射来启动应用程序。
(应用程序应该同意揭露一些静态方法或属性启动本身,它可以调用使用反射)

If the wrapped (protected) application is managed, you can embed it as an encrypted byte array, then call Assembly.Load(rawBytes) and use reflection to start the application.
(The application should agree to expose some static method or attribute that launches itself, which you can call using reflection)

请注意,您仍然容易受到反射,除非你从一个Web服务的解密密钥。 (在这种情况下,你会很容易受到反射,提琴手和有效密码的组合)

Note that you'll still be vulnerable to Reflector, unless you get the decryption key from a web service. (In which case you'll be vulnerable to a combination of Reflector, Fiddler, and a valid password)

这篇关于C#结束语在其它应用程序的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆