-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.html
65 lines (65 loc) · 9.77 KB
/
README.html
1
2
3
4
5
6
7
8
9
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
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<meta charset="utf-8">
<!--markdown .md to HTML conversion courtesy of https://markdowntohtml.com/ -->
<html lang="en">
<head>
<title>README passphrase</title>
</head>
<h1 id="passphrases-project">Passphrases Project</h1>
<p><img src="images/passphrase_logo.png" alt="passphrase logo"></p>
<p>Python GUI scripts and cross-platform executables to easily make secure passphrases and passcodes.</p>
<p>A potential problem with some on-line passcode and passphrase generators is that they are on-line. Here is something that can be run locally and privately either as a standalone program on <strong>Windows</strong> and <strong>MacOS</strong> or as a Python script from a Terminal window in <strong>Windows</strong>, <strong>MacOS</strong>, or <strong>Linux</strong>. </p>
<p>Words and character strings are randomized with Python's Random class using a random seed: random.Random(random.random()). For more information, see <a href="https://docs.python.org/3/library/random.html">https://docs.python.org/3/library/random.html</a></p>
<p>The different pass-strings generated provide options for compliance with a range of website and application requirements.
Suggestions for improvement are welcome, especially ideas to access the system dictionary on Windows.</p>
<p><img src="images/passphrase_scrnshot.png" alt="passphrase GUI"></p>
<h4 id="requirements">Requirements</h4>
<p>Developed with Python 3.8-3.9, under Ubuntu 20.04, Windows 10, and MacOS 10.13.6 & 11.1. The standalone programs do not need Python installation.
Running from the command line requires Python 3.6 or later, preferably 3.7 or later. A recent tkinter graphics module of Python is required, which is included in Python 3.7+; earlier versions will require installation of Tk/Tcl. Recent Python packages can be downloaded from <a href="https://wwwthon.org/downloads/">https://wwwthon.org/downloads/</a>.</p>
<h2 id="usage">Usage</h2>
<p>To get started, download the repository package by clicking on the Code download button and select the Download ZIP option, or use git commands if you are comfortable with that. Unzipping (extracting) the zip file will create a passphrases-main directory. Once the program is launched (see below), click Generate! to make passphrases and passcodes. Results can be copied. Passphrase and passcode lengths are set by the user. Usage details for different operating systems are outlined below.</p>
<p>Quick start: Run the Python script passphrase from the same folder as the 'wordlists' directory.</p>
<h3 id="system-specific-implementations">System-specific Implementations</h3>
<h4 id="passphrase">passphrase</h4>
<p>The passphrase script is generally launched from a Terminal command line. Running the script brings up an interactive graphics window to generate passphrases and passcode strings. On <strong>MacOS</strong> and <strong>Linux</strong> there is an option to create passphrases using either the system dictionary or different wordlists. On <strong>Windows</strong>, only the system dictionary is not available. The number of words available for each wordlist can be seen to the right of the selected wordlist and from the pulldown menu: <code>Help -> What's going on here?</code>.</p>
<p>For <strong>Windows</strong>, the folder, <code>wordlists</code>, included in this distribution, must be kept in the passphrase-generate-main folder. Launch a Terminal window opened from the passphrases-main folder and enter the command <code>python3 passphrase</code> or <code>python passphrase</code> or <code>py passphrase</code>, depending on your system environment. </p>
<p>For <strong>Linux</strong> or <strong>MacOS</strong>, the <code>wordlists</code> directory also needs to be in the passphrases-main folder, but its use for generating passphrases is optional. The default source for words is your system dictionary. Launch the script from a Terminal window opened within the passphrases-main folder using the command
<code>python3 passphrase</code> or <code>./passphrase</code> On <strong>MacOS</strong>, a Python Launcher is bundled with some Python installations and can be configured to run passphrase by double-clicking on it.</p>
<h2 id="stand-alone-versions-no-python-installation-needed-">Stand-alone versions (no Python installation needed!)</h2>
<h4 id="passphrase-app-macos">Passphrase.app - MacOS</h4>
<p>A <strong>MacOS</strong> standalone of passphrase. Download an extract the GitHub distribution package as outlined above. Inside passphrase-generate-main/Standalone_distributables folder is <code>Passphrase_mac.dmg</code>. Mount that disk image (just double click and follow the prompts) to install <code>Passphrase.app</code>, which you can place where you like. Alternatively, the disk image can be downloaded directly from <a href="https://github.com/csecht/passphrase-generate/raw/main/Standalone_distributables/Passphrase_mac.dmg">https://github.com/csecht/passphrase-generate/raw/main/Standalone_distributables/Passphrase_mac.dmg</a>.</p>
<p>The first time you try to open the app, however, you will get a message saying it can't be opened. Click "Cancel", go into System Preferences > Security & Privacy, click the "Open anyway" button, then "Open". It does not open initially because it was not downloaded from the Apple Store or from a recognized Apple developer. </p>
<p>The process of opening apps from unrecognized Apple developers can be somewhat streamlined by re-establishing (as of MacOS Sierra) the "Allow apps downloaded from: Anywhere" option in Security & Preferences. Do this with the following command line in the Terminal: <code>sudo spctl --main-disable</code>. Using the Finder 'Open' command directly on the unzipped app in its folder, can also somewhat reduce the hassle of navigating through System Preferences; once that is done, then any alias to the app should work smoothly. With any of these "fixes", you will, initially and appropriately, be prompted by the MacOS Gatekeeper to open the app.</p>
<p>Passphrase.app was created with py2app from <a href="https://pypi.org/project/pyinstaller/">https://pypi.org/project/pyinstaller//</a> .</p>
<h4 id="passphrase-exe-windows">Passphrase.exe - Windows</h4>
<p>A <strong>Windows</strong> standalone of passphrase. Download an extract the GitHub distribution package as outlined above. Inside the <code>passphrase-generate-main/Standalone_distributables</code> folder is <code>Passphrases_win.zip</code>, an archive of the Passphrases.exe program. This distributable file can be downloaded directly from <a href="https://github.com/csecht/passphrase-generate/raw/main/Standalone_distributables/Passphrases_win.zip">https://github.com/csecht/passphrase-generate/raw/main/Standalone_distributables/Passphrases_win.zip</a>. Select Extract All for that ZIP file. The .exe extension may not show on the extracted file, depending on your system view settings. Double-click Passphrases.exe to launch. </p>
<p>You will likely first need to permit Windows to open it: from the pop-up warning, click on "more info", then follow the prompts to open the program. The executable file can be placed anywhere. </p>
<p>Passphrases.exe was created with PyInstaller available from <a href="https://pypi.org/project/pyinstaller/">https://pypi.org/project/pyinstaller/</a> . </p>
<h4 id="passphrase-linux">Passphrase - Linux</h4>
<p>A <strong>Linux</strong> standalone of the passphrase python script is available. Download and extract the GitHub distribution package as outlined above. Inside passphrase-generate-main/Standalone_distributables folder is <code>Passphrase_linux.zip</code>. Alternatively, the archived program can be downloaded directly from <a href="https://github.com/csecht/passphrase-generate/raw/main/Standalone_distributables/Passphrase_linux.zip">https://github.com/csecht/passphrase-generate/raw/main/Standalone_distributables/Passphrase_linux.zip</a> . Extract the archive and move the Passphrase executable file to a convenient location; double-click to launch. You may need to change its permissions to allow it to launch.</p>
<p>The Passphrase single file executable was created with PyInstaller available from <a href="https://pypi.org/project/pyinstaller/">https://pypi.org/project/pyinstaller/</a></p>
<h2 id="wordlist-sources-">Wordlist sources:</h2>
<p>Optional wordlists were derived from texts obtained from these sites:</p>
<ul>
<li><a href="https://www.gutenberg.org">https://www.gutenberg.org</a></li>
<li><a href="https://www.archives.gov/founding-docs/constitution-transcript">https://www.archives.gov/founding-docs/constitution-transcript</a></li>
<li><a href="https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt">https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt</a></li>
</ul>
<p>The <code>parse_wordlist</code> script from <a href="https://github.com/csecht/make_wordlist">https://github.com/csecht/make_wordlist</a> was used to create the optional wordlists used here. That repository also includes source text files for the wordlists:</p>
<ul>
<li>Don Quixote, by Cervantes (Spanish)</li>
<li>EFF large wordlist (English)</li>
<li>Frankenstein, or The Modern Prometheus, by Shelly (English)</li>
<li>Les Misérables, by Hugo (French)</li>
<li>The Story of the Stone, or 红楼梦, by 曹雪芹 (Chinese)</li>
<li>United States Constitution (English)</li>
</ul>
<h2 id="tips-">Tips:</h2>
<p>The program places no limits on the length of pass-strings, though your system memory might. The window can be dragged to view longer results up to a limit; results exceeding that limit can still be copied and pasted.</p>
<h2 id="known-issues-">Known issues:</h2>
<p>In MacOS, using F1 to increase font size in any pop-up window inserts a "?"/unknown character in the text when cursor in the text field. </p>
<h2 id="development-plans-">Development plans:</h2>
<ul>
<li>Use Windows system dictionary</li>
</ul>
</html>