问题一:
public void AddSession(string strSessionName, string strValue)
{
HttpContext.Current.Session[strSessionName] = strValue;
HttpContext.Current.Session.Timeout = 0x17;
}
0x17表示的是十六进制。这里表示的是时间。不多见
问题二。
public static string qcreplace(string dd, int x)
{
string str = "eljqpjmnpoaz";
if (x == 2)
{
str = "qvchjdsyhpok";
}
int length = str.Length;
int num2 = 0;
int startIndex = 0;
int num4 = 0;
int num5 = 0;
string str2 = "";
int num7 = Convert.ToInt32(Convert.ToString(Convert.ToInt32(dd.Substring(0, 1), 0x10), 10));
for (startIndex = 2; startIndex < dd.Length; startIndex += 2)
{
num4 = Convert.ToInt32(Convert.ToString(Convert.ToInt32(dd.Substring(startIndex, 2), 0x10), 10));
if (num2 < length)
{
num2++;
}
else
{
num2 = 1;
}
char ch1 = str[num2 - 1];
num5 = num4 ^ str[num2 - 1];
if (num5 <= num7)
{
num5 = (0xff + num5) - num7;
}
else
{
num5 -= num7;
}
str2 = str2 + ((char) num5);
num7 = num4;
}
return str2;
} int num7 = Convert.ToInt32(Convert.ToString(Convert.ToInt32(dd.Substring(0, 1), 0x10), 10));?这个用好吗,郁闷我用vs2008跟踪下得到的结果是182.110,27.56,我想得到127.0.0.1 应该把代码改为什么了?
public void AddSession(string strSessionName, string strValue)
{
HttpContext.Current.Session[strSessionName] = strValue;
HttpContext.Current.Session.Timeout = 0x17;
}
0x17表示的是十六进制。这里表示的是时间。不多见
问题二。
public static string qcreplace(string dd, int x)
{
string str = "eljqpjmnpoaz";
if (x == 2)
{
str = "qvchjdsyhpok";
}
int length = str.Length;
int num2 = 0;
int startIndex = 0;
int num4 = 0;
int num5 = 0;
string str2 = "";
int num7 = Convert.ToInt32(Convert.ToString(Convert.ToInt32(dd.Substring(0, 1), 0x10), 10));
for (startIndex = 2; startIndex < dd.Length; startIndex += 2)
{
num4 = Convert.ToInt32(Convert.ToString(Convert.ToInt32(dd.Substring(startIndex, 2), 0x10), 10));
if (num2 < length)
{
num2++;
}
else
{
num2 = 1;
}
char ch1 = str[num2 - 1];
num5 = num4 ^ str[num2 - 1];
if (num5 <= num7)
{
num5 = (0xff + num5) - num7;
}
else
{
num5 -= num7;
}
str2 = str2 + ((char) num5);
num7 = num4;
}
return str2;
} int num7 = Convert.ToInt32(Convert.ToString(Convert.ToInt32(dd.Substring(0, 1), 0x10), 10));?这个用好吗,郁闷我用vs2008跟踪下得到的结果是182.110,27.56,我想得到127.0.0.1 应该把代码改为什么了?
{
string str = "eljqpjmnpoaz";
int length = str.Length;
string str2 = "FF";
int num7 = 0;
int num2 = 0;
for (int i = 0; i < bb.Length; i++)
{
num7 = Convert.ToInt32(str2.Substring(i * 2, 2), 16);
int num5 = (int)bb[i];
num5 = num5 + num7;
if (num5 >= 0xff)
{
num5 = num5 - 0xff;
}
if (i > length)
num2 = num5 ^ str[0];
else
num2 = num5 ^ str[i]; string str3 = Convert.ToString(num2, 0x10);
if (str3.Length < 2)
str3 = "0" + str3;
str2 = str2 + str3;
}
return str2;
}