|
|
[讨论]开新版块了?
广告招租中:) |
|
|
|
|
|
[求助]关于printf函数异常的汇编跟踪
去看MSDN中printf format specifications部分的内容,你的格式字段要和参数保持一致,这是个规定。把握不好会出错。 你给的%d字段在32位机中只能是4个字节,你又非要给它8个字去输出,多出来部分怎么办呢,直接给下一个参数吧,而字符串地址就由想要输出的"Hello"变成了前面8个字节的高32位(即为0xff),哪有字符串的地址为0xff呢,系统就直接给出的异常. 你可以用"%d %d %s"来验证64位整数下的输出情况,就晓得了。 |
|
|
[讨论]论坛是否有必要开设『手机安全』版块
支持。 刚开始学习S60。 |
|
|
|
|
|
|
|
|
|
|
|
[求助]针对VC++开发的程序的性能检测工具有什么些?
VC自身就有 "Profile" |
|
|
[测试结束]服务器测试
南京电信 C:\>ping test.pediy.com Pinging test.pediy.com [211.144.136.186] with 32 bytes of data: Reply from 211.144.136.186: bytes=32 time=51ms TTL=117 Reply from 211.144.136.186: bytes=32 time=46ms TTL=117 Reply from 211.144.136.186: bytes=32 time=46ms TTL=117 Reply from 211.144.136.186: bytes=32 time=46ms TTL=117 Ping statistics for 211.144.136.186: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 46ms, Maximum = 51ms, Average = 47ms C:\>ping bbs.pediy.com Pinging bbs.pediy.com [219.153.15.237] with 32 bytes of data: Reply from 219.153.15.237: bytes=32 time=77ms TTL=119 Reply from 219.153.15.237: bytes=32 time=78ms TTL=119 Reply from 219.153.15.237: bytes=32 time=78ms TTL=119 Reply from 219.153.15.237: bytes=32 time=78ms TTL=119 Ping statistics for 219.153.15.237: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 77ms, Maximum = 78ms, Average = 77ms C:\> |
|
|
|
|
|
[求助][求助]一段ring0代码实在不理解
比较KeTickCount()函数中的字节码? |
|
|
|
|
|
|
|
|
[原创]答题 [第一阶段◇第二题]看雪论坛.腾讯公司2008软件安全技术竞赛
注册码的生成 将那个超长函数(sub_401087)按照上面的流程,在保持输出与输入的对应关系不变的情况下,手动构造了一个且是通用的, 1 用户名为12个字节 检查用户名的字符是否全为'a'-'y'且不能有重复的字符 2 计算其索引到一个数组 3 注册码长度至少为53个字符 检查注册码的字符<='3' 4 将其数字字符转为整形数字 最长不超过100个字符否则会溢出,不知这算不算一个Bug?不信你用150个0去试试 5 调用sub_401087进行注册码变换 sub_401087()的原理与称球问题差不多, 在void sub_401087(int key[100], char out[24], int name[12])中 会将name中的排序做两组类似上面的找坏球的算法(共计24次)且每一个状态都是要判定的,将判定的结果保存在out中并返回 其中有一处有比较很特殊00402D03,其结果是某一个状态下g后必须是h 这应该算是静态花招 6 检查变换后的两组字符串索引顺序与名字索引顺序一致 7 通过后就会弹出OK了 跳过反调试保护, 修改下面两处补丁后可在OD下F2断点 补丁1 004039D2 F2:AE repne scas byte ptr es:[edi] ==> 004039D2 90 nop 004039D3 90 nop 补丁2 004039F8 .^\0F85 AAFEFFFF jnz 004038A8 ==> 004039F8 90 nop 004039F9 90 nop 004039FA 90 nop 004039FB 90 nop 004039FC 90 nop 004039FD 90 nop 写的有点乱. 好不容易把算法给理解了. |
|
|
[原创]答题 [第一阶段◇第二题]看雪论坛.腾讯公司2008软件安全技术竞赛
若需要Key有差异,可以尾加上一些数字(0~3) ,也可以是空格符等(ASCII小于数字3的字符) Key的总长度不高于100个字符 由于最开始的53个字符是一致的,所以没有进行随机数的Key,这样应该不会有扣分吧 最后附上我以前写一个程序 12个球经三次比较就可能找出不同的那一个
//12球3次称出坏球的算法
#include <iostream>
using namespace ::std;
class CBall {
public:
CBall()
{
memset(balls, 0, sizeof(balls));
}
// 1 左侧重 0 相等 -1 右侧重
// 参数以位来区分 bit0~bit11
int Check(int left, int right) const
{
int l=0;
int ln=0;
int r=0;
int rn=0;
for(int i=0; i<12; i++)
{
if(left&1<<i)
{
ln++;
l+=balls[i];
}
else if(right&1<<i)
{
rn++;
r+=balls[i];
}
}
if(ln<rn)
return -1;
if(ln>rn)
return 1;
if(l<r)
return -1;
if(l>r)
return 1;
return 0;
}
int findBug()
{
// 1234 5678 ABCD
int a[12];
int tt;
int tt1;
for(int i=0; i<12; i++)
a[i]=1<<i;
tt=Check(a[0]|a[1]|a[2]|a[3], a[4]|a[5]|a[6]|a[7]);
if(tt==0)
{
// ABCD
tt=Check(a[8]|a[9]|a[10], a[0]|a[1]|a[2]);
if(tt==0)
{
// D
tt=Check(a[11], a[0]);
return tt*12;
}
else
{
// ABC
tt1=Check(a[8], a[9]);
if(tt1==0)
{
// C
return tt*11;
}
else
{
if((tt>0 && tt1>0)
|| (tt<0 && tt1<0))
{
// A
return tt*9;
}
else
{
// B
return tt*10;
}
}
}
}
else
{
// 1234 5678
tt1=Check(a[0]|a[1]|a[4], a[2]|a[3]|a[5]);
if(tt1==0)
{
// 78
tt1=Check(a[7], a[0]);
if(tt1==0)
{
// 8
return -tt*8;
}
else
{
// 7
return -tt*7;
}
}
else
{
if((tt1>0 && tt>0)
|| (tt1<0 && tt<0))
{
tt1=Check(a[0], a[1]);
if(tt1==0)
{
// 6
return -tt*6;
}
else
{
if((tt1>0 && tt>0)
|| (tt1<0 && tt<0))
{
// 1
return tt*1;
}
else
{
// 2
return tt*2;
}
}
}
else
{
tt1=Check(a[2], a[3]);
if(tt1==0)
{
// 5
return -tt*5;
}
else
{
if((tt1>0 && tt>0)
|| (tt1<0 && tt<0))
{
// 3
return tt*3;
}
else
{
// 4
return tt*4;
}
}
}
}
}
return 0;
}
int balls[12];
};
int main()
{
CBall ball;
for(int j=-1; j<=1; j++)
{
for(int i=0; i<12; i++)
{
if(j==0) continue;
ball.balls[i]=j;
cout<<i+1<<" "<<j<<" "<<ball.findBug()<<endl;
ball.balls[i]=0;
}
}
system("pause");
return 0;
}
|
|
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
勋章
兑换勋章
证书
证书查询 >
能力值