-
-
[原创]第一题 Helllo-CTF
-
发表于: 2017-10-25 08:39 1812
-
使用ida 打开文件,查看字符串,直接定位到关键函数
int __thiscall sub_4017F0(CWnd *this)
{
struct CString *v1; // ST08_4@1
CWnd *v2; // eax@1
int v3; // eax@1
int result; // eax@2
char *Str; // [sp+4Ch] [bp-8h]@1
CWnd *v6; // [sp+50h] [bp-4h]@1
v6 = this;
v1 = (CWnd *)((char *)this + 100);
v2 = CWnd::GetDlgItem(this, 1002);
CWnd::GetWindowTextA(v2, v1);
v3 = sub_4018D0((char *)v6 + 100);
Str = CString::GetBuffer((CWnd *)((char *)v6 + 100), v3);
if ( strlen(Str) )
{
if ( !strcmp(Str, "WelcomeToKanXueCtf2017") )
result = sub_401770();
else
result = sub_4017B0();
}
else
{
result = CWnd::MessageBoxA(v6, "请输入pass!", 0, 0);
}
return result;
}
int __thiscall sub_4017F0(CWnd *this)
{
struct CString *v1; // ST08_4@1
CWnd *v2; // eax@1
int v3; // eax@1
int result; // eax@2
char *Str; // [sp+4Ch] [bp-8h]@1
CWnd *v6; // [sp+50h] [bp-4h]@1
v6 = this;
v1 = (CWnd *)((char *)this + 100);
v2 = CWnd::GetDlgItem(this, 1002);
CWnd::GetWindowTextA(v2, v1);
v3 = sub_4018D0((char *)v6 + 100);
Str = CString::GetBuffer((CWnd *)((char *)v6 + 100), v3);
if ( strlen(Str) )
{
if ( !strcmp(Str, "WelcomeToKanXueCtf2017") )
result = sub_401770();
else
result = sub_4017B0();
}
else
{
result = CWnd::MessageBoxA(v6, "请输入pass!", 0, 0);
}
return result;
}
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
赞赏
看原图
赞赏
雪币:
留言: