(exe)
| 103 | |
| 104 | |
| 105 | def copyCert(exe): |
| 106 | flItms = gather_file_info_win(exe) |
| 107 | |
| 108 | if flItms['CertLOC'] == 0 or flItms['CertSize'] == 0: |
| 109 | # not signed |
| 110 | print("Input file Not signed!") |
| 111 | sys.exit(-1) |
| 112 | |
| 113 | with open(exe, 'rb') as f: |
| 114 | f.seek(flItms['CertLOC'], 0) |
| 115 | cert = f.read(flItms['CertSize']) |
| 116 | return cert |
| 117 | |
| 118 | |
| 119 | def writeCert(cert, exe, output): |
no test coverage detected