【小組作業】Userdictionary maker 文檔說明
- 2019 年 10 月 7 日
- 筆記
本文作者:超級小菜雞(Ms08067實驗室Python滲透小組成員)
簡介
這是一個基於python3開發的字典生成器。構想是依據國人的習慣生成一份字典,目前由於本人太菜,還找不到一個良好的方法來生成,文件讀寫也是個大問題。
版本
初版V 0.0.1
這個版本, 怎麼說呢, 我自己寫的都有點暈,不過相較於分支"master", "dict-v1","dict-v2"來講, 這個是寫成的一版!
主要是前兩版沒想好, 導致寫的時候…Duang了…
本版的用法
幫助文檔中這樣寫:
cmd.__doc__ = r」」」
usage:
-h ---- (same as option [--help])
[--help] show help info.
-n ---- (same as [--name=])
[--name=] target name input.
-d ---- (same as option [--date=])
[--short-date] password with short date. (e.g. 1231 ( 31st Dec. ))
[--middle-date] password with middle date. (e.g. 001231 ( 31st Dec. 2000 ))
[--long-date] password with long date. (e.g. 200001231 ( 31st Dec. 2000 ))
[--date=] input target date. (e.g. 2000-12-31 (format must YYYY-MM-DD) )
[--year=] when target date is unknown, use this arg can generate the whole date of this year.
-f ---- (same as option [--force])
[--force] force to write an existed (or not) file.
-c ---- (same as option [--default-chars])
[--default-chars] generate password with default characters. '.'
[--specify-chars=] generate password with specified characters.
[--none-chars] generate password with none character.
-p ---- (same as option [--weak-passwd])
[--weak-passwd] generate password with weak password.
「」」
大致是這樣:
-h, --help
: 用於顯示幫助界面-n, --name=
: 用於輸入目標姓名, 單字用'-'分隔, 姓和名用'–'分隔, 如"zhang-sun–wu-ji"-d, --date=
: 用於輸入日期, 精確到具體天, 如"1900-01-01"-f, --force
: 用於字典存在時, 強制覆蓋字典-c, --default-chars
: 用於使用默認的字符, '.'-p, --weak-passwd
: 用於添加TOP100 弱口令--short-date
: 用於生成短日期, 如'0101'--middle-date
: 用於生成中等日期, 如'000101'--long-date
: 用於生成長日期, 如'19000101'--year=
: 用於接收年份, 當目標生日未知時, 啟用此選項會更方便一點, 如'1900'--specify-chars=
: 用於接收自定義密碼符號集, 如'.,/'--none-chars
: 用於生成字典時, 不使用符號
emmm, 本人還是很菜, 也沒啥開發經驗, 總之也只能湊合著看了哈哈!如果有影響使用的bug,可以給我發郵件。
郵箱地址:[email protected]
使用說明
Windows版
1. 配置好Python 3 (添加到PATH環境變量中, 確保CMD可以直接調用Python 3)
2. cd到目錄中, 如果有安裝git, 可以使用命令:
(1) git clone -b dict-v3
https://gitee.com/Happy-Rabbit/user-dict-maker.git
3. 進入文件夾中, 按住<Shift>加鼠標右鍵, 單擊」在此處打開命令行/powershell窗口」
4. 輸入:
(1) 輸入」python -V
」檢測下是否是Python3.*
① 是: -> (5)
② 否: -> (2)
(2) 去Python官網(或者騰訊軟件管家)下載Python3
(3) 安裝時選擇添加到PATH,安裝
(4) 安裝完成後, 查看版本
① 是: Python3.* -> (5)
② 否: 將PATH里的順序調到上面(具體請自行百度)
(5) 控制台輸入: 「python main.py -h
」查看幫助
(6) 根據幫助信息進行操作
5. 完成
Linux / macOS
1.
輸入 sudo <包管理器> install python3 git
2. 輸入python3 -V
3. 如果自己經常使用Python3
(1) vim $HOME/.bashrc
(2) 添加 alias python=」python3」
到最下面空白行
(3) source $HOME/.bashrc
4. 輸入
(1) git clone -b dict-v3
https://gitee.com/Happy-Rabbit/user-dict-maker.git
5. 此時進入當前目錄下的user-dict-maker
文件夾
6. 輸入python3main.py -h
查看命令幫助
7. 完成
示例

(gitclone 操作)
輸入: git clone -bhttps://gitee.com/Happy-Rabbit/user-dict-maker.git

(顯示幫助信息)
輸入: python3 main.py -h

(姓名+日期+長日期+中等日期)
輸入: python3 main.py -n」x--x-x」 -d 「yyyy-mm-dd」--long-date --middle-date

(年份+姓名+強制替換)
輸入: python3 main.py --name=」x--x-x」 --year=YYYY--force
代碼網址:
https://gitee.com/Happy-Rabbit/user-dict-maker/tree/dict-v3/