Compare commits
2 commits
050699b851
...
2b61423e72
Author | SHA1 | Date | |
---|---|---|---|
chayleaf | 2b61423e72 | ||
chayleaf | b41ca57cb3 |
|
@ -37,14 +37,14 @@ def main() -> None:
|
|||
spot.add_argument("--domain", "-d", type=str, required=True)
|
||||
spot.add_argument("--cache_file", "-c", type=str, required=True)
|
||||
spot.add_argument("certs", type=str, nargs="*")
|
||||
hash = subparsers.add_parser("hash")
|
||||
hash.set_defaults(func=print_hash)
|
||||
hash.add_argument("path", type=str)
|
||||
tbs = subparsers.add_parser("tbs")
|
||||
tbs.set_defaults(func=print_tbs)
|
||||
tbs.add_argument("path", type=str)
|
||||
args = parser.parse_args()
|
||||
args.func(args)
|
||||
|
||||
|
||||
def print_hash(args) -> None:
|
||||
def print_tbs(args) -> None:
|
||||
with open(args.path, "rb") as f:
|
||||
print(calc_tbs(f.read()))
|
||||
|
||||
|
|
Loading…
Reference in a new issue