1
1
mirror of https://github.com/r4sas/PBinCLI synced 2025-03-12 05:11:07 +00:00

154 Commits

Author SHA1 Message Date
Fabio Manganiello
5e9a12ee92 Addressed comment: https://github.com/r4sas/PBinCLI/pull/53#discussion_r1965818035 2025-03-08 21:36:37 +03:00
Fabio Manganiello
03bdfe6782 A more robust logic to parse API settings.
All key-value settings in api.py were parsed through the following syntax:

```python
if settings["something"] is None:
  ...
```

This is problematic because it forces downstream implementations to also
provide all the fields, also when they are not required.

In particular, when new fields are added, downstream implementations
also have to provide them, or the integration will break.

The `settings.get("something")` syntax should be preferred, and settings
itself should also be initialized to a dict by default to prevent
dereferencing a `None` (I mean, if no settings are provided at all the
code should probably still break, but with a relevant error instead of a
fuzzier `TypeError`).

Closes: #51
Closes: #52
Closes: https://github.com/Pioverpie/privatebin-api#12
2025-03-08 21:36:37 +03:00
41bc3b3745
[dist] update pyproject.toml
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2025-02-16 19:13:27 +03:00
35df6d9b0f
update README
Signed-off-by: R4SAS <r4sas@i2pmail.org>
0.3.6
2025-02-15 20:22:50 +03:00
df76f41e19
0.3.6
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2025-02-15 20:16:39 +03:00
1d6d91c8bf
use secrets for random server choosing
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2025-02-15 20:06:37 +03:00
bf35207211
update binary build workflow
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2025-02-15 19:26:23 +03:00
5dfe8dd9ea
add servers list with random selection (closes #48)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2025-02-15 19:23:51 +03:00
afd2d58c61
check passphrase length in v1 paste type with base64 (#42)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2025-02-15 19:01:07 +03:00
ac0a145865
just print json, do not encode string
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2024-07-26 22:31:59 +03:00
c22c0f06ae
remove unused argparse json options, use configuration instead of args for json output
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2024-07-26 22:21:50 +03:00
88ea07dba2
json output for send command (closes #39)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2024-07-26 22:17:27 +03:00
Benjamin Renard
063ec9d881 Remove dependency on deprecated distutils.util.strtobool helper
According to PEP 632 recomendations, reimplementing our own:
https://www.python.org/dev/peps/pep-0632/#migration-advice
2024-07-26 20:36:42 +03:00
jebcoat
01d3d881b1
changed default expire value (#43)
* changed default expire value

* Delete extra quote

---------

Co-authored-by: R4SAS <r4sas@users.noreply.github.com>
2024-07-25 20:37:50 +03:00
Benjamin Renard
869cf130a4 Fix pycryptodome support when pycrypto is not available 2024-07-25 20:15:29 +03:00
Benjamin Renard
b40f48295a Add CLI autocompletion using argcomplete 2024-07-25 20:14:03 +03:00
3f30828e1a
handle errors when trying to get instance jsonld schema
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2023-04-27 21:47:24 +03:00
8c5f93487a
set proxy and auth in API client session (#41)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2023-04-27 03:16:21 +03:00
46149f868b
authorization options (#41)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2023-04-26 04:43:10 +03:00
7413bad322
[gha] update used actions
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2023-04-07 22:49:58 +03:00
ee11c06eda
add output option to README (#40)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2023-04-07 22:45:11 +03:00
a7d62df966
add get --output option for decoded data (#40)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2023-04-07 22:41:07 +03:00
08dbceebc6
fix proxy usage with SOCKS (#40)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2023-04-06 22:48:11 +03:00
a3386131a7
0.3.5
Signed-off-by: R4SAS <r4sas@i2pmail.org>
0.3.5
2023-02-23 07:41:53 +00:00
43c5ef9618
fix usage of debug option when command is not provided (closes #38)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2023-02-23 07:39:38 +00:00
ab7b2c060c
0.3.4
Signed-off-by: R4SAS <r4sas@i2pmail.org>
0.3.4
2022-12-11 21:14:39 +03:00
b35fd9f4b9
fix reading options from config file (#37)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-12-11 02:13:27 +03:00
d8f3c44371
update readme
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-12-11 01:03:57 +03:00
7117b2bcd7
add pyproject.yaml for PEP 518
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-12-11 00:36:22 +03:00
c860fec339
[gha] pyinstall binaries build
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-12-10 23:39:58 +03:00
7ecb501627
remove unused imported function
Signed-off-by: R4SAS <r4sas@i2pmail.org>
0.3.3
2022-12-09 23:18:15 +00:00
7b90b6a772
Add URL support for paste deletion, rewrite info parsing code
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-12-09 23:09:45 +00:00
a9a4079855
update README
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-02-10 22:29:31 +03:00
3965efef89
make additional options configurable with file (#36)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-02-02 16:09:25 +03:00
51170975c7
add PyInstaller spec file, PrivateBin icon
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-24 22:39:03 +03:00
cc791da03c
fix README for correct output from rst
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-24 20:33:55 +03:00
906c14fddf
0.3.2
Signed-off-by: R4SAS <r4sas@i2pmail.org>
0.3.2
2022-01-24 20:22:32 +03:00
0e61d05c9f
update documentation (closes #25, #26, #31)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-24 19:06:29 +03:00
05c1938aa6
[codacy] except ValueError
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-24 08:12:08 +03:00
369738ea50 Support full URL in get command
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-24 08:06:36 +03:00
Georg
7bd3ef22b9
Reduce unhandled shortening exceptions (#35)
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2022-01-24 07:36:23 +03:00
Georg
f05f65ea61
Set maxsplit in configuration parser (#34)
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2022-01-24 07:13:26 +03:00
3c2cdb10ac
fix config file path list
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-11 14:15:05 +03:00
28f7c09f83
[readme] update codacy badge
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-10 12:26:20 +03:00
b4ffc1a06b
[shortener] fix typos
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-10 11:42:05 +03:00
58645e1d32
[codacy] do not redefine built-in 'list'
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-10 02:25:16 +03:00
82ca95f01a
implement custom shorter url support (#28)
Usage: set "--short-api" to "custom", provide url with "--short-url" to shorter
service which returns short link in text form. For paste url mask "{{url}}" must
be used. Link queried with GET request.

Example for Shlink service:
https://doma.in/rest/v2/short-urls/shorten?apiKey=YOURKEY&longUrl={{url}}&format=txt

Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-10 02:10:00 +03:00
5589ba0437
add "mirrors" option to provide urls for mirrors links (closes #33)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-01-10 01:24:24 +03:00
6c9a5c95b6 add verbosity flag (-v), closes #32
Signed-off-by: r4sas <r4sas@i2pmail.org>
2021-06-04 20:13:51 +00:00
dependabot-preview[bot]
505a0104ca
Upgrade to GitHub-native Dependabot (#30)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-01 21:30:02 +03:00