memset(v5, 0, sizeof(v5)); v7 = 0; initialise(&v6, argv); publish_hook = (__int64 (__fastcall *)(_QWORD))homepage_channel; while ( 1 ) { show_menu(); number = read_number(); if ( number == 4 ) return0; if ( number > 4 ) goto LABEL_17; switch ( number ) { case3uLL: publish_hook("The discount line has been pushed to the homepage.");// 折扣线已推送到主页。 break; case1uLL: printf("How long is this campaign line? ");// 这条竞选路线有多长? v7 = read_number(); if ( v7 && v7 <= 0x1FF ) { printf("Drop your campaign line here: ");// 在这里放下你的竞选口号: read_exact(0, v5, v7); *((_BYTE *)v5 + v7) = 0; puts("Nice. Let us see how many people search for it.");// 不错。让我们看看有多少人在搜索它。 } else { puts("That campaign line will not fit on the board.");// 那条竞选路线不适合董事会。 } break; case2uLL: if ( v7 ) preview_slogan(v5); else puts("No campaign line has been submitted.");// 尚未提交任何活动线。 break; default: LABEL_17: puts("The marketing dashboard ignores that request.");// 营销仪表板忽略该请求。 break; } } }
看看菜单
1 2 3 4 5 6 7 8 9 10
intshow_menu() { puts("another ad job?"); puts("1. press 1 to submit your slogan"); puts("2. press 2 to preview"); puts("3. press 3 to pin it on the homepage"); puts("4. done? clock out"); returnprintf(off_20A0); } // int show_menu(){puts(“另一个广告作业?”);puts(”1。按1提交你的口号);把(“2。按2预览“);按3。按3将其固定在主页上”)。完成?时钟输出”);返回printf(off_20A0);} //
可以看到输入>=4都会被踹
选3操作
选1先是输入长度,然后输入内容
选2:
1 2 3 4 5 6
int __fastcall preview_slogan(constchar *a1) { printf("preview: "); printf(a1); returnputchar(10); }
p = remote("127.0.0.1", 61073) # p = process('./full-reduction') defmenu(n): p.recvuntil(b'> ') p.sendline(str(n).encode())
defsubmit(data): menu(1) p.recvuntil(b'How long is this campaign line? ') p.sendline(str(len(data)).encode()) p.recvuntil(b'Drop your campaign line here: ') p.send(data)