将文字提取到资源中是否有助于混淆? [英] does extraction of literals into resource help obfuscation?

查看:82
本文介绍了将文字提取到资源中是否有助于混淆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中有一个.NET用户控件,它有很多异常消息(文字)。如果我将这些文字提取到资源文件中,并让这些消息保持不变。这个提取是否有助于我混淆我的申请?



这是一个小型演示来解释我所说的:

I have a .NET user control in C# and it has lots of exception messages(literals). If I extract these literals into a resource file and let these message stay the same. does this extraction help me to obfuscate my application?

Here is a small demo to explain what I said:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TestResource
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            int text1 = Convert.ToInt32(textBox1.Text);
            int text2 = Convert.ToInt32(textBox2.Text);
            int result = text1+text2;

            if (result <= 100)
                MessageBox.Show(result.ToString());
            else
            {
                throw new ArgumentOutOfRangeException("exceeds the maximum upper bound 100");
            }

        }
    }
}





现在我提取这个文字超过最大上限100到资源文件中,代码如下:





now I extract this literal "exceeds the maximum upper bound 100" into a resource file and the following code as this:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TestResource
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            int text1 = Convert.ToInt32(textBox1.Text);
            int text2 = Convert.ToInt32(textBox2.Text);
            int result = text1+text2;

            if (result <= 100)
                MessageBox.Show(result.ToString());
            else
            {
                throw new ArgumentOutOfRangeException(Resource.English.Exceeds100Message);
            }

        }
    }
}





编译完成后将其转换为可执行文件然后运行混淆软件。

因为此按钮单击方法是私有的,它将被混淆。

这个Resource.English.Exceeds100Message变量是否有助于混淆?



After I compiled this into an executable then run obfuscator software .
because this button click method is private, it will be obfuscated.
Does this "Resource.English.Exceeds100Message" variable help obfuscation?

推荐答案

它有助于混淆吗?



编号你的字符串文字仍然在可执行文件中的明文。
"Does it help obfuscation"?

No. Your string literals will still be in clear text in the executable.


这篇关于将文字提取到资源中是否有助于混淆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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