用自己的IP他不给数据,用另一个IP可以抓,但就是抓不到Post。。。
换了几个版本,和几个网站,都一样。。。
有哪位耐心的老大能帮我解决下这个问题,谢谢了。搞了一个晚上,把那个明教教主的视频又看了一通
结果要用百兆网卡才能用那个强大的Sniffer..又搞了几小时。。闷。。
在把问题说下,不是说抓到Post数据开头会显示么,把所有+号看完就没发现它。。
开头全是HTTP。。帮我远程看下也行,应该不会是我网卡或者IP设置的问题吧。。求教了。。
7 个解决方案
#1
不是所有数据都是用POST发送,更多的是用GET发送和接收的
#2
试试HttpAnalyzerStdV4呢?!
#3
恩,但是我是跟着一篇教程来的,人家都抓得到,我奇怪我为什么抓不到。所以就苦恼在这。。我要换个思路考虑下了。。谢谢指点。
#4
抓包 我觉得用 FIREFOX的firebug 来的快的多 而且每步都看的很清楚 包括 ajax
#5
Option Explicit
Dim strUrl As String
Dim strLj As String
Dim PassData As String
Dim Pas As String
Dim hIS As Long
Dim hIC As Long
Dim hOR As Long
Dim bRet As Long
Dim iRetVal As Long
Dim sRe As Long
Dim sBuff As String * 2048
Dim sHead As String
Private Sub Command1_Click()
strUrl = Text3.Text
strLj = Text4.Text
Pas = Text5.Text
PassData = "txtTianhuaban=" & Pas & "&Submit=%C9%FD%BC%B6"
sHead = "Content-Type: application/x-www-form-urlencoded"
hIS = InternetOpen("MiSi", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hIC = InternetConnect(hIS, strUrl, INTERNET_DEFAULT_HTTP_PORT, vbNullString, "HTTP/1.1", INTERNET_SERVICE_HTTP, 0, 0)
hOR = HttpOpenRequest(hIC, "post", strLj, vbNullString, vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
bRet = HttpAddRequestHeaders(hOR, sHead, Len(sHead), HTTP_ADDREQ_FLAG_REPLACE Or HTTP_ADDREQ_FLAG_ADD)
iRetVal = HttpSendRequest(hOR, vbNullString, 0, PassData, Len(PassData))
sRe = HttpQueryInfo(hOR, 22, ByVal sBuff, Len(sBuff), 0)
Text1.Text = sBuff
End Sub
Private Sub Command2_Click()
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text1.Text = "标头"
Text2.Text = "文本"
End Sub
Private Sub Command4_Click()
strUrl = Text3.Text
strLj = Text4.Text
Pas = Text5.Text
PassData = "txtTianhuaban=" & Pas ' & "&Submit=%C9%FD%BC%B6"
sHead = "Content-Type: application/x-www-form-urlencoded"
hIS = InternetOpen("MiSi", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hIC = InternetConnect(hIS, strUrl, INTERNET_DEFAULT_HTTP_PORT, vbNullString, "HTTP/1.1", INTERNET_SERVICE_HTTP, 0, 0)
hOR = HttpOpenRequest(hIC, "post", strLj, vbNullString, vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
bRet = HttpAddRequestHeaders(hOR, sHead, Len(sHead), HTTP_ADDREQ_FLAG_REPLACE Or HTTP_ADDREQ_FLAG_ADD)
iRetVal = HttpSendRequest(hOR, vbNullString, 0, PassData, Len(PassData))
sRe = InternetReadFile(hOR, sBuff, 2048, Len(sBuff))
Text2.Text = sBuff
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = -1
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
Cancel = 0
Unload Me
End Sub
Dim strUrl As String
Dim strLj As String
Dim PassData As String
Dim Pas As String
Dim hIS As Long
Dim hIC As Long
Dim hOR As Long
Dim bRet As Long
Dim iRetVal As Long
Dim sRe As Long
Dim sBuff As String * 2048
Dim sHead As String
Private Sub Command1_Click()
strUrl = Text3.Text
strLj = Text4.Text
Pas = Text5.Text
PassData = "txtTianhuaban=" & Pas & "&Submit=%C9%FD%BC%B6"
sHead = "Content-Type: application/x-www-form-urlencoded"
hIS = InternetOpen("MiSi", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hIC = InternetConnect(hIS, strUrl, INTERNET_DEFAULT_HTTP_PORT, vbNullString, "HTTP/1.1", INTERNET_SERVICE_HTTP, 0, 0)
hOR = HttpOpenRequest(hIC, "post", strLj, vbNullString, vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
bRet = HttpAddRequestHeaders(hOR, sHead, Len(sHead), HTTP_ADDREQ_FLAG_REPLACE Or HTTP_ADDREQ_FLAG_ADD)
iRetVal = HttpSendRequest(hOR, vbNullString, 0, PassData, Len(PassData))
sRe = HttpQueryInfo(hOR, 22, ByVal sBuff, Len(sBuff), 0)
Text1.Text = sBuff
End Sub
Private Sub Command2_Click()
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text1.Text = "标头"
Text2.Text = "文本"
End Sub
Private Sub Command4_Click()
strUrl = Text3.Text
strLj = Text4.Text
Pas = Text5.Text
PassData = "txtTianhuaban=" & Pas ' & "&Submit=%C9%FD%BC%B6"
sHead = "Content-Type: application/x-www-form-urlencoded"
hIS = InternetOpen("MiSi", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hIC = InternetConnect(hIS, strUrl, INTERNET_DEFAULT_HTTP_PORT, vbNullString, "HTTP/1.1", INTERNET_SERVICE_HTTP, 0, 0)
hOR = HttpOpenRequest(hIC, "post", strLj, vbNullString, vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
bRet = HttpAddRequestHeaders(hOR, sHead, Len(sHead), HTTP_ADDREQ_FLAG_REPLACE Or HTTP_ADDREQ_FLAG_ADD)
iRetVal = HttpSendRequest(hOR, vbNullString, 0, PassData, Len(PassData))
sRe = InternetReadFile(hOR, sBuff, 2048, Len(sBuff))
Text2.Text = sBuff
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = -1
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
Cancel = 0
Unload Me
End Sub
#6
关注本帖的讨论.
#7
哇。看代码5楼是高手咯。。
我把你的代码复制到VB。。有些地方说变量未定义。。
谢谢了,辛苦了。写了这么长代码。。我留着把我的软件做好再看。。
我把你的代码复制到VB。。有些地方说变量未定义。。
谢谢了,辛苦了。写了这么长代码。。我留着把我的软件做好再看。。
#1
不是所有数据都是用POST发送,更多的是用GET发送和接收的
#2
试试HttpAnalyzerStdV4呢?!
#3
恩,但是我是跟着一篇教程来的,人家都抓得到,我奇怪我为什么抓不到。所以就苦恼在这。。我要换个思路考虑下了。。谢谢指点。
#4
抓包 我觉得用 FIREFOX的firebug 来的快的多 而且每步都看的很清楚 包括 ajax
#5
Option Explicit
Dim strUrl As String
Dim strLj As String
Dim PassData As String
Dim Pas As String
Dim hIS As Long
Dim hIC As Long
Dim hOR As Long
Dim bRet As Long
Dim iRetVal As Long
Dim sRe As Long
Dim sBuff As String * 2048
Dim sHead As String
Private Sub Command1_Click()
strUrl = Text3.Text
strLj = Text4.Text
Pas = Text5.Text
PassData = "txtTianhuaban=" & Pas & "&Submit=%C9%FD%BC%B6"
sHead = "Content-Type: application/x-www-form-urlencoded"
hIS = InternetOpen("MiSi", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hIC = InternetConnect(hIS, strUrl, INTERNET_DEFAULT_HTTP_PORT, vbNullString, "HTTP/1.1", INTERNET_SERVICE_HTTP, 0, 0)
hOR = HttpOpenRequest(hIC, "post", strLj, vbNullString, vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
bRet = HttpAddRequestHeaders(hOR, sHead, Len(sHead), HTTP_ADDREQ_FLAG_REPLACE Or HTTP_ADDREQ_FLAG_ADD)
iRetVal = HttpSendRequest(hOR, vbNullString, 0, PassData, Len(PassData))
sRe = HttpQueryInfo(hOR, 22, ByVal sBuff, Len(sBuff), 0)
Text1.Text = sBuff
End Sub
Private Sub Command2_Click()
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text1.Text = "标头"
Text2.Text = "文本"
End Sub
Private Sub Command4_Click()
strUrl = Text3.Text
strLj = Text4.Text
Pas = Text5.Text
PassData = "txtTianhuaban=" & Pas ' & "&Submit=%C9%FD%BC%B6"
sHead = "Content-Type: application/x-www-form-urlencoded"
hIS = InternetOpen("MiSi", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hIC = InternetConnect(hIS, strUrl, INTERNET_DEFAULT_HTTP_PORT, vbNullString, "HTTP/1.1", INTERNET_SERVICE_HTTP, 0, 0)
hOR = HttpOpenRequest(hIC, "post", strLj, vbNullString, vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
bRet = HttpAddRequestHeaders(hOR, sHead, Len(sHead), HTTP_ADDREQ_FLAG_REPLACE Or HTTP_ADDREQ_FLAG_ADD)
iRetVal = HttpSendRequest(hOR, vbNullString, 0, PassData, Len(PassData))
sRe = InternetReadFile(hOR, sBuff, 2048, Len(sBuff))
Text2.Text = sBuff
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = -1
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
Cancel = 0
Unload Me
End Sub
Dim strUrl As String
Dim strLj As String
Dim PassData As String
Dim Pas As String
Dim hIS As Long
Dim hIC As Long
Dim hOR As Long
Dim bRet As Long
Dim iRetVal As Long
Dim sRe As Long
Dim sBuff As String * 2048
Dim sHead As String
Private Sub Command1_Click()
strUrl = Text3.Text
strLj = Text4.Text
Pas = Text5.Text
PassData = "txtTianhuaban=" & Pas & "&Submit=%C9%FD%BC%B6"
sHead = "Content-Type: application/x-www-form-urlencoded"
hIS = InternetOpen("MiSi", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hIC = InternetConnect(hIS, strUrl, INTERNET_DEFAULT_HTTP_PORT, vbNullString, "HTTP/1.1", INTERNET_SERVICE_HTTP, 0, 0)
hOR = HttpOpenRequest(hIC, "post", strLj, vbNullString, vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
bRet = HttpAddRequestHeaders(hOR, sHead, Len(sHead), HTTP_ADDREQ_FLAG_REPLACE Or HTTP_ADDREQ_FLAG_ADD)
iRetVal = HttpSendRequest(hOR, vbNullString, 0, PassData, Len(PassData))
sRe = HttpQueryInfo(hOR, 22, ByVal sBuff, Len(sBuff), 0)
Text1.Text = sBuff
End Sub
Private Sub Command2_Click()
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text1.Text = "标头"
Text2.Text = "文本"
End Sub
Private Sub Command4_Click()
strUrl = Text3.Text
strLj = Text4.Text
Pas = Text5.Text
PassData = "txtTianhuaban=" & Pas ' & "&Submit=%C9%FD%BC%B6"
sHead = "Content-Type: application/x-www-form-urlencoded"
hIS = InternetOpen("MiSi", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hIC = InternetConnect(hIS, strUrl, INTERNET_DEFAULT_HTTP_PORT, vbNullString, "HTTP/1.1", INTERNET_SERVICE_HTTP, 0, 0)
hOR = HttpOpenRequest(hIC, "post", strLj, vbNullString, vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
bRet = HttpAddRequestHeaders(hOR, sHead, Len(sHead), HTTP_ADDREQ_FLAG_REPLACE Or HTTP_ADDREQ_FLAG_ADD)
iRetVal = HttpSendRequest(hOR, vbNullString, 0, PassData, Len(PassData))
sRe = InternetReadFile(hOR, sBuff, 2048, Len(sBuff))
Text2.Text = sBuff
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = -1
InternetCloseHandle (hIS)
InternetCloseHandle (hIC)
InternetCloseHandle (hOR)
InternetCloseHandle (bRet)
InternetCloseHandle (iRetVal)
InternetCloseHandle (sRe)
Cancel = 0
Unload Me
End Sub
#6
关注本帖的讨论.
#7
哇。看代码5楼是高手咯。。
我把你的代码复制到VB。。有些地方说变量未定义。。
谢谢了,辛苦了。写了这么长代码。。我留着把我的软件做好再看。。
我把你的代码复制到VB。。有些地方说变量未定义。。
谢谢了,辛苦了。写了这么长代码。。我留着把我的软件做好再看。。