鱼C论坛

 找回密码
 立即注册
查看: 2349|回复: 1

代码逆向出来了,但是怎么找flag?具体说一下步骤啊

[复制链接]
发表于 2018-11-2 07:45:32 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
namespace WpfApp1
{
        public class MainWindow : Window, IComponentConnector
        {
                private bool first;

                private int hit;

                private int correct;

                internal StackPanel sp1;

                internal Button bt1;

                internal StackPanel sp2;

                internal Button bt2;

                internal StackPanel sp3;

                internal Button bt3;

                internal StackPanel sp4;

                internal Button bt4;

                internal StackPanel sp5;

                internal Button bt5;

                internal TextBlock tb1;

                private bool _contentLoaded;

                public MainWindow()
                {
                        this.InitializeComponent();
                        this.first = true;
                        this.hit = 0;
                        this.correct = 0;
                }

                private void Bt1_Click(object sender, RoutedEventArgs e)
                {
                        this.Btn_Checker(1);
                }

                private void Bt2_Click(object sender, RoutedEventArgs e)
                {
                        this.Btn_Checker(2);
                }

                private void Bt3_Click(object sender, RoutedEventArgs e)
                {
                        this.Btn_Checker(3);
                }

                private void Bt4_Click(object sender, RoutedEventArgs e)
                {
                        this.Btn_Checker(4);
                }

                private void Bt5_Click(object sender, RoutedEventArgs e)
                {
                        this.Btn_Checker(5);
                }

                private void Btn_Checker(int para)
                {
                        int[] array = new int[]
                        {
                                0,
                                3,
                                5,
                                4,
                                1,
                                2,
                                5,
                                4,
                                3,
                                2,
                                1
                        };
                        bool flag = this.hit < 10;
                        bool flag2 = flag;
                        if (flag2)
                        {
                                int num = this.hit;
                                this.hit = num + 1;
                        }
                        else
                        {
                                base.Close();
                        }
                        bool flag3 = this.first;
                        bool flag4 = flag3;
                        if (flag4)
                        {
                                this.tb1.Text = "";
                                this.first = false;
                        }
                        bool flag5 = array[this.hit] == para;
                        bool flag6 = flag5;
                        if (flag6)
                        {
                                int num2 = this.correct;
                                this.correct = num2 + 1;
                        }
                        bool flag7 = this.correct == 10;
                        bool flag8 = flag7;
                        if (flag8)
                        {
                                MessageBox.Show("Succeed!");
                                TextBlock textBlock = this.tb1;
                                textBlock.Text = string.Concat(new string[]
                                {
                                        textBlock.Text,
                                        this.sp1.Tag.ToString(),
                                        this.sp2.Tag.ToString(),
                                        this.sp3.Tag.ToString(),
                                        this.sp4.Tag.ToString(),
                                        this.sp5.Tag.ToString()
                                });
                        }
                }

                [GeneratedCode("PresentationBuildTasks", "4.0.0.0"), DebuggerNonUserCode]
                public void InitializeComponent()
                {
                        bool contentLoaded = this._contentLoaded;
                        if (!contentLoaded)
                        {
                                this._contentLoaded = true;
                                Uri resourceLocator = new Uri("/WpfApp1;component/mainwindow.xaml", UriKind.Relative);
                                Application.LoadComponent(this, resourceLocator);
                        }
                }

                [GeneratedCode("PresentationBuildTasks", "4.0.0.0"), EditorBrowsable(EditorBrowsableState.Never), DebuggerNonUserCode]
                void IComponentConnector.Connect(int connectionId, object target)
                {
                        switch (connectionId)
                        {
                        case 1:
                                this.sp1 = (StackPanel)target;
                                break;
                        case 2:
                                this.bt1 = (Button)target;
                                this.bt1.Click += new RoutedEventHandler(this.Bt1_Click);
                                break;
                        case 3:
                                this.sp2 = (StackPanel)target;
                                break;
                        case 4:
                                this.bt2 = (Button)target;
                                this.bt2.Click += new RoutedEventHandler(this.Bt2_Click);
                                break;
                        case 5:
                                this.sp3 = (StackPanel)target;
                                break;
                        case 6:
                                this.bt3 = (Button)target;
                                this.bt3.Click += new RoutedEventHandler(this.Bt3_Click);
                                break;
                        case 7:
                                this.sp4 = (StackPanel)target;
                                break;
                        case 8:
                                this.bt4 = (Button)target;
                                this.bt4.Click += new RoutedEventHandler(this.Bt4_Click);
                                break;
                        case 9:
                                this.sp5 = (StackPanel)target;
                                break;
                        case 10:
                                this.bt5 = (Button)target;
                                this.bt5.Click += new RoutedEventHandler(this.Bt5_Click);
                                break;
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2018-11-2 15:25:42 | 显示全部楼层

回帖奖励 +1 鱼币

看到大神,满满的崇拜,顺便··········沙发
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-6-26 15:15

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表