test data
This commit is contained in:
0
tests/data/empty
Normal file
0
tests/data/empty
Normal file
1
tests/data/partial
Normal file
1
tests/data/partial
Normal file
@ -0,0 +1 @@
|
||||
xC<78><43>ʟ<EFBFBD>ZG<5A><47>М<EFBFBD><D09C><EFBFBD>?<3F><><1D>ZG<>#<0F><>,<>ƻ<>Q=<3D>><3E>ك1<D983>NU<4E><15>u<>{Zj;<3B>`<60><19><19><>Dv<44><76>Q<EFBFBD>j<EFBFBD>voQFN<46><4E><EFBFBD><EFBFBD><EFBFBD>;3Sa<53>R<EFBFBD>^2Z<32><5A>
|
||||
BIN
tests/data/whole
Normal file
BIN
tests/data/whole
Normal file
Binary file not shown.
BIN
tests/data/whole2
Normal file
BIN
tests/data/whole2
Normal file
Binary file not shown.
BIN
tests/data/whole_whole2
Normal file
BIN
tests/data/whole_whole2
Normal file
Binary file not shown.
BIN
tests/data/whole_whole2_partial
Normal file
BIN
tests/data/whole_whole2_partial
Normal file
Binary file not shown.
34
zfs_autobackup/ZfsCheck.py
Normal file
34
zfs_autobackup/ZfsCheck.py
Normal file
@ -0,0 +1,34 @@
|
||||
import hashlib
|
||||
|
||||
from .util import block_hash
|
||||
from .CliBase import CliBase
|
||||
|
||||
|
||||
|
||||
|
||||
class ZfsCheck(CliBase):
|
||||
|
||||
def __init__(self, argv, print_arguments=True):
|
||||
|
||||
# NOTE: common options and parameters are in ZfsAuto
|
||||
super(ZfsCheck, self).__init__(argv, print_arguments)
|
||||
|
||||
def run(self):
|
||||
|
||||
|
||||
|
||||
# print(sha1sum("/home/psy/Downloads/carimage.zip"))
|
||||
for (block, h ) in block_hash("/home/psy/Downloads/carimage.zip" , count=10000):
|
||||
print(block)
|
||||
print (h)
|
||||
|
||||
|
||||
pass
|
||||
|
||||
def cli():
|
||||
import sys
|
||||
|
||||
sys.exit(ZfsCheck(sys.argv[1:], False).run())
|
||||
|
||||
if __name__ == "__main__":
|
||||
cli()
|
||||
Reference in New Issue
Block a user