get implemented

This commit is contained in:
r4sas
2017-02-20 15:13:42 +03:00
parent e7f3610fdb
commit 5fe5c2f195
5 changed files with 110 additions and 24 deletions

View File

@@ -20,9 +20,17 @@ def main():
send_parser.add_argument("-e", "--expire", default="1day", action="store", help="expiration of paste (default: 1day)")
send_parser.add_argument("-f", "--format", default="plaintext", action="store", help="format of paste (default: plaintext)")
send_parser.add_argument("-p", "--password", help="password for crypting paste")
#send_parser.add_argument("filename", help="filename (example: image.jpg)")
send_parser.add_argument("-D", "--debug", default=False, action="store_true", help="enable debug")
#send_parser.add_argument("filename", help="example: image.jpg")
send_parser.set_defaults(func=pbincli.actions.send)
get_parser = subparsers.add_parser("get", description="Get data from PrivateBin instance", usage="""
%(prog)s pasteid#password"""
)
get_parser.add_argument("pasteinfo", help="example: aabb#cccddd")
get_parser.add_argument("-D", "--debug", default=False, action="store_true", help="enable debug")
get_parser.set_defaults(func=pbincli.actions.get)
# parse arguments
args = parser.parse_args()
if hasattr(args, "func"):