找回密码
 加入
搜索
查看: 15908|回复: 26

[网络通信] 如何POST欺骗提交

 火.. [复制链接]
发表于 2011-12-7 20:54:56 | 显示全部楼层 |阅读模式
悬赏1000金钱未解决
本帖最后由 lynfr8 于 2012-1-1 14:39 编辑

原因:此网址的学习视频必须强制看完(30分钟-80分钟不等)才能进行考试
目的:解决如何POST提交数据提前弹出已经完成课程学习内容,也就是打开目标课程后几秒内完成
进度:
1.目前发现打开课程后可以在源代码发现form,并且POST提交的参数均可以直接读取源代码的参数对应ID的Value值获取,
同时可以通过$oIE.document.cookie获取包含JSESSIONID的cookie
2.通过wsexplorer可以监控视频教程最后提交的数据,可以看到lessonStatus=completed
困难:其实问题应该和以下帖子的困难差不多:
http://www.autoitx.com/forum.php?mod=viewthread&tid=23384&extra=&highlight=&page=1


2012.12.14自行解决了,解决思路:抽取页面的第三层框架找到表单直接提交,相当于表单POST:

发表于 2011-12-7 21:32:51 | 显示全部楼层
路过一下,我也在学习 模拟post
发表于 2011-12-7 21:33:11 | 显示全部楼层
帮你多顶两下,让它下不去~~
发表于 2011-12-7 21:57:35 | 显示全部楼层
不是很清楚AUTOIT 的POST的路过。
不过 网页的状态是通过cookies判断的,我们登录的时候要求设置cookies,
返回的时候有的网站也是要求返回登录之后设置的 cookie。
通过操作cookies我想这个欺骗可以实现。
发表于 2011-12-8 08:09:58 | 显示全部楼层
回复 1# lynfr8
xmlhttp不支持自定义cookies的.
发表于 2011-12-8 21:07:14 | 显示全部楼层
搞过差不多的事情,因为对post不是很了解,所以当时采用了比较笨的办法,分享一下思路,不知道管不管用。

在原html代码中插入一段脚本,直接调用了其计时过程中根据时间而触发的函数。

评分

参与人数 1金钱 +22 贡献 +1 收起 理由
lynfr8 + 22 + 1

查看全部评分

 楼主| 发表于 2011-12-9 21:36:57 | 显示全部楼层
回复 5# republican

你确定?
 楼主| 发表于 2011-12-9 21:37:30 | 显示全部楼层
回复 4# nivisde


    我的源码正是以此思路去写的,发现问题多多,详见一楼
发表于 2011-12-9 22:02:47 | 显示全部楼层
路过一下,我也在学习 模拟post
发表于 2011-12-10 00:29:04 | 显示全部楼层
我也在学习 POST 。。。。。。。

真的很挠头。
发表于 2011-12-10 00:33:06 | 显示全部楼层
本帖最后由 republican 于 2011-12-10 00:36 编辑

回复 7# lynfr8

说了不信,那还真没法说了。

The ServerXMLHTTP object offers functionality similar to that of the XMLHTTP object. Unlike XMLHTTP, however, the ServerXMLHTTP object does not rely on the WinInet control for HTTP access to remote XML documents。这段话就说明了XMLHTTP的本质了。

评分

参与人数 1贡献 +1 收起 理由
lynfr8 + 1

查看全部评分

 楼主| 发表于 2011-12-10 00:42:55 | 显示全部楼层
回复 11# republican


    看来还得试试js触发特定函数这个思路了
发表于 2011-12-10 13:00:07 | 显示全部楼层
回复 12# lynfr8

ServerXMLHTTP及Winhttp均支持自定义Cookies。
 楼主| 发表于 2011-12-14 01:21:45 | 显示全部楼层
回复 6# nico_chao
<SCRIPT language=JavaScript>
var int1,pos1,isPause,post,courseStatus;
var isToswf = 0;
var isVideo = 1;
var mediaWidth = 250;
var mediaHeight = 188;
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write('<script language="VBScript"\>\n');
document.write('On Error Resume Next\n');
document.write('Sub main_FSCommand(ByVal command, ByVal args)\n');
document.write(' Call main_DoFSCommand(command, args)\n');
document.write('End Sub\n');
document.write('</script\>\n');
}
var focusFlag;
function checkFocus(){
if(parent.document.hasFocus() && !isPause){
window.aicc_cont.showBox.MediaPlayer.Controls.Play();
}else if(!parent.document.hasFocus() || isPause){
window.aicc_cont.showBox.MediaPlayer.Controls.Pause();
}
}
post = setInterval("sendtime()",1000);
function sendtime(){
if(isToswf == 1){
var currtime = parseInt(window.aicc_cont.showBox.MediaPlayer.Controls.currentPosition);
var totltime = parseInt(window.aicc_cont.showBox.MediaPlayer.CurrentMedia.Duration);
doLMSSetValue( "cmi.core.lesson_location" , currtime*1000 );

if(currtime >= totltime){
courseStatus = "completed";
doLMSSetValue( "cmi.core.lesson_status" , "completed" );
}
}
}

function runInt1(){
isToswf = 0;
clearInterval(int1);
var num = 0;
try{
num = parseInt(window.aicc_cont.showBox.MediaPlayer.CurrentMedia.Duration);
}catch(err){
//alert(pos1);
}
if(num==0){
int1 = setInterval("runInt1()", 300);
}else{
focusFlag = setInterval("checkFocus()", 500);//检查是否是焦点
window.aicc_cont.showBox.MediaPlayer.Controls.Play();
window.aicc_cont.showBox.MediaPlayer.Controls.currentPosition = pos1;
isToswf = 1;
}
}
function main_DoFSCommand(command, args) {
var command = String(command);
var args = String(args);
var arr = args.split(";");
switch(command){
case "0":
runComm(args);
isVideo = args;
break;
case "1":
window.aicc_cont.showBox.MediaPlayer.Controls.Stop();
break;
case "2":
isPause = true;
window.aicc_cont.showBox.MediaPlayer.Controls.Pause();
break;
case "3":
isPause = false;
window.aicc_cont.showBox.MediaPlayer.Controls.Play();
break;
case "4":
pos1 = args;
runInt1();
break;
case "5":
window.aicc_cont.showBox.MediaPlayer.settings.volume = args;
break;
case "11":
window.open("inchen/html/about.html","课程简介");
break;
case "22":
window.open("inchen/html/teacher.html","教师简介");
break;
case "33":
window.open("inchen/html/text.html#"+args,"详细文字");
break;
case "44":
window.open("inchen/html/donwload.html","资料下载");
break;
case "55":
window.open("inchen/html/help.html","帮助");
break;
case "66":
window.top.close();
break;
case "77":
if(confirm('您确定要退出学习吗?')) window.top.close();
break;
}
}

function runComm(num){
if(parent.type == 3){
isVideo = num;
if(isVideo == 1){
}else{
mediaHeight = 0;
}
var comm="<body bgColor="transparent"><iframe id="showBox" name="showBox" src="cont.html" frameborder="no" scrolling="no" noresize="noresize" width=""+mediaWidth+"" height=""+mediaHeight+"" marginwidth="0"></iframe></body>"
window.aicc_cont.document.write(comm);
}
}
window.document.writeln("<div id=Layer1 style="Z-INDEX: -1; LEFT:0px; TOP:0px; WIDTH: 800px; HEIGHT: 600px; POSITION: absolute;">");
loadPage("inchen/core3.swf");
window.document.writeln("</div>");
window.document.writeln("<div id=Layer2 style="Z-INDEX: 1; LEFT:"+parent.xxLayer+"px; TOP:"+parent.yyLayer+"px; POSITION: absolute;">");
window.document.writeln("<iframe src="comm.html" name="aicc_cont" id="aicc_cont" width="280" height="200" frameborder="no" scrolling="no" noresize="noresize" allowtransparency="true"></iframe>");
window.document.writeln("</div>");
</SCRIPT>
查看网页脚本后发现此段JS代码应该是关键
尤其是:
post = setInterval("sendtime()",1000);
function sendtime(){
if(isToswf == 1){
var currtime = parseInt(window.aicc_cont.showBox.MediaPlayer.Controls.currentPosition);
var totltime = parseInt(window.aicc_cont.showBox.MediaPlayer.CurrentMedia.Duration);
doLMSSetValue( "cmi.core.lesson_location" , currtime*1000 );

if(currtime >= totltime){
courseStatus = "completed";
doLMSSetValue( "cmi.core.lesson_status" , "completed" );
}
}
}
对JS熟悉的坛友请问应该如何对var currtime 这个变量赋值以达到欺骗效果呢?
 楼主| 发表于 2011-12-14 01:32:36 | 显示全部楼层
另外网上找到一段破解代码,但目前已经失效,提供参考:
javascript:alert(window.document.getElementById("studyLocation").value=9234000)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-4 02:06 , Processed in 0.083106 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表