曾經大量購買撥號vps 來刷IP,買vps 會遇到那種僞撥號vps.html
from wsgiref.simple_server import make_server def application(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) body = '<h1>Hello, %s!</h1>' % (environ['PATH_INFO'][1:] or 'web') return [body.encode('utf-8')] port=80 httpd = make_server('',port,application) print('Serving HTTP on port %s......'%port) httpd.serve_forever()
就是那個IP並未真實的分配到那臺機器上面,你只是出口ip 是這個ip,人家幫忙轉發了一下,這樣的爲撥號vps,是沒法建站的。python
鑑別IP是否是真的爲本機全部。辦法很簡單:web
Liunx 自帶python,python自帶wsgiapp
幾行腳本就能實現一個簡單的web服務,而後訪問就知道這個Ip開出來的地址,會不會到這臺機器上了
code