mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-24 08:05:13 +08:00
pyscripts: return error codes
This commit is contained in:
parent
8e29559db6
commit
00a4895440
3 changed files with 4 additions and 4 deletions
|
@ -23,4 +23,4 @@ def main(argv):
|
||||||
file_out.write(data)
|
file_out.write(data)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main(sys.argv)
|
sys.exit(main(sys.argv))
|
||||||
|
|
|
@ -25,4 +25,4 @@ def main(argv):
|
||||||
file_out.write("\n")
|
file_out.write("\n")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main(sys.argv)
|
sys.exit(main(sys.argv))
|
||||||
|
|
|
@ -38,7 +38,7 @@ def main():
|
||||||
Should produce the output:
|
Should produce the output:
|
||||||
|
|
||||||
\tTarget (BA) requires final LRC XOR byte value: 5A\n""".format(sys.argv[0]))
|
\tTarget (BA) requires final LRC XOR byte value: 5A\n""".format(sys.argv[0]))
|
||||||
return 0
|
return 1
|
||||||
|
|
||||||
target= int(sys.argv[len(sys.argv) - 1],16)
|
target= int(sys.argv[len(sys.argv) - 1],16)
|
||||||
|
|
||||||
|
@ -48,4 +48,4 @@ def main():
|
||||||
print('\nTarget (%02X) requires final LRC XOR byte value: %02X\n' % (target,lrc))
|
print('\nTarget (%02X) requires final LRC XOR byte value: %02X\n' % (target,lrc))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
sys.exit(main())
|
||||||
|
|
Loading…
Reference in a new issue