diff options
Diffstat (limited to 'hex_zero.py')
-rwxr-xr-x | hex_zero.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hex_zero.py b/hex_zero.py index bcd8bb3..c91a326 100755 --- a/hex_zero.py +++ b/hex_zero.py @@ -464,6 +464,9 @@ def debug(): @manager.command def permadelete(name): + """ + Remove file from disk and mark it as removed in db + """ id = su.debase(name) f = File.query.get(id) @@ -475,6 +478,9 @@ def permadelete(name): @manager.command def query(name): + """ + Find file with this name sans extension, e.g., E + """ id = su.debase(name) f = File.query.get(id) @@ -483,6 +489,9 @@ def query(name): @manager.command def queryhash(h): + """ + Find file by this sha256 hash + """ f = File.query.filter_by(sha256=h).first() if f: @@ -490,6 +499,9 @@ def queryhash(h): @manager.command def queryaddr(a, nsfw=False, removed=False): + """ + Find all files uploaded from this IP address + """ res = File.query.filter_by(addr=a) if not removed: @@ -503,6 +515,9 @@ def queryaddr(a, nsfw=False, removed=False): @manager.command def deladdr(a): + """ + Delete all files uploaded from this IP address + """ res = File.query.filter_by(addr=a).filter(File.removed != True) for f in res: |