Closed tangxun1688 closed 4 years ago
As I mentioned in the README, you will need ghostscript and turbojpeg installed and on your PATH. I also haven't tested this script with Windows, so it's possible that there's an incompatibility.
I'm not seeing the last line of the exception - mind posting that?
[18:11:24] INFO: rendering file 1...
Traceback (most recent call last):
File "collide.py", line 317, in
Yes, as mentioned you will need GhostScript (gs) installed on your PATH somewhere. The sha1collider uses ghostscript to render PDF files into images for embedding.
I think I successfully installed GS, but it still doesn't work. BTW, I am not sure how to install turbojpeg.
D:\Study\infromationSecurity\SHA1>python collide.py PDF1.pdf PDF2.pdf
[18:32:46] INFO: rendering file 1...
Traceback (most recent call last):
File "collide.py", line 359, in
You'll need to add the path to the gs binary in your PATH and restart your console. For turbojpeg, if you have the cjpeg binary that will be enough; you might be able to find a copy of a prebuilt Windows version, or compile the source build from ijg.
If you're on Linux or Mac, your package manager probably has ghostscript and turbojpeg available.
Hi, I just want to use the code to test, but I found out that maybe something wrong with subprocess.py, I will attach the error so you can tell me what's going on?
Thank you so much.
D:\Study\infromationSecurity\SHA1>python collide.py PDF1.pdf PDF2.pdf [17:58:23] INFO: rendering file 1... Traceback (most recent call last): File "collide.py", line 359, in
exit(main(sys.argv[1:]))
File "collide.py", line 351, in main
doit(outdir, args)
File "collide.py", line 253, in doit
'-o', os.path.join(outdir, 't%d-%%04d.png' % (i + 1)), fn])
File "C:\Users\Ryan\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 342, in check_call
retcode = call(*popenargs, *kwargs)
File "C:\Users\Ryan\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 323, in call
with Popen(popenargs, **kwargs) as p:
File "C:\Users\Ryan\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "C:\Users\Ryan\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1178, in _execute_child
startupinfo)