View difference between Paste ID: QaZxmKN7 and tUZRpMDq
SHOW: | | - or go back to the newest paste.
1
import os
2
from random import randint
3
from shutil import copyfile
4
5
# create array item for each jpg in the logon folder
6
jpgs = []
7
for root, dirs, files in os.walk(r"C:\Logons"):
8
    for file in files:
9
        if file.endswith('.jpg'):
10
            jpgs.append(os.path.abspath(os.path.join(root, file)))
11-
http://pastebin.com/oauth/login-twitter.php
11+
12
# select random array item to be copied to system32\oobe..\backgrounds
13
copyfile(jpgs[randint(0, jpgs.__len__() - 1)],
14
     r"C:\Windows\System32\oobe\info\backgrounds\backgroundDefault.jpg")