SearchBin
SearchBin copied to clipboard
Fails to parse buffer-size when file input is used
searchbin -t text -b 8388608 bigfile
works but: searchbin -f file -b 8388608 bigfile
Fails with the following error on Python 2.7.14
Traceback (most recent call last): File "/root/bin/searchbin", line 423, in <module> main() File "/root/bin/searchbin", line 402, in main args = verify_args(args) # Check arguments for sanity, and edit them a bit. File "/root/bin/searchbin", line 254, in verify_args if ar.bsize < len("?".join(ar.pattern)) * 2: UnicodeDecodeError: 'ascii' codec can't decode byte 0x9d in position 1: ordinal not in range(128)
My apologies for the late reply. Try using Python3 (or use the default buffer size)? It's a problem with how Python2 reads characters. Sincerely Thank you for bringing it to my attention. I haven't had the time to fix this yet.