Development
通过‘人人网6周年’活动发布的XSS分析
4大约半年前,人人弄出国站内信”暗恋门”XSS的漏洞,盗取cookies,病毒分发站内信,曾有童鞋撰文分析过这个事件。(传送门)
今天,满屏的姜姝君(没截图,人人自己公关删太快了)和后来的技术宅改变世界的状态都是这次XSS的具体体现
表现在,点击URL以后,立马也会发一个同样状态,LZ也有中招,翻看技术宅改变世界http://www.wix.com/active93/active93)的源代码
(更多…)
Monologue on Programming
01.声明变量尽量在函数开头
#include <stdio.h>
#include <string.h>
char name[]=”mygogou”;
int main()
{
char output[8];
strcpy(output, name);
for(int i=0;i<8&&name[i];i++)
printf(“\\0x%x”,name[i]);
return 0;
}
写在.c文件中会编译报错。
Compiling… tmsg.c E:\as\vc-code\1\tmsg.c(8) : error C2143: syntax error : missing ‘;’ before ‘type’
经查证这是因为c和c++关于变量声明的一点点不同:
(更多…)
#pex4fun Challenge 2nd Fibonacci
0Pex is Automated White box Testing for .NET from Microsoft Research.
Pex for fun on the web is a radically simplified version of the fully featured Pex Power Tool for Visual Studio.
Challenge Fibonacci 2 is a kind of the simplest recursive problem after you find out the duel is actually second order Fibonacci array.
using System;
public class Program {
public static int Puzzle(int x) {
// Can you write code to solve the puzzle? Ask Pex to see how close you are.
if (x <= 1) return x;
if (x == 2) return 3;
return Puzzle(x-1)*2 - Puzzle(x-3);
}
}
Google Host Patch自动获取脚本
9Google最近发布了Google Plus,但是几乎是刚刚一发布就无法访问,同时面对着GMail,Google搜索越来越频繁的连接阻断问题,我们急需要一个方案来更方便的访问Google服务。
如果在校园网中,IPv6无疑是一个良好的解决方案,本博这篇文章给出了相关方法,在Google Code上也有一个Project专门维护Google IPv6的Host列表。
但是在没有IPv6环境的情况,这个自动脚本就有了意义。本脚本最初来自Google+ 上的Felix Hsu,他已发布正式版,但是我还是个人更喜欢这个version 3一些~ XD
Windows Vista/7用户在开启UAC的情况下需要“右键->以管理员的身份运行”
点击此下载该脚本
建议大家使用smarthosts (更多…)


