开心网游戏:朋友买卖
开心网有个好玩的游戏,你可以把你的好友当作奴隶,让他们做一些无聊的事。如何抓个好友做奴隶呢?自己的现金超过那人的身价就可以买到他。

但是有个小问题。只能通过登陆开心网,点 "朋友买卖" 游戏才能赚到100元一天。钱少,就没办法买人。谁有时间天天登陆那个网站,点游戏呢?我没有,我还得工作。我呢,写了个Perl程序,会利用cURL,也改了我的crontab以便使得电脑每个小时一次登陆开心网。天天可以轻松地多赚100元。过了一段时间钱会特别多,可以买到无数的朋友。
因为我是个好网民,网上的雷锋似的,我就跟大家分享我的程序。改crontab简单,你可以自己搞。好,看看吧:
欢迎用一下!
通过一些实验,本记者了解到,每天晚上12点以后登陆就可以从新赚那个100元。每个小时登陆一次没有什么用。

但是有个小问题。只能通过登陆开心网,点 "朋友买卖" 游戏才能赚到100元一天。钱少,就没办法买人。谁有时间天天登陆那个网站,点游戏呢?我没有,我还得工作。我呢,写了个Perl程序,会利用cURL,也改了我的crontab以便使得电脑每个小时一次登陆开心网。天天可以轻松地多赚100元。过了一段时间钱会特别多,可以买到无数的朋友。
因为我是个好网民,网上的雷锋似的,我就跟大家分享我的程序。改crontab简单,你可以自己搞。好,看看吧:
#!/usr/bin/perl
#
# Kaixin wang script: log in, access the friend buying game,
# parse current account information and print to a log file.
#
# Other extra software needed:
# curl
# Note: replace "@" character in user name with "%40"
$kaixinUser="user%40domain.com";
$kaixinPass="password";
$tempDir="/tmp/kaixin-data";
$cookieFile="${tempDir}/cookies.txt";
$logFile="/export/home/log/kaixin.log";
`mkdir -p $tempDir`;
# Clean up from previous runs
`rm ${tempDir}/cookies.txt`;
`rm ${tempDir}/kaixin*`;
#
# Access the web site
#
# Kaixin wang: load
$fileLogin1="${tempDir}/kaixin-login-1.html";
`curl -b "${cookieFile}" -c "${cookieFile}" \
-o "${fileLogin1}" "http://www.kaixin001.com"`;
# Kaixin wang: log in
$fileLogin2="${tempDir}/kaixin-login-2.html";
`curl -b "${cookieFile}" -c "${cookieFile}" \
-o "${fileLogin2}" -d \
"url=%2F&email=${kaixinUser}&password=${kaixinPass}" \
"http://www.kaixin001.com/login/login.php"`;
# Kaixin wang: open application
$fileApp1="${tempDir}/kaixin-app-1.html";
`curl -b "${cookieFile}" -c "${cookieFile}" -o "${fileApp1}" \
"http://www.kaixin001.com/app/app.php?aid=1028"`;
# Log our progress locally so we can find out how money gets added
# to our accounts ie, daily, hourly, etc.
#
# Open HTML file, put the 3 money amounts into array
#
open(HTML, "$fileApp1")
or die "open ${fileApp1} failed\n";
foreach $line (<HTML>) {
$tag1="<strong class=\"dgreen\">¥";
$tag2="</strong>";
if ($line =~ /$tag1/) {
$newIndex1 = (index $line, "$tag1", 0) + length("$tag1");
$newIndex2 = (index $line, "$tag2", newIndex1);
$yenStr = substr $line, $newIndex1, $newIndex2 - $newIndex1;
push(@yenArr, $yenStr);
}
}
close HTML;
#
# Log the money amounts to a file
#
$dateStr=`date`;
chomp($dateStr);
# open for appending data
open (LOGFILE, ">>${logFile}") || die ("Could not open file. $!");
print LOGFILE "$dateStr\t\tY $yenArr[0]\tY $yenArr[1]\tY $yenArr[2]\n";
close LOGFILE;
exit(0);
欢迎用一下!
通过一些实验,本记者了解到,每天晚上12点以后登陆就可以从新赚那个100元。每个小时登陆一次没有什么用。


1 评论:
you awesome!
prond of you ^_^
发表评论
<< 主页