如何在 Obfuscator XML 中使用通配符

发布于 2025-01-19 08:10:20 字数 532 浏览 2 评论 0原文

我有一个混淆器 XML,可以混淆硬编码的文件名

<?xml version="1.0" encoding="utf-8" ?>
<Obfuscator>
  <Var name="InPath" value="." />
  <Var name="OutPath" value="Obfuscator_Output" />
  <Module file="$(InPath)\Pranay.Hi.abc.GeneratorToken.dll" />
  <Module file="$(InPath)\Pranay.Hi.abc.HandlerException.dll" />
  <Module file="$(InPath)\Pranay.Hi.abc.CertHandling.dll" />
  
</Obfuscator>

,而不是硬编码文件名,有没有办法通过提供类似的内容来包含所有文件,以便所有文件从 Pranay.txt 开始。都包含在内,我们根本不需要对它们进行硬编码。

I have a Obfuscator XML that obfuscates the hardcoded file names

<?xml version="1.0" encoding="utf-8" ?>
<Obfuscator>
  <Var name="InPath" value="." />
  <Var name="OutPath" value="Obfuscator_Output" />
  <Module file="$(InPath)\Pranay.Hi.abc.GeneratorToken.dll" />
  <Module file="$(InPath)\Pranay.Hi.abc.HandlerException.dll" />
  <Module file="$(InPath)\Pranay.Hi.abc.CertHandling.dll" />
  
</Obfuscator>

Instead of hardcoding the files name, is there any way to include all the files by giving something like so that all files starting from Pranay. are included and we don't need to hardcode them at all.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晨光如昨 2025-01-26 08:10:20

您可以使用通配符包含以下配置的文件:

  <Modules>
    <IncludeFiles>$(InPath)\Pranay.Hi.abc.*.dll</IncludeFiles>
  </Modules>

此功能的作者提供了一个示例,可以是 在这里查看。我还在下面提供了他们的示例:

<Module file="$(InPath)\SomeFile.dll">
    <Include path="obfuscar.skip.xml" />
</Module>
<Modules>
   <IncludeFiles>$(InPath)\Acme.*.dll</IncludeFiles>
   <ExcludeFiles>$(InPath)\Acme*Tests.dll</ExcludeFiles>
   <Include path="obfuscar.skip.xml" />
</Modules>

在撰写此答案时尚未编写此功能的文档。一旦可用,应该链接到这里。

You can include files using wildcards with the following configuration:

  <Modules>
    <IncludeFiles>$(InPath)\Pranay.Hi.abc.*.dll</IncludeFiles>
  </Modules>

The author of this feature provided an example that can be viewed here. I have also provided their example below:

<Module file="$(InPath)\SomeFile.dll">
    <Include path="obfuscar.skip.xml" />
</Module>
<Modules>
   <IncludeFiles>$(InPath)\Acme.*.dll</IncludeFiles>
   <ExcludeFiles>$(InPath)\Acme*Tests.dll</ExcludeFiles>
   <Include path="obfuscar.skip.xml" />
</Modules>

The documentation for this feature hasn't been written at the time of writing this answer. It should be linked here once available.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文