copyparty 1.16.2__tar.gz → 1.16.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {copyparty-1.16.2 → copyparty-1.16.3}/PKG-INFO +6 -3
- {copyparty-1.16.2 → copyparty-1.16.3}/README.md +5 -2
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/__main__.py +5 -1
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/__version__.py +2 -2
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/authsrv.py +19 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/cfg.py +2 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/httpcli.py +96 -19
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/mdns.py +7 -0
- copyparty-1.16.3/copyparty/res/COPYING.txt +152 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/dnslib/dns.py +2 -2
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/dnslib/label.py +21 -1
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/svchub.py +1 -1
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/u2idx.py +23 -20
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/up2k.py +29 -13
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/util.py +20 -1
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/a/u2c.py +5 -3
- copyparty-1.16.3/copyparty/web/browser.js.gz +0 -0
- copyparty-1.16.3/copyparty/web/deps/easymde.js.gz +0 -0
- copyparty-1.16.3/copyparty/web/deps/marked.js.gz +0 -0
- copyparty-1.16.3/copyparty/web/deps/sha512.hw.js.gz +0 -0
- copyparty-1.16.3/copyparty/web/md.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/md2.js.gz +0 -0
- copyparty-1.16.3/copyparty/web/up2k.js.gz +0 -0
- copyparty-1.16.3/copyparty/web/util.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty.egg-info/PKG-INFO +6 -3
- copyparty-1.16.2/copyparty/res/COPYING.txt +0 -95
- copyparty-1.16.2/copyparty/web/browser.js.gz +0 -0
- copyparty-1.16.2/copyparty/web/deps/easymde.js.gz +0 -0
- copyparty-1.16.2/copyparty/web/deps/marked.js.gz +0 -0
- copyparty-1.16.2/copyparty/web/deps/sha512.hw.js.gz +0 -0
- copyparty-1.16.2/copyparty/web/md.js.gz +0 -0
- copyparty-1.16.2/copyparty/web/up2k.js.gz +0 -0
- copyparty-1.16.2/copyparty/web/util.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/LICENSE +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/__init__.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/bos/__init__.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/bos/bos.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/bos/path.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/broker_mp.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/broker_mpw.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/broker_thr.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/broker_util.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/cert.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/dxml.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/fsutil.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/ftpd.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/httpconn.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/httpsrv.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/ico.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/metrics.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/mtag.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/multicast.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/pwhash.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/res/__init__.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/res/insecure.pem +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/smbd.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/ssdp.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/star.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/__init__.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/dnslib/__init__.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/dnslib/bimap.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/dnslib/bit.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/dnslib/buffer.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/dnslib/lex.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/dnslib/ranges.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/ifaddr/__init__.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/ifaddr/_posix.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/ifaddr/_shared.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/ifaddr/_win32.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/qrcodegen.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/stolen/surrogateescape.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/sutil.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/szip.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/tcpsrv.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/tftpd.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/th_cli.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/th_srv.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/a/__init__.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/a/partyfuse.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/a/webdav-cfg.bat +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/baguettebox.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/browser.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/browser.html +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/browser2.html +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/cf.html +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/dbg-audio.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/dd/2.png +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/dd/3.png +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/dd/4.png +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/dd/5.png +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/dd/__init__.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/__init__.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/busy.mp3.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/easymde.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/fuse.py +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/mini-fa.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/mini-fa.woff +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/prism.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/prism.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/prismd.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/scp.woff2 +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/deps/sha512.ac.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/md.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/md.html +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/md2.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/mde.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/mde.html +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/mde.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/msg.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/msg.html +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/shares.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/shares.html +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/shares.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/splash.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/splash.html +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/splash.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/svcs.html +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/svcs.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/ui.css.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty/web/w.hash.js.gz +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty.egg-info/SOURCES.txt +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty.egg-info/dependency_links.txt +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty.egg-info/entry_points.txt +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty.egg-info/requires.txt +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/copyparty.egg-info/top_level.txt +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/pyproject.toml +0 -0
- {copyparty-1.16.2 → copyparty-1.16.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: copyparty
|
3
|
-
Version: 1.16.
|
3
|
+
Version: 1.16.3
|
4
4
|
Summary: Portable file server with accelerated resumable uploads, deduplication, WebDAV, FTP, zeroconf, media indexer, video thumbnails, audio transcoding, and write-only folders
|
5
5
|
Author-email: ed <copyparty@ocv.me>
|
6
6
|
License: MIT
|
@@ -1152,11 +1152,12 @@ using the GUI (winXP or later):
|
|
1152
1152
|
* on winXP only, click the `Sign up for online storage` hyperlink instead and put the URL there
|
1153
1153
|
* providing your password as the username is recommended; the password field can be anything or empty
|
1154
1154
|
|
1155
|
-
|
1155
|
+
the webdav client that's built into windows has the following list of bugs; you can avoid all of these by connecting with rclone instead:
|
1156
1156
|
* win7+ doesn't actually send the password to the server when reauthenticating after a reboot unless you first try to login with an incorrect password and then switch to the correct password
|
1157
1157
|
* or just type your password into the username field instead to get around it entirely
|
1158
1158
|
* connecting to a folder which allows anonymous read will make writing impossible, as windows has decided it doesn't need to login
|
1159
1159
|
* workaround: connect twice; first to a folder which requires auth, then to the folder you actually want, and leave both of those mounted
|
1160
|
+
* or set the server-option `--dav-auth` to force password-auth for all webdav clients
|
1160
1161
|
* win7+ may open a new tcp connection for every file and sometimes forgets to close them, eventually needing a reboot
|
1161
1162
|
* maybe NIC-related (??), happens with win10-ltsc on e1000e but not virtio
|
1162
1163
|
* windows cannot access folders which contain filenames with invalid unicode or forbidden characters (`<>:"/\|?*`), or names ending with `.`
|
@@ -1323,7 +1324,7 @@ note:
|
|
1323
1324
|
|
1324
1325
|
### exclude-patterns
|
1325
1326
|
|
1326
|
-
to save some time, you can provide a regex pattern for filepaths to only index by filename/path/size/last-modified (and not the hash of the file contents) by setting `--no-hash \.iso
|
1327
|
+
to save some time, you can provide a regex pattern for filepaths to only index by filename/path/size/last-modified (and not the hash of the file contents) by setting `--no-hash '\.iso$'` or the volflag `:c,nohash=\.iso$`, this has the following consequences:
|
1327
1328
|
* initial indexing is way faster, especially when the volume is on a network disk
|
1328
1329
|
* makes it impossible to [file-search](#file-search)
|
1329
1330
|
* if someone uploads the same file contents, the upload will not be detected as a dupe, so it will not get symlinked or rejected
|
@@ -1334,6 +1335,8 @@ similarly, you can fully ignore files/folders using `--no-idx [...]` and `:c,noi
|
|
1334
1335
|
|
1335
1336
|
if you set `--no-hash [...]` globally, you can enable hashing for specific volumes using flag `:c,nohash=`
|
1336
1337
|
|
1338
|
+
to exclude certain filepaths from search-results, use `--srch-excl` or volflag `srch_excl` instead of `--no-idx`, for example `--srch-excl 'password|logs/[0-9]'`
|
1339
|
+
|
1337
1340
|
### filesystem guards
|
1338
1341
|
|
1339
1342
|
avoid traversing into other filesystems using `--xdev` / volflag `:c,xdev`, skipping any symlinks or bind-mounts to another HDD for example
|
@@ -1097,11 +1097,12 @@ using the GUI (winXP or later):
|
|
1097
1097
|
* on winXP only, click the `Sign up for online storage` hyperlink instead and put the URL there
|
1098
1098
|
* providing your password as the username is recommended; the password field can be anything or empty
|
1099
1099
|
|
1100
|
-
|
1100
|
+
the webdav client that's built into windows has the following list of bugs; you can avoid all of these by connecting with rclone instead:
|
1101
1101
|
* win7+ doesn't actually send the password to the server when reauthenticating after a reboot unless you first try to login with an incorrect password and then switch to the correct password
|
1102
1102
|
* or just type your password into the username field instead to get around it entirely
|
1103
1103
|
* connecting to a folder which allows anonymous read will make writing impossible, as windows has decided it doesn't need to login
|
1104
1104
|
* workaround: connect twice; first to a folder which requires auth, then to the folder you actually want, and leave both of those mounted
|
1105
|
+
* or set the server-option `--dav-auth` to force password-auth for all webdav clients
|
1105
1106
|
* win7+ may open a new tcp connection for every file and sometimes forgets to close them, eventually needing a reboot
|
1106
1107
|
* maybe NIC-related (??), happens with win10-ltsc on e1000e but not virtio
|
1107
1108
|
* windows cannot access folders which contain filenames with invalid unicode or forbidden characters (`<>:"/\|?*`), or names ending with `.`
|
@@ -1268,7 +1269,7 @@ note:
|
|
1268
1269
|
|
1269
1270
|
### exclude-patterns
|
1270
1271
|
|
1271
|
-
to save some time, you can provide a regex pattern for filepaths to only index by filename/path/size/last-modified (and not the hash of the file contents) by setting `--no-hash \.iso
|
1272
|
+
to save some time, you can provide a regex pattern for filepaths to only index by filename/path/size/last-modified (and not the hash of the file contents) by setting `--no-hash '\.iso$'` or the volflag `:c,nohash=\.iso$`, this has the following consequences:
|
1272
1273
|
* initial indexing is way faster, especially when the volume is on a network disk
|
1273
1274
|
* makes it impossible to [file-search](#file-search)
|
1274
1275
|
* if someone uploads the same file contents, the upload will not be detected as a dupe, so it will not get symlinked or rejected
|
@@ -1279,6 +1280,8 @@ similarly, you can fully ignore files/folders using `--no-idx [...]` and `:c,noi
|
|
1279
1280
|
|
1280
1281
|
if you set `--no-hash [...]` globally, you can enable hashing for specific volumes using flag `:c,nohash=`
|
1281
1282
|
|
1283
|
+
to exclude certain filepaths from search-results, use `--srch-excl` or volflag `srch_excl` instead of `--no-idx`, for example `--srch-excl 'password|logs/[0-9]'`
|
1284
|
+
|
1282
1285
|
### filesystem guards
|
1283
1286
|
|
1284
1287
|
avoid traversing into other filesystems using `--xdev` / volflag `:c,xdev`, skipping any symlinks or bind-mounts to another HDD for example
|
@@ -1116,6 +1116,8 @@ def add_zc_mdns(ap):
|
|
1116
1116
|
ap2.add_argument("--zm6", action="store_true", help="IPv6 only")
|
1117
1117
|
ap2.add_argument("--zmv", action="store_true", help="verbose mdns")
|
1118
1118
|
ap2.add_argument("--zmvv", action="store_true", help="verboser mdns")
|
1119
|
+
ap2.add_argument("--zm-no-pe", action="store_true", help="mute parser errors (invalid incoming MDNS packets)")
|
1120
|
+
ap2.add_argument("--zm-nwa-1", action="store_true", help="disable workaround for avahi-bug #379 (corruption in Avahi's mDNS reflection feature)")
|
1119
1121
|
ap2.add_argument("--zms", metavar="dhf", type=u, default="", help="list of services to announce -- d=webdav h=http f=ftp s=smb -- lowercase=plaintext uppercase=TLS -- default: all enabled services except http/https (\033[32mDdfs\033[0m if \033[33m--ftp\033[0m and \033[33m--smb\033[0m is set, \033[32mDd\033[0m otherwise)")
|
1120
1122
|
ap2.add_argument("--zm-ld", metavar="PATH", type=u, default="", help="link a specific folder for webdav shares")
|
1121
1123
|
ap2.add_argument("--zm-lh", metavar="PATH", type=u, default="", help="link a specific folder for http shares")
|
@@ -1308,7 +1310,7 @@ def add_logging(ap):
|
|
1308
1310
|
ap2.add_argument("--log-htp", action="store_true", help="debug: print http-server threadpool scaling")
|
1309
1311
|
ap2.add_argument("--ihead", metavar="HEADER", type=u, action='append', help="print request \033[33mHEADER\033[0m; [\033[32m*\033[0m]=all")
|
1310
1312
|
ap2.add_argument("--ohead", metavar="HEADER", type=u, action='append', help="print response \033[33mHEADER\033[0m; [\033[32m*\033[0m]=all")
|
1311
|
-
ap2.add_argument("--lf-url", metavar="RE", type=u, default=r"^/\.cpr
|
1313
|
+
ap2.add_argument("--lf-url", metavar="RE", type=u, default=r"^/\.cpr/|[?&]th=[wjp]|/\.(_|ql_|DS_Store$|localized$)", help="dont log URLs matching regex \033[33mRE\033[0m")
|
1312
1314
|
|
1313
1315
|
|
1314
1316
|
def add_admin(ap):
|
@@ -1393,6 +1395,7 @@ def add_db_general(ap, hcores):
|
|
1393
1395
|
ap2.add_argument("--db-act", metavar="SEC", type=float, default=10.0, help="defer any scheduled volume reindexing until \033[33mSEC\033[0m seconds after last db write (uploads, renames, ...)")
|
1394
1396
|
ap2.add_argument("--srch-time", metavar="SEC", type=int, default=45, help="search deadline -- terminate searches running for more than \033[33mSEC\033[0m seconds")
|
1395
1397
|
ap2.add_argument("--srch-hits", metavar="N", type=int, default=7999, help="max search results to allow clients to fetch; 125 results will be shown initially")
|
1398
|
+
ap2.add_argument("--srch-excl", metavar="PTN", type=u, default="", help="regex: exclude files from search results if the file-URL matches \033[33mPTN\033[0m (case-sensitive). Example: [\033[32mpassword|logs/[0-9]\033[0m] any URL containing 'password' or 'logs/DIGIT' (volflag=srch_excl)")
|
1396
1399
|
ap2.add_argument("--dotsrch", action="store_true", help="show dotfiles in search results (volflags: dotsrch | nodotsrch)")
|
1397
1400
|
|
1398
1401
|
|
@@ -1450,6 +1453,7 @@ def add_ui(ap, retry):
|
|
1450
1453
|
ap2.add_argument("--au-vol", metavar="0-100", type=int, default=50, choices=range(0, 101), help="default audio/video volume percent")
|
1451
1454
|
ap2.add_argument("--sort", metavar="C,C,C", type=u, default="href", help="default sort order, comma-separated column IDs (see header tooltips), prefix with '-' for descending. Examples: \033[32mhref -href ext sz ts tags/Album tags/.tn\033[0m (volflag=sort)")
|
1452
1455
|
ap2.add_argument("--nsort", action="store_true", help="default-enable natural sort of filenames with leading numbers (volflag=nsort)")
|
1456
|
+
ap2.add_argument("--hsortn", metavar="N", type=int, default=2, help="number of sorting rules to include in media URLs by default (volflag=hsortn)")
|
1453
1457
|
ap2.add_argument("--unlist", metavar="REGEX", type=u, default="", help="don't show files matching \033[33mREGEX\033[0m in file list. Purely cosmetic! Does not affect API calls, just the browser. Example: [\033[32m\\.(js|css)$\033[0m] (volflag=unlist)")
|
1454
1458
|
ap2.add_argument("--favico", metavar="TXT", type=u, default="c 000 none" if retry else "🎉 000 none", help="\033[33mfavicon-text\033[0m [ \033[33mforeground\033[0m [ \033[33mbackground\033[0m ] ], set blank to disable")
|
1455
1459
|
ap2.add_argument("--mpmc", metavar="URL", type=u, default="", help="change the mediaplayer-toggle mouse cursor; URL to a folder with {2..5}.png inside (or disable with [\033[32m.\033[0m])")
|
@@ -1873,6 +1873,7 @@ class AuthSrv(object):
|
|
1873
1873
|
["no_hash", "nohash"],
|
1874
1874
|
["no_idx", "noidx"],
|
1875
1875
|
["og_ua", "og_ua"],
|
1876
|
+
["srch_excl", "srch_excl"],
|
1876
1877
|
]:
|
1877
1878
|
if vf in vol.flags:
|
1878
1879
|
ptn = re.compile(vol.flags.pop(vf))
|
@@ -2079,6 +2080,22 @@ class AuthSrv(object):
|
|
2079
2080
|
self.log(t.format(mtp), 1)
|
2080
2081
|
errors = True
|
2081
2082
|
|
2083
|
+
for vol in vfs.all_vols.values():
|
2084
|
+
re1 = vol.flags.get("srch_excl")
|
2085
|
+
excl = [re1.pattern] if re1 else []
|
2086
|
+
|
2087
|
+
vpaths = []
|
2088
|
+
vtop = vol.vpath
|
2089
|
+
for vp2 in vfs.all_vols.keys():
|
2090
|
+
if vp2.startswith((vtop + "/").lstrip("/")) and vtop != vp2:
|
2091
|
+
vpaths.append(re.escape(vp2[len(vtop) :].lstrip("/")))
|
2092
|
+
if vpaths:
|
2093
|
+
excl.append("^(%s)/" % ("|".join(vpaths),))
|
2094
|
+
|
2095
|
+
vol.flags["srch_re_dots"] = re.compile("|".join(excl or ["^$"]))
|
2096
|
+
excl.extend([r"^\.", r"/\."])
|
2097
|
+
vol.flags["srch_re_nodot"] = re.compile("|".join(excl))
|
2098
|
+
|
2082
2099
|
have_daw = False
|
2083
2100
|
for vol in vfs.all_nodes.values():
|
2084
2101
|
daw = vol.flags.get("daw") or self.args.daw
|
@@ -2307,6 +2324,7 @@ class AuthSrv(object):
|
|
2307
2324
|
"idx": "e2d" in vf,
|
2308
2325
|
"itag": "e2t" in vf,
|
2309
2326
|
"dnsort": "nsort" in vf,
|
2327
|
+
"dhsortn": vf["hsortn"],
|
2310
2328
|
"dsort": vf["sort"],
|
2311
2329
|
"dcrop": vf["crop"],
|
2312
2330
|
"dth3x": vf["th3x"],
|
@@ -2332,6 +2350,7 @@ class AuthSrv(object):
|
|
2332
2350
|
"dgrid": "grid" in vf,
|
2333
2351
|
"dgsel": "gsel" in vf,
|
2334
2352
|
"dnsort": "nsort" in vf,
|
2353
|
+
"dhsortn": vf["hsortn"],
|
2335
2354
|
"dsort": vf["sort"],
|
2336
2355
|
"dcrop": vf["crop"],
|
2337
2356
|
"dth3x": vf["th3x"],
|
@@ -70,6 +70,7 @@ def vf_vmap() :
|
|
70
70
|
}
|
71
71
|
for k in (
|
72
72
|
"dbd",
|
73
|
+
"hsortn",
|
73
74
|
"html_head",
|
74
75
|
"lg_sbf",
|
75
76
|
"md_sbf",
|
@@ -191,6 +192,7 @@ flagcats = {
|
|
191
192
|
"xvol": "do not follow symlinks leaving the volume root",
|
192
193
|
"dotsrch": "show dotfiles in search results",
|
193
194
|
"nodotsrch": "hide dotfiles in search results (default)",
|
195
|
+
"srch_excl": "exclude search results with URL matching this regex",
|
194
196
|
},
|
195
197
|
'database, audio tags\n"mte", "mth", "mtp", "mtm" all work the same as -mte, -mth, ...': {
|
196
198
|
"mtp=.bpm=f,audio-bpm.py": 'uses the "audio-bpm.py" program to\ngenerate ".bpm" tags from uploads (f = overwrite tags)',
|
@@ -14,6 +14,7 @@ import re
|
|
14
14
|
import socket
|
15
15
|
import stat
|
16
16
|
import string
|
17
|
+
import sys
|
17
18
|
import threading # typechk
|
18
19
|
import time
|
19
20
|
import uuid
|
@@ -76,6 +77,7 @@ from .util import (
|
|
76
77
|
html_escape,
|
77
78
|
humansize,
|
78
79
|
ipnorm,
|
80
|
+
justcopy,
|
79
81
|
load_resource,
|
80
82
|
loadpy,
|
81
83
|
log_reloc,
|
@@ -120,6 +122,8 @@ if not hasattr(socket, "AF_UNIX"):
|
|
120
122
|
|
121
123
|
_ = (argparse, threading)
|
122
124
|
|
125
|
+
USED4SEC = {"usedforsecurity": False} if sys.version_info > (3, 9) else {}
|
126
|
+
|
123
127
|
NO_CACHE = {"Cache-Control": "no-cache"}
|
124
128
|
|
125
129
|
ALL_COOKIES = "k304 no304 js idxh dots cppwd cppws".split()
|
@@ -133,6 +137,10 @@ READMES = [[0, ["preadme.md", "PREADME.md"]], [1, ["readme.md", "README.md"]]]
|
|
133
137
|
|
134
138
|
RSS_SORT = {"m": "mt", "u": "at", "n": "fn", "s": "sz"}
|
135
139
|
|
140
|
+
A_FILE = os.stat_result(
|
141
|
+
(0o644, -1, -1, 1, 1000, 1000, 8, 0x39230101, 0x39230101, 0x39230101)
|
142
|
+
)
|
143
|
+
|
136
144
|
|
137
145
|
class HttpCli(object):
|
138
146
|
"""
|
@@ -1238,7 +1246,7 @@ class HttpCli(object):
|
|
1238
1246
|
self.log("RSS %s @%s" % (self.req, self.uname))
|
1239
1247
|
|
1240
1248
|
if not self.can_read:
|
1241
|
-
return self.tx_404()
|
1249
|
+
return self.tx_404(True)
|
1242
1250
|
|
1243
1251
|
vn = self.vn
|
1244
1252
|
if not vn.flags.get("rss"):
|
@@ -1419,7 +1427,8 @@ class HttpCli(object):
|
|
1419
1427
|
|
1420
1428
|
depth = self.headers.get("depth", "infinity").lower()
|
1421
1429
|
if depth == "infinity":
|
1422
|
-
|
1430
|
+
# allow depth:0 from unmapped root, but require read-axs otherwise
|
1431
|
+
if not self.can_read and (self.vpath or self.asrv.vfs.realpath):
|
1423
1432
|
t = "depth:infinity requires read-access in /%s"
|
1424
1433
|
t = t % (self.vpath,)
|
1425
1434
|
self.log(t, 3)
|
@@ -1479,7 +1488,7 @@ class HttpCli(object):
|
|
1479
1488
|
t2 = " or 'infinity'" if self.args.dav_inf else ""
|
1480
1489
|
raise Pebkac(412, t.format(depth, t2))
|
1481
1490
|
|
1482
|
-
if not self.can_read and not self.can_write and not
|
1491
|
+
if not self.can_read and not self.can_write and not fgen:
|
1483
1492
|
self.log("inaccessible: [%s]" % (self.vpath,))
|
1484
1493
|
raise Pebkac(401, "authenticate")
|
1485
1494
|
|
@@ -1758,7 +1767,7 @@ class HttpCli(object):
|
|
1758
1767
|
|
1759
1768
|
if not self.can_write:
|
1760
1769
|
t = "user %s does not have write-access under /%s"
|
1761
|
-
raise Pebkac(403, t % (self.uname, self.vn.vpath))
|
1770
|
+
raise Pebkac(403 if self.pw else 401, t % (self.uname, self.vn.vpath))
|
1762
1771
|
|
1763
1772
|
if not self.args.no_dav and self._applesan():
|
1764
1773
|
return self.headers.get("content-length") == "0"
|
@@ -2049,10 +2058,31 @@ class HttpCli(object):
|
|
2049
2058
|
# small toctou, but better than clobbering a hardlink
|
2050
2059
|
wunlink(self.log, path, vfs.flags)
|
2051
2060
|
|
2061
|
+
hasher = None
|
2062
|
+
copier = hashcopy
|
2063
|
+
if "ck" in self.ouparam or "ck" in self.headers:
|
2064
|
+
zs = self.ouparam.get("ck") or self.headers.get("ck") or ""
|
2065
|
+
if not zs or zs == "no":
|
2066
|
+
copier = justcopy
|
2067
|
+
elif zs == "md5":
|
2068
|
+
hasher = hashlib.md5(**USED4SEC)
|
2069
|
+
elif zs == "sha1":
|
2070
|
+
hasher = hashlib.sha1(**USED4SEC)
|
2071
|
+
elif zs == "sha256":
|
2072
|
+
hasher = hashlib.sha256(**USED4SEC)
|
2073
|
+
elif zs in ("blake2", "b2"):
|
2074
|
+
hasher = hashlib.blake2b(**USED4SEC)
|
2075
|
+
elif zs in ("blake2s", "b2s"):
|
2076
|
+
hasher = hashlib.blake2s(**USED4SEC)
|
2077
|
+
elif zs == "sha512":
|
2078
|
+
pass
|
2079
|
+
else:
|
2080
|
+
raise Pebkac(500, "unknown hash alg")
|
2081
|
+
|
2052
2082
|
f, fn = ren_open(fn, *open_a, **params)
|
2053
2083
|
try:
|
2054
2084
|
path = os.path.join(fdir, fn)
|
2055
|
-
post_sz, sha_hex, sha_b64 =
|
2085
|
+
post_sz, sha_hex, sha_b64 = copier(reader, f, hasher, 0, self.args.s_wr_slp)
|
2056
2086
|
finally:
|
2057
2087
|
f.close()
|
2058
2088
|
|
@@ -2289,8 +2319,8 @@ class HttpCli(object):
|
|
2289
2319
|
# kinda silly but has the least side effects
|
2290
2320
|
return self.handle_new_md()
|
2291
2321
|
|
2292
|
-
if act
|
2293
|
-
return self.handle_plain_upload(file0)
|
2322
|
+
if act in ("bput", "uput"):
|
2323
|
+
return self.handle_plain_upload(file0, act == "uput")
|
2294
2324
|
|
2295
2325
|
if act == "tput":
|
2296
2326
|
return self.handle_text_upload()
|
@@ -2901,13 +2931,41 @@ class HttpCli(object):
|
|
2901
2931
|
)
|
2902
2932
|
|
2903
2933
|
def handle_plain_upload(
|
2904
|
-
self,
|
2934
|
+
self,
|
2935
|
+
file0 ,
|
2936
|
+
nohash ,
|
2905
2937
|
) :
|
2906
2938
|
assert self.parser
|
2907
2939
|
nullwrite = self.args.nw
|
2908
2940
|
vfs, rem = self.asrv.vfs.get(self.vpath, self.uname, False, True)
|
2909
2941
|
self._assert_safe_rem(rem)
|
2910
2942
|
|
2943
|
+
halg = "sha512"
|
2944
|
+
hasher = None
|
2945
|
+
copier = hashcopy
|
2946
|
+
if nohash:
|
2947
|
+
halg = ""
|
2948
|
+
copier = justcopy
|
2949
|
+
elif "ck" in self.ouparam or "ck" in self.headers:
|
2950
|
+
halg = self.ouparam.get("ck") or self.headers.get("ck") or ""
|
2951
|
+
if not halg or halg == "no":
|
2952
|
+
copier = justcopy
|
2953
|
+
halg = ""
|
2954
|
+
elif halg == "md5":
|
2955
|
+
hasher = hashlib.md5(**USED4SEC)
|
2956
|
+
elif halg == "sha1":
|
2957
|
+
hasher = hashlib.sha1(**USED4SEC)
|
2958
|
+
elif halg == "sha256":
|
2959
|
+
hasher = hashlib.sha256(**USED4SEC)
|
2960
|
+
elif halg in ("blake2", "b2"):
|
2961
|
+
hasher = hashlib.blake2b(**USED4SEC)
|
2962
|
+
elif halg in ("blake2s", "b2s"):
|
2963
|
+
hasher = hashlib.blake2s(**USED4SEC)
|
2964
|
+
elif halg == "sha512":
|
2965
|
+
pass
|
2966
|
+
else:
|
2967
|
+
raise Pebkac(500, "unknown hash alg")
|
2968
|
+
|
2911
2969
|
upload_vpath = self.vpath
|
2912
2970
|
lim = vfs.get_dbv(rem)[0].lim
|
2913
2971
|
fdir_base = vfs.canonical(rem)
|
@@ -3037,8 +3095,8 @@ class HttpCli(object):
|
|
3037
3095
|
try:
|
3038
3096
|
tabspath = os.path.join(fdir, tnam)
|
3039
3097
|
self.log("writing to {}".format(tabspath))
|
3040
|
-
sz, sha_hex, sha_b64 =
|
3041
|
-
p_data, f,
|
3098
|
+
sz, sha_hex, sha_b64 = copier(
|
3099
|
+
p_data, f, hasher, max_sz, self.args.s_wr_slp
|
3042
3100
|
)
|
3043
3101
|
if sz == 0:
|
3044
3102
|
raise Pebkac(400, "empty files in post")
|
@@ -3170,10 +3228,15 @@ class HttpCli(object):
|
|
3170
3228
|
jmsg["error"] = errmsg
|
3171
3229
|
errmsg = "ERROR: " + errmsg
|
3172
3230
|
|
3231
|
+
if halg:
|
3232
|
+
file_fmt = '{0}: {1} // {2} // {3} bytes // <a href="/{4}">{5}</a> {6}\n'
|
3233
|
+
else:
|
3234
|
+
file_fmt = '{3} bytes // <a href="/{4}">{5}</a> {6}\n'
|
3235
|
+
|
3173
3236
|
for sz, sha_hex, sha_b64, ofn, lfn, ap in files:
|
3174
3237
|
vsuf = ""
|
3175
3238
|
if (self.can_read or self.can_upget) and "fk" in vfs.flags:
|
3176
|
-
st = bos.stat(ap)
|
3239
|
+
st = A_FILE if nullwrite else bos.stat(ap)
|
3177
3240
|
alg = 2 if "fka" in vfs.flags else 1
|
3178
3241
|
vsuf = "?k=" + self.gen_fk(
|
3179
3242
|
alg,
|
@@ -3188,7 +3251,8 @@ class HttpCli(object):
|
|
3188
3251
|
|
3189
3252
|
vpath = "{}/{}".format(upload_vpath, lfn).strip("/")
|
3190
3253
|
rel_url = quotep(self.args.RS + vpath) + vsuf
|
3191
|
-
msg +=
|
3254
|
+
msg += file_fmt.format(
|
3255
|
+
halg,
|
3192
3256
|
sha_hex[:56],
|
3193
3257
|
sha_b64,
|
3194
3258
|
sz,
|
@@ -3204,13 +3268,14 @@ class HttpCli(object):
|
|
3204
3268
|
self.host,
|
3205
3269
|
rel_url,
|
3206
3270
|
),
|
3207
|
-
"sha512": sha_hex[:56],
|
3208
|
-
"sha_b64": sha_b64,
|
3209
3271
|
"sz": sz,
|
3210
3272
|
"fn": lfn,
|
3211
3273
|
"fn_orig": ofn,
|
3212
3274
|
"path": rel_url,
|
3213
3275
|
}
|
3276
|
+
if halg:
|
3277
|
+
jpart[halg] = sha_hex[:56]
|
3278
|
+
jpart["sha_b64"] = sha_b64
|
3214
3279
|
jmsg["files"].append(jpart)
|
3215
3280
|
|
3216
3281
|
vspd = self._spd(sz_total, False)
|
@@ -4603,6 +4668,18 @@ class HttpCli(object):
|
|
4603
4668
|
if "th" in self.ouparam:
|
4604
4669
|
return self.tx_svg("e" + pt[:3])
|
4605
4670
|
|
4671
|
+
# most webdav clients will not send credentials until they
|
4672
|
+
# get 401'd, so send a challenge if we're Absolutely Sure
|
4673
|
+
# that the client is not a graphical browser
|
4674
|
+
if (
|
4675
|
+
rc == 403
|
4676
|
+
and not self.pw
|
4677
|
+
and not self.ua.startswith("Mozilla/")
|
4678
|
+
and "sec-fetch-site" not in self.headers
|
4679
|
+
):
|
4680
|
+
rc = 401
|
4681
|
+
self.out_headers["WWW-Authenticate"] = 'Basic realm="a"'
|
4682
|
+
|
4606
4683
|
t = t.format(self.args.SR)
|
4607
4684
|
qv = quotep(self.vpaths) + self.ourlq()
|
4608
4685
|
html = self.j2s(
|
@@ -5243,7 +5320,7 @@ class HttpCli(object):
|
|
5243
5320
|
st = bos.stat(abspath)
|
5244
5321
|
except:
|
5245
5322
|
if "on404" not in vn.flags:
|
5246
|
-
return self.tx_404()
|
5323
|
+
return self.tx_404(not self.can_read)
|
5247
5324
|
|
5248
5325
|
ret = self.on40x(vn.flags["on404"], vn, rem)
|
5249
5326
|
if ret == "true":
|
@@ -5254,9 +5331,9 @@ class HttpCli(object):
|
|
5254
5331
|
try:
|
5255
5332
|
st = bos.stat(abspath)
|
5256
5333
|
except:
|
5257
|
-
return self.tx_404()
|
5334
|
+
return self.tx_404(not self.can_read)
|
5258
5335
|
else:
|
5259
|
-
return self.tx_404()
|
5336
|
+
return self.tx_404(not self.can_read)
|
5260
5337
|
|
5261
5338
|
if rem.startswith(".hist/up2k.") or (
|
5262
5339
|
rem.endswith("/dir.txt") and rem.startswith(".hist/th/")
|
@@ -5383,13 +5460,13 @@ class HttpCli(object):
|
|
5383
5460
|
vrem = vjoin(vrem, fn)
|
5384
5461
|
abspath = ap2
|
5385
5462
|
break
|
5386
|
-
elif self.vpath.rsplit("/", 1)[1] in ("index.htm", "index.html"):
|
5463
|
+
elif self.vpath.rsplit("/", 1)[-1] in ("index.htm", "index.html"):
|
5387
5464
|
fk_pass = True
|
5388
5465
|
|
5389
5466
|
if not is_dir and (self.can_read or self.can_get):
|
5390
5467
|
if not self.can_read and not fk_pass and "fk" in vn.flags:
|
5391
5468
|
if not use_filekey:
|
5392
|
-
return self.tx_404()
|
5469
|
+
return self.tx_404(True)
|
5393
5470
|
|
5394
5471
|
if add_og and not abspath.lower().endswith(".md"):
|
5395
5472
|
if og_ua or self.host not in self.headers.get("referer", ""):
|
@@ -25,6 +25,7 @@ from .stolen.dnslib import (
|
|
25
25
|
DNSHeader,
|
26
26
|
DNSQuestion,
|
27
27
|
DNSRecord,
|
28
|
+
set_avahi_379,
|
28
29
|
)
|
29
30
|
from .util import CachedSet, Daemon, Netdev, list_ips, min_ex
|
30
31
|
|
@@ -68,6 +69,9 @@ class MDNS(MCast):
|
|
68
69
|
self.ngen = ngen
|
69
70
|
self.ttl = 300
|
70
71
|
|
72
|
+
if not self.args.zm_nwa_1:
|
73
|
+
set_avahi_379()
|
74
|
+
|
71
75
|
zs = self.args.name + ".local."
|
72
76
|
zs = zs.encode("ascii", "replace").decode("ascii", "replace")
|
73
77
|
self.hn = "-".join(x for x in zs.split("?") if x) or (
|
@@ -332,6 +336,9 @@ class MDNS(MCast):
|
|
332
336
|
self.log("stopped", 2)
|
333
337
|
return
|
334
338
|
|
339
|
+
if self.args.zm_no_pe:
|
340
|
+
continue
|
341
|
+
|
335
342
|
t = "{} {} \033[33m|{}| {}\n{}".format(
|
336
343
|
self.srv[sck].name, addr, len(buf), repr(buf)[2:-1], min_ex()
|
337
344
|
)
|
@@ -0,0 +1,152 @@
|
|
1
|
+
[07m--- server-side --- software ---[0m
|
2
|
+
|
3
|
+
https://github.com/9001/copyparty/
|
4
|
+
Copyright (c) 2019 ed
|
5
|
+
License: MIT
|
6
|
+
|
7
|
+
https://github.com/pallets/jinja/
|
8
|
+
Copyright (c) 2007 Pallets
|
9
|
+
License: BSD 3-Clause
|
10
|
+
|
11
|
+
https://github.com/pallets/markupsafe/
|
12
|
+
Copyright (c) 2010 Pallets
|
13
|
+
License: BSD 3-Clause
|
14
|
+
|
15
|
+
https://github.com/paulc/dnslib/
|
16
|
+
Copyright (c) 2010-2017 Paul Chakravarti
|
17
|
+
License: BSD 2-Clause
|
18
|
+
|
19
|
+
https://github.com/pydron/ifaddr/
|
20
|
+
Copyright (c) 2014 Stefan C. Mueller
|
21
|
+
License: BSD-2-Clause
|
22
|
+
|
23
|
+
https://github.com/giampaolo/pyftpdlib/
|
24
|
+
Copyright (c) 2007 Giampaolo Rodola
|
25
|
+
License: MIT
|
26
|
+
|
27
|
+
https://github.com/9001/partftpy
|
28
|
+
Copyright (c) 2010-2021 Michael P. Soulier
|
29
|
+
License: MIT
|
30
|
+
|
31
|
+
https://github.com/nayuki/QR-Code-generator/
|
32
|
+
Copyright (c) Project Nayuki
|
33
|
+
License: MIT
|
34
|
+
|
35
|
+
https://github.com/ahupp/python-magic/
|
36
|
+
Copyright (c) 2001-2014 Adam Hupp
|
37
|
+
License: MIT
|
38
|
+
|
39
|
+
[07m--- client-side --- software ---[0m
|
40
|
+
|
41
|
+
https://github.com/Daninet/hash-wasm/
|
42
|
+
Copyright (c) 2020 Dani Biró
|
43
|
+
License: MIT
|
44
|
+
|
45
|
+
https://github.com/openpgpjs/asmcrypto.js/
|
46
|
+
Copyright (c) 2013 Artem S Vybornov
|
47
|
+
License: MIT
|
48
|
+
|
49
|
+
https://github.com/feimosi/baguetteBox.js/
|
50
|
+
Copyright (c) 2017 Marek Grzybek
|
51
|
+
License: MIT
|
52
|
+
|
53
|
+
https://github.com/markedjs/marked/
|
54
|
+
Copyright (c) 2018+, MarkedJS
|
55
|
+
Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
|
56
|
+
License: MIT
|
57
|
+
|
58
|
+
https://github.com/codemirror/codemirror5/
|
59
|
+
Copyright (c) 2017 Marijn Haverbeke <marijnh@gmail.com> and others
|
60
|
+
License: MIT
|
61
|
+
|
62
|
+
https://github.com/Ionaru/easy-markdown-editor/
|
63
|
+
Copyright (c) 2015 Sparksuite, Inc.
|
64
|
+
Copyright (c) 2017 Jeroen Akkerman.
|
65
|
+
License: MIT
|
66
|
+
|
67
|
+
[07m--- client-side --- fonts ---[0m
|
68
|
+
|
69
|
+
https://github.com/adobe-fonts/source-code-pro/
|
70
|
+
Copyright (c) 2010-2019 Adobe
|
71
|
+
License: SIL OFL 1.1
|
72
|
+
|
73
|
+
https://github.com/FortAwesome/Font-Awesome/
|
74
|
+
Copyright (c) 2022 Fonticons, Inc.
|
75
|
+
License: SIL OFL 1.1
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
[07m--- MIT License ---[0m
|
82
|
+
|
83
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
84
|
+
|
85
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
86
|
+
|
87
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
88
|
+
|
89
|
+
[07m--- BSD 2-Clause License ---[0m
|
90
|
+
|
91
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
92
|
+
|
93
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
94
|
+
|
95
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
96
|
+
|
97
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
98
|
+
|
99
|
+
[07m--- BSD 3-Clause License ---[0m
|
100
|
+
|
101
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
102
|
+
|
103
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
104
|
+
|
105
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
106
|
+
|
107
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
108
|
+
|
109
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
110
|
+
|
111
|
+
[07m--- SIL Open Font License v1.1 ---[0m
|
112
|
+
|
113
|
+
PREAMBLE
|
114
|
+
|
115
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
116
|
+
|
117
|
+
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
118
|
+
|
119
|
+
DEFINITIONS
|
120
|
+
|
121
|
+
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
122
|
+
|
123
|
+
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
124
|
+
|
125
|
+
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
126
|
+
|
127
|
+
"Modified Version" refers to any derivative made by adding to, deleting, or substituting - in part or in whole - any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
128
|
+
|
129
|
+
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
130
|
+
|
131
|
+
PERMISSION & CONDITIONS
|
132
|
+
|
133
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
134
|
+
|
135
|
+
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
136
|
+
|
137
|
+
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
138
|
+
|
139
|
+
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
140
|
+
|
141
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
142
|
+
|
143
|
+
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
144
|
+
|
145
|
+
TERMINATION
|
146
|
+
|
147
|
+
This license becomes null and void if any of the above conditions are not met.
|
148
|
+
|
149
|
+
DISCLAIMER
|
150
|
+
|
151
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
152
|
+
|
@@ -8,7 +8,7 @@ from itertools import chain
|
|
8
8
|
from .bimap import Bimap, BimapError
|
9
9
|
from .bit import get_bits, set_bits
|
10
10
|
from .buffer import BufferError
|
11
|
-
from .label import DNSBuffer, DNSLabel
|
11
|
+
from .label import DNSBuffer, DNSLabel, set_avahi_379
|
12
12
|
from .ranges import IP4, IP6, H, I, check_bytes
|
13
13
|
|
14
14
|
|
@@ -426,7 +426,7 @@ class RR(object):
|
|
426
426
|
if rdlength:
|
427
427
|
rdata = RDMAP.get(QTYPE.get(rtype), RD).parse(buffer, rdlength)
|
428
428
|
else:
|
429
|
-
rdata = ""
|
429
|
+
rdata = RD(b"a")
|
430
430
|
return cls(rname, rtype, rclass, ttl, rdata)
|
431
431
|
except (BufferError, BimapError) as e:
|
432
432
|
raise DNSError("Error unpacking RR [offset=%d]: %s" % (buffer.offset, e))
|