Ò»°ãÀ´Ëµ,ISA 2004×÷·À»ðǽ.ÏÂÃæµÄ¿Í»§»ú¶¼ÊÇwindows.Èç¹ûÓиö±ðlinux¿Í»§¶ËÒ²Ïëͨ¹ýhttp´úÀí·½Ê½ÉÏÍø.ÔÚNTLMÑéÖ¤ÕâÀï¾Í»á¿¨×¡.
½ñÌìÏë¸üÐÂÐéÄâ»úÀïÃæµÄ³ÌÐò.ÉèÖÃhttp_proxy
#http_proxy="http://user:passwd@192.168.1.224:8080"
#export http_proxy
È»ºóyum install xxx
¾ÓÈ»±¨HTTP ERROR 400 (Bad Request)
ºóÀ´ÔÚÎÒµÄwindows xpÉϰ²×°ÁËÒ»¸öccproxy,È»ºóÓÉccproxyÖÐÉèÖöþ¼¶´úÀí,ÌîÉϹ«Ë¾µÄISA·À»ðǽ
µÄIP,¶Ë¿Ú,Óû§Ãû,ÃÜÂë,È»ºó°ÑÐéÄâ»úÖеÄlinuxµÄhttp_proxyÉèÖóÉwinxpµÄccproxyµÄipºÍ¶Ë¿Ú,ÔÙ
À´yum.okÁË.
#export http_proxy="192.168.1.159:808"
yum °²×°Ò»¸ölynx,×Ö·û½çÃæµÄä¯ÀÀÆ÷,¿´¿´ÎªÉ¶²»ÄܸüÐÂ
#yum install lynx
#lynx www.baidu.com
Looking up www.baidu.com first
Looking up 192.168.1.224:8080
Making HTTP connection to 192.168.1.224:8080
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Invalid header 'Proxy-Authenticate: Negotiate'
Alert!: Invalid header 'Proxy-Authenticate: Kerberos'
Alert!: Invalid header 'Proxy-Authenticate: NTLM'
Alert!: Proxy authorization required -- retrying
Retrying with proxy authorization information.
....
Can't Access `http://www.baidu.com/'
Alert!: Unable to access document.
àÞ.±¨NTLM´íÎó,ÔÀ´ÊÇÑéÖ¤µÄÎÊÌâ.
baiduÖ®,ÕÒµ½Ò»¸ö½â¾ö°ì·¨.
ʹÓÃntlmaps ´©? msproxy ,Linux ÉÏ?²»Óóî
NTLM ´úÀí·þ?Æ÷
1) ʲ?ÊÇ NTLM Authorization Proxy Server
'NTLM Authorization Proxy Server'ÊÇÒ»ÀàËÆÓÚ´úÀíµÄÈí¼þ.ËüÄܹ»Ê¹ÓÃ
MS proxy·þÎñÆ÷ÈÏ֤ģʽ. ËüÐ޸ĿÍ?¶ËÊý¾Ý?Çó°üÖеÄһЩֵ,ʹ?ÇóÀàËÆ
MS IE·¢³ö.³ÌʽÊÇÓÃPython?ÑÔдµÄ .
½ÓÏÂÀ´ºÃ°ì,²Î¿¼ÕâÆªÎÄÕÂ,ÏÂÔØ,°²×°.È»ºóÅäÖÃ,È»ºó²âÊÔ.okÁË.
ÏÂÔØÖ®ºó£¬Ö´ÐÐ
$ tar zxvf ntlmaps-0.9.9.tar.gz
ÕÒµ½server.cfg£¬ÐÞ¸ÄËü
[GENERAL]
LISTEN_PORT:5865 # ±¾»ú¼àÌý¶Ë¿Ú
PARENT_PROXY:192.168.1.224 # ISA·þÎñÆ÷
PARENT_PROXY_PORT:8080 # ISA·þÎñÆ÷¶Ë¿Ú
PARENT_PROXY_TIMEOUT:15
ALLOW_EXTERNAL_CLIENTS:0
FRIENDLY_IPS:
URL_LOG:0
MAX_CONNECTION_BACKLOG:5
[CLIENT_HEADER]
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel,
application/msword, application/vnd.ms-powerpoint, */*
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
[NTLM_AUTH]
NT_HOSTNAME:yw-04 # Ö÷»úÃû
NT_DOMAIN:chinabank # Óò
USER:test# ISA´úÀíµÄÓû§Ãû
PASSWORD:test# ISA´úÀíµÄÃÜÂë
LM_PART:1
NT_PART:0
NTLM_FLAGS: 06820000
NTLM_TO_BASIC:0
[DEBUG]
DEBUG:0
BIN_DEBUG:0
SCR_DEBUG:0
AUTH_DEBUG:0
ÅäÖÃÍêºó±£´æ£¬Æô¶¯main.py£º
# ./main.py &
»òÕß
# python main.py &
È»ºó°ÑlinuxµÄhttp_proxy¸Ä³É127.0.0.1:5865
#http_proxy="http://127.0.0.1:5865"
#export http_proxy
ÔÙÀ´ÉÏÍø¸üгÌÐò.okÁË,Èç¹û²»ÐÐ,Ôò³¢ÊÔÐÞ¸Äserver.cfgÖеÄntlmÑé֤ģʽ.
×ܽá.ISAµÄNTLMÑéÖ¤ÕæÊÇÌÖÑá.
Èç¹ûÆô¶¯µÄʱºò±¨ÕâÑùÒ»¸ö´íÎó.
ERROR: Unable to get the IP address of this machine. This is not a fatal problem, but
may cause problems for you using this proxy in some scenarios."
googleÎÞ½á¹û.ºóÀ´¿´Ô´´úÂëlib/config_affairs.py
ÖÐÓÐ
hostname = socket.gethostname()
¿´À´ÊÇhostname²»¶Ô.
#hostname
bogon
ÏÔʾµÄºÍ/etc/hostsÀïÃæ²»Ò»Ñù,
ÔËÐÐ
#hostname localhost
È»ºóÔÙÔËÐÐ.Õâ´Î²»±¨´íÁË.