Skip to content

Commit

Permalink
add so file for now
Browse files Browse the repository at this point in the history
  • Loading branch information
7aman committed Sep 10, 2019
1 parent 825f142 commit d7be263
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 4 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include README.md
include LICENSE
include wdpass/py3_sg.so
76 changes: 75 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,75 @@
# wdpass
# wdpass
WD Passport Ultra Complete Utilities for Linux.

<h1> Intro </h1>

This script let you unlock, change password and erase Western Digital Passport devices on Linux platform.

<h1> Install </h1>

In order to run this script you need to install "lsscsi"
```
sudo dbf install lsscsi
pip3 install wdpass --user
```



<h1> Usage </h1>

Run script as root.

There are few options:
```
-h, --help show this help message and exit
```
Lists all possible arguments.

```
-s, --status Check device status and encryption type
```
Get device encryption status and cipher suites used.
```
-u, --unlock Unlock
```
You will be asked to enter the unlock password. If everything is fine device will be unlocked.

```
-us, --unlock_with_saved_passwd Unlock with the password saved
```
Unlock using the saved password. If everything is fine device will be unlocked.

```
-sp, --save_passwd Save password
```
When unlock password, it will save user password to passwd.bin, so you can use "-us" for next time to auto unlock.

```
-m, --mount Enable mount point for an unlocked device
```
After unlock, your operating system still thinks that your device is a strange thing attached to his usb port and he don't know how to manage. You need this option to force the O.S. to rescan the device and handle it as a normal external usb harddrive.

```
-c, --change_passwd Change (or disable) password
```
This option let you to encrypt your device, remove password protection and change your current password.
If device is "without lock" and you want it to be password protect leave the "OLD password" field empty and choose insert the new password.
If the device is password protected and you want to be as a normal unencrypted device, inser the old password and leave the "NEW password" field empty.
If you only want to change password do it as usual.

```
-e, --erase Secure erase device
```
"Erase" the device. This will remove the internal key associated to you password and all your data will be unaccessible. You will also lose your partition table and you will need to create a new one (you can use fdisk and mkfs).

```
-d DEVICE, --device DEVICE Force device path (ex. /dev/sdb). Usually you don't need this option.
```
The script will try to auto detect the current device path of your WD Passport device.
If something is wrong or you want to manually specify the device path yourself you can use this option.

<h1>Disclaimer</h1>
I based my research on Dan Lukes (FreeBSD version) and KenMacD (very simple unlocker) works.
I'm in no way sponsored by or connected with Western Digital.
Use any of the information contained in this repository at your own risk. I accept no
responsibility.
5 changes: 3 additions & 2 deletions wdpass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
import subprocess

try:
import py_sg
except ImportError:
import py3_sg as py_sg
except ImportError as e:
print(e)
print("You need to install the 'py_sg' module.")
sys.exit(1)

Expand Down
Binary file added wdpass/py3_sg.so
Binary file not shown.
2 changes: 1 addition & 1 deletion wdpass/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.1'
__version__ = '0.0.2'

0 comments on commit d7be263

Please sign in to comment.