本文整理汇总了C#中dnlib.DotNet.EmbeddedResource.GetResourceStream方法的典型用法代码示例。如果您正苦于以下问题:C# EmbeddedResource.GetResourceStream方法的具体用法?C# EmbeddedResource.GetResourceStream怎么用?C# EmbeddedResource.GetResourceStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dnlib.DotNet.EmbeddedResource
的用法示例。
在下文中一共展示了EmbeddedResource.GetResourceStream方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public void Initialize(ResourceDecrypter resourceDecrypter) {
if (decryptedData != null || stringDecrypterType == null)
return;
var resourceName = GetResourceName();
stringResource = DotNetUtils.GetResource(module, resourceName) as EmbeddedResource;
if (stringResource == null)
return;
Logger.v("Adding string decrypter. Resource: {0}", Utils.ToCsharpString(stringResource.Name));
decryptedData = resourceDecrypter.Decrypt(stringResource.GetResourceStream());
}
示例2: dumpEmbeddedFile
void dumpEmbeddedFile(EmbeddedResource resource, string assemblyName, string extension, string reason)
{
DeobfuscatedFile.createAssemblyFile(resourceDecrypter.decrypt(resource.GetResourceStream()), Utils.getAssemblySimpleName(assemblyName), extension);
addResourceToBeRemoved(resource, reason);
}
示例3: Decrypt
public void Decrypt(ResourceDecrypter resourceDecrypter, ISimpleDeobfuscator simpleDeobfuscator) {
if (decryptMethod == null)
return;
resource = CoUtils.GetResource(module, decrypterCctor);
if (resource == null)
return;
var decrypted = resourceDecrypter.Decrypt(resource.GetResourceStream());
var reader = MemoryImageStream.Create(decrypted);
int numEncrypted = reader.ReadInt32();
Logger.v("Restoring {0} encrypted methods", numEncrypted);
Logger.Instance.Indent();
for (int i = 0; i < numEncrypted; i++) {
int delegateTypeToken = reader.ReadInt32();
uint codeOffset = reader.ReadUInt32();
var origOffset = reader.Position;
reader.Position = codeOffset;
Decrypt(reader, delegateTypeToken, simpleDeobfuscator);
reader.Position = origOffset;
}
Logger.Instance.DeIndent();
}