2011年5月6日 星期五

dump webpage

(1) telnet
[root@HTS099 burn]#telnet [target-ip] 80
[root@HTS099 burn]#telnet> GET [folder/page.htm] HTTP/1.1
[root@HTS099 burn]#telnet> Host:[source-ip or host name]
[root@HTS099 burn]#telnet> Authorization: Basic [ecrypted account and password]

encrypted process:
[root@HTS099 burn]# python
Python 2.6.5 (r265:79063, Jul 14 2010, 11:36:05)
[GCC 4.4.4 20100630 (Red Hat 4.4.4-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> print base64.b64encode(":") 帳號密碼為空白
Og==
>>> print base64.b64encode("acct:pass") .htaccess的帳號acct密碼pass
YWNjdDpwYXNz
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>>
[root@HTS099 burn]#

Example:
[root@PHPLIST ~]# telnet 192.168.1.254 80
Trying 192.168.1.254...
Connected to 192.168.1.254 (192.168.1.254).
Escape character is '^]'.
GET /status.htm HTTP/1.1
Host:192.168.1.100
Authorization: Basic Og==

HTTP/1.0 200 Okay
Connection: close
Server: IPShare6.0
MIME-version: 1.0
Pragma: no-cache
Content-Type: text/html
Content-Length: 5210

<html>
<head>
<title>Connection Status</title>
<script type="text/javascript" language="JavaScript">
:
:
:Connection closed by foreign host.

(2) wget
wget --http-user '' --http-password '' http://192.168.1.254/status.htm -O /root/status.htm
wget --http-user 'acct' --http-password 'pass' http://192.168.1.254/status.htm -O /root/status.htm

沒有留言:

張貼留言

文章分類