我有以下字符串......
CN=KendallLDAPTEST Weihe,OU=CORPUSERS,OU=CORP,DC=int,DC=appriss,DC=com
Run Code Online (Sandbox Code Playgroud)
我需要提取 KendallLDAPTEST Weihe
换句话说,我需要在第一个=和第一个之间提取所有字符串数据,
我的CS课程中有一个以缓冲区溢出攻击为中心的项目.
我很难完全理解这个话题.
说我有以下功能:
08048cc5 <getbuf>:
8048cc5: 55 push %ebp
8048cc6: 89 e5 mov %esp,%ebp
8048cc8: 83 ec 38 sub $0x38,%esp
8048ccb: 8d 45 d8 lea -0x28(%ebp),%eax
8048cce: 89 04 24 mov %eax,(%esp)
8048cd1: e8 32 01 00 00 call 8048e08 <Gets>
8048cd6: b8 01 00 00 00 mov $0x1,%eax
8048cdb: c9 leave
8048cdc: c3 ret
Run Code Online (Sandbox Code Playgroud)
目前它返回此功能:
08048c53 <test>:
8048c53: 55 push %ebp
8048c54: 89 e5 mov %esp,%ebp
8048c56: 83 ec 28 sub $0x28,%esp
8048c59: e8 63 04 00 00 call …Run Code Online (Sandbox Code Playgroud)