Download torrent files according to BitTorrent specifications
Project description
Pyicacls
A package for Windows ACL management, much like the windows icacls binary. This package can run both on UNIX machines and Windows machines.
How to use?
For regular IT purposes you can use the script attached in the pyicacls/example folder.
python examples/icacls.py -h
usage: icacls.py [-h] --ip IP --user USER [--password PASSWORD] [--domain DOMAIN] [--share SHARE] --file-path FILE_PATH [--target-user TARGET_USER]
[--permissions PERMISSIONS]
optional arguments:
-h, --help show this help message and exit
--ip IP ip of the target pc
--user USER user name to authenticate with
--password PASSWORD password to authenticate with (empty for interactive typing)
--domain DOMAIN domain of the user (empty for local workgroup)
--share SHARE share name to connect to
--file-path FILE_PATH
file path to view / change permissions
--target-user TARGET_USER
target user to change his permission
--permissions PERMISSIONS
permissions to change in the format of <permission char>,<permission char>. example: R,W
For creating automated scripts and other advanced tasks you can use the PermissionsGetter and PermissionsSetter.
To view permissions
from pyicacls.getter import PermissionsGetter
s = PermissionsGetter('127.0.0.1', 'MyPc', 'MyUsername', 'MyPassword', 'MyDomain')
s.get_permissions('share', 'file.txt')
Example output:
Owner: Home
Group: Domain Users
Dacl's: Guest:(R):(W)(X)
Administrator:(R)(D):(W)(X)
Martin:(I):(R)(w)(D):(F)
Everyone:(I):(R)(w)(D):(F)
To set permissions
from pyicacls.setter import PermissionsSetter
s = PermissionsSetter('127.0.0.1', 'MyPc', 'MyUsername', 'MyPassword', 'MyDomain')
s.set_permissions('share', 'file.txt', 'Guest', 'R,W')
The output for this operation will be bool - whether the operation succeeded or not.
To remove permissions
Simply pass None
for the permissions
parameter of the set_permissions
function.
s.set_permissions('share', 'file.txt', 'Guest', None)
This will remove all permissions of the user Guest
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file PyBitTorrent-0.5.3.tar.gz
.
File metadata
- Download URL: PyBitTorrent-0.5.3.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e198c610dda3284269f2e0db906a5e5a9b2a29c069962f9cbbf1d0fb038e22ef |
|
MD5 | f88ed7670d3ecdf81448f542c93b191b |
|
BLAKE2b-256 | bc7e07acd94ee80effc071cdb9cb72e9ac195236dbccadf02b42a945f3dad27b |
File details
Details for the file PyBitTorrent-0.5.3-py3-none-any.whl
.
File metadata
- Download URL: PyBitTorrent-0.5.3-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0502789e5cd6880db68372f3b9ffc87e11665a925a2ab7534f0f3897f55abe2b |
|
MD5 | d5ab0efdb9620569a7f90b79c97fccf5 |
|
BLAKE2b-256 | 53198c979bf68166380570114ed5284f48e06ac8efc5572707cc2a128576302f |