Subversion Repositories freemyipod

Rev

Rev 788 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 788 Rev 793
Line 25... Line 25...
25
import sys
25
import sys
26
import libipodcrypto
26
import libipodcrypto
27
 
27
 
28
 
28
 
29
def usage():
29
def usage():
30
  print("")
30
  print ""
31
  print("Please provide a command and (if needed) parameters as command line arguments")
31
  print "Please provide a command and (if needed) parameters as command line arguments"
32
  print("")
32
  print ""
33
  print("Available commands:")
33
  print "Available commands:"
34
  print("  s5l8701-cryptdfu <infile> <outfile>")
34
  print "  s5l8701-cryptdfu <infile> <outfile>"
35
  print("  s5l8701-decryptdfu <infile> <outfile>")
35
  print "  s5l8701-decryptdfu <infile> <outfile>"
36
  print("  s5l8701-cryptfirmware <infile> <outfile>")
36
  print "  s5l8701-cryptfirmware <infile> <outfile>"
37
  print("  s5l8701-decryptfirmware <infile> <outfile>")
37
  print "  s5l8701-decryptfirmware <infile> <outfile>"
38
  print("  s5l8702-cryptnor <infile> <outfile>")
38
  print "  s5l8702-cryptnor <infile> <outfile>"
39
  print("  s5l8702-decryptnor <infile> <outfile>")
39
  print "  s5l8702-decryptnor <infile> <outfile>"
40
  print("  s5l8702-genpwnage <infile> <outfile>")
40
  print "  s5l8702-genpwnage <infile> <outfile>"
-
 
41
  print "  s5l8702-genpwnage800 <infile> <outfile>"
41
  print("  s5l8720-genpwnage <infile> <outfile>")
42
  print "  s5l8720-genpwnage <infile> <outfile>"
42
  exit(2)
43
  exit(2)
43
 
44
 
44
 
45
 
45
def parsecommand(argv):
46
def parsecommand(argv):
46
  if len(argv) != 4: usage()
47
  if len(argv) != 4: usage()
Line 64... Line 65...
64
    libipodcrypto.s5l8702decryptnorfile(argv[2], argv[3])
65
    libipodcrypto.s5l8702decryptnorfile(argv[2], argv[3])
65
 
66
 
66
  elif argv[1] == "s5l8702-genpwnage":
67
  elif argv[1] == "s5l8702-genpwnage":
67
    libipodcrypto.s5l8702genpwnagefile(argv[2], argv[3])
68
    libipodcrypto.s5l8702genpwnagefile(argv[2], argv[3])
68
 
69
 
-
 
70
  elif argv[1] == "s5l8702-genpwnage800":
-
 
71
    libipodcrypto.s5l8702genpwnagefile800(argv[2], argv[3])
-
 
72
 
69
  elif argv[1] == "s5l8720-genpwnage":
73
  elif argv[1] == "s5l8720-genpwnage":
70
    libipodcrypto.s5l8720genpwnagefile(argv[2], argv[3])
74
    libipodcrypto.s5l8720genpwnagefile(argv[2], argv[3])
71
 
75
 
72
  else: usage()
76
  else: usage()
73
 
77