Python Function To Get Killer+Profile Name+SteamID+Legacy

Posts 1–15 of 70 · Page 1 of 5
Python Function To Get Killer+Profile Name+SteamID+Legacy
This is a function that gets killer related information directly from the log file super fast

Don't ask how to use it.

Just put it in python and call it

Thanks to steamid . io the function gets killer name and prints it out as well.

Killers Steam Profile is automatically copied to clipboard so you can just Ctrl+v to paste it in your broswser

Requires Python Requests module to be installed. The OS module comes bundled with python


Code:
import os
import requests
path = os.path.expandvars(r'%LOCALAPPDATA%')
legacy = ''
yourId = ''
killerId = ''
def addToClipBoard(text):
    command = 'echo ' + text.strip() + '| clip'
    os.system(command)
def getKiller():
    global label
    global path

    global legacy
    global yourId
    global isTwice
    global killerID
    isTwice = False

    file = open(path + '\DeadByDaylight\Saved\Logs\DeadByDaylight.log', 'r')
    try:
        x = x1 = x2 = x3 = file.read()
    except:
        os.remove(path + '\DeadByDaylight\Saved\Logs\DeadByDaylight.log')
    file.close()
    x = x.split('Spawn new pawn characterId 2684354')
    x1 = x1.split()
    x1.reverse()

    name = 'Killer Name:'

    x2 = x2.split('LogOnline: Verbose: Mirrors: [FOnlineSessionMirrors::AddSessionPlayer] Session:GameSession ')

    killer = str(x[len(x) - 1].split('.')[0])
    yourId = (str(x2[len(x2) - 1].split('\n[')[0]))[46:]
    verifyKiller = (((((str(x2[len(x2) - 1].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
    try:
        yourId2 = (str(x2[len(x2) - 2].split('\n[')[0]))[46:]
        yourId3 = (str(x2[len(x2) - 3].split('\n[')[0]))[46:]
        yourId4 = (str(x2[len(x2) - 4].split('\n[')[0]))[46:]
        yourId5 = (str(x2[len(x2) - 5].split('\n[')[0]))[46:]
        verifyKiller2 = (((((str(x2[len(x2) - 2].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
        verifyKiller3 = (((((str(x2[len(x2) - 3].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
        verifyKiller4 = (((((str(x2[len(x2) - 4].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
        verifyKiller5 = (((((str(x2[len(x2) - 5].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
    except:
        pass

    if killer == '56':
            kname = legacy + 'Killer : Trapper'

            count = 0
            count2 = 0
            for s in x1:
                if (count2 < 3):
                    if (s[:3] == 'TR_'):
                        count2 = count2 + 1
                    if (s[:3] == 'TR_' and s[len(s) - 4:len(s)] == 'LP01'):
                        legacy = 'isLegacy: Yes \n'
                        count = 1
                    elif (s[:3] == 'TR_' and s[len(s) - 4:len(s)] != 'LP01' and (count == 0)):
                        legacy = 'isLegacy: No \n'
                else:
                    break

    elif killer == '57':

            count = 0
            count2 = 0
            for s in x1:
                if (count2 < 3):
                    if (s[:3] == 'WR_'):
                        count2 = count2 + 1
                    if (s[:3] == 'WR_' and s[len(s) - 4:len(s)] == 'LP01'):
                        legacy = 'isLegacy: Yes \n'
                        count = 1
                    elif (s[:3] == 'WR_' and s[len(s) - 4:len(s)] != 'LP01' and (count == 0)):
                        legacy = 'isLegacy: No \n'
                else:
                    break
            kname = legacy + 'Killer : Wraith'
    elif killer == '58':

            count = 0
            count2 = 0
            for s in x1:
                if (count2 < 3):
                    if (s[:3] == 'HB_'):
                        count2 = count2 + 1
                    if (s[:3] == 'HB_' and s[len(s) - 4:len(s)] == 'LP01'):
                        legacy = 'isLegacy: Yes \n'
                        count = 1
                    elif (s[:3] == 'HB_' and s[len(s) - 4:len(s)] != 'LP01' and (count == 0)):
                        legacy = 'isLegacy: No \n'
                else:
                    break
            kname = legacy + 'Killer: Billy'
    elif killer == '59':

            count = 0
            count2 = 0
            for s in x1:
                if (count2 < 3):
                    if (s[:3] == 'NR_'):
                        count2 = count2 + 1
                    if (s[:3] == 'NR_' and s[len(s) - 4:len(s)] == 'LP01'):
                        legacy = 'isLegacy: Yes \n'
                        count = 1
                    elif (s[:3] == 'NR_' and s[len(s) - 4:len(s)] != 'LP01' and (count == 0)):
                        legacy = 'isLegacy: No \n'
                else:
                    break
            kname = legacy + 'Killer : Nurse'
    elif killer == '63':
        kname = 'Killer : Huntress'
    elif killer == '61':
        kname = 'Killer : Myers'
    elif killer == '60':
        kname = 'Killer : The Hag'
    elif killer == '62':
        kname = 'Killer : Doctor'
    elif killer == '65':
        kname = 'Killer : Freddy'
    elif killer == '64':
        kname = 'Killer : Cannibal'
    elif killer == '66':
        kname = 'Killer : Pig'
    elif killer == '67':
        kname = 'Killer : Clown'
    elif killer == '68':
        kname = 'Killer : Spirit'
    elif killer == '69':
        kname = 'Killer : Legion'
    elif killer == '70':
        kname = 'Killer : Plague'
    elif killer == '71':
        kname = 'Killer: GhostFace'
    elif killer == '72':
        kname = 'Killer : Demogorgon'
    elif killer == '73':
        kname = 'Killer : Oni'
    elif killer == '74':
        kname = 'Killer : Deathslinger'

    proxies = {
        "http": None,
        "https": None,
    }
    kS = ["GK", "CA", "QK", "DO", "SD", "OK", "BE", "WI", "UK", "TC", "KK", "MM", "TN", "FK", "MK", "HK",
          "SwedenKiller", "TW", "TR"]
    if True:
        if (verifyKiller in kS):
            isTwice = True
        elif (verifyKiller2 in kS) and isTwice == False:
            isTwice = True
            yourId = yourId2
        elif (verifyKiller3 in kS) and isTwice == False:
            isTwice = True
            yourId = yourId3
        elif (verifyKiller4 in kS) and isTwice == False:
            isTwice = True
            yourId = yourId4
        elif (verifyKiller5 in kS) and isTwice == False:
            isTwice = True
            yourId = yourId5
        try:
            r = requests.post('https://steamid.io/lookup/' + str(yourId), timeout=5,
                              proxies=proxies)
        except:
            print('error')
            return
        name = r.text
        name = name.split('"name": "')
        fname = str(name[1]).split('"')
        if isTwice == True:
            addToClipBoard("https://steamcommunity.com/profiles/" + yourId)
            print(kname + '\n' + yourId + '\n' + fname[0])
            killerID = yourId
        else:
            print(kname + '\n' + 'No Name/SteamID')

Credits: Me and @JustTheAndy
Quote Originally Posted by geoxhon View Post
This is a function that gets killer related information directly from the log file super fast

Don't ask how to use it.

Just put it in python and call it

Thanks to steamid . io the function gets killer name and prints it out as well.

Killers Steam Profile is automatically copied to clipboard so you can just Ctrl+v to paste it in your broswser

Requires Python Requests module to be installed. The OS module comes bundled with python


Code:
import os
import requests
path = os.path.expandvars(r'%LOCALAPPDATA%')
legacy = ''
yourId = ''
killerId = ''
def addToClipBoard(text):
    command = 'echo ' + text.strip() + '| clip'
    os.system(command)
def getKiller():
    global label
    global path

    global legacy
    global yourId
    global isTwice
    global killerID
    isTwice = False

    file = open(path + '\DeadByDaylight\Saved\Logs\DeadByDaylight.log', 'r')
    try:
        x = x1 = x2 = x3 = file.read()
    except:
        os.remove(path + '\DeadByDaylight\Saved\Logs\DeadByDaylight.log')
    file.close()
    x = x.split('Spawn new pawn characterId 2684354')
    x1 = x1.split()
    x1.reverse()

    name = 'Killer Name:'

    x2 = x2.split('LogOnline: Verbose: Mirrors: [FOnlineSessionMirrors::AddSessionPlayer] Session:GameSession ')

    killer = str(x[len(x) - 1].split('.')[0])
    yourId = (str(x2[len(x2) - 1].split('\n[')[0]))[46:]
    verifyKiller = (((((str(x2[len(x2) - 1].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
    try:
        yourId2 = (str(x2[len(x2) - 2].split('\n[')[0]))[46:]
        yourId3 = (str(x2[len(x2) - 3].split('\n[')[0]))[46:]
        yourId4 = (str(x2[len(x2) - 4].split('\n[')[0]))[46:]
        yourId5 = (str(x2[len(x2) - 5].split('\n[')[0]))[46:]
        verifyKiller2 = (((((str(x2[len(x2) - 2].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
        verifyKiller3 = (((((str(x2[len(x2) - 3].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
        verifyKiller4 = (((((str(x2[len(x2) - 4].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
        verifyKiller5 = (((((str(x2[len(x2) - 5].split('GameFlow: Verbose:')[0]))[509:]).split('\n'))[0]).split('_'))[0]
    except:
        pass

    if killer == '56':
            kname = legacy + 'Killer : Trapper'

            count = 0
            count2 = 0
            for s in x1:
                if (count2 < 3):
                    if (s[:3] == 'TR_'):
                        count2 = count2 + 1
                    if (s[:3] == 'TR_' and s[len(s) - 4:len(s)] == 'LP01'):
                        legacy = 'isLegacy: Yes \n'
                        count = 1
                    elif (s[:3] == 'TR_' and s[len(s) - 4:len(s)] != 'LP01' and (count == 0)):
                        legacy = 'isLegacy: No \n'
                else:
                    break

    elif killer == '57':

            count = 0
            count2 = 0
            for s in x1:
                if (count2 < 3):
                    if (s[:3] == 'WR_'):
                        count2 = count2 + 1
                    if (s[:3] == 'WR_' and s[len(s) - 4:len(s)] == 'LP01'):
                        legacy = 'isLegacy: Yes \n'
                        count = 1
                    elif (s[:3] == 'WR_' and s[len(s) - 4:len(s)] != 'LP01' and (count == 0)):
                        legacy = 'isLegacy: No \n'
                else:
                    break
            kname = legacy + 'Killer : Wraith'
    elif killer == '58':

            count = 0
            count2 = 0
            for s in x1:
                if (count2 < 3):
                    if (s[:3] == 'HB_'):
                        count2 = count2 + 1
                    if (s[:3] == 'HB_' and s[len(s) - 4:len(s)] == 'LP01'):
                        legacy = 'isLegacy: Yes \n'
                        count = 1
                    elif (s[:3] == 'HB_' and s[len(s) - 4:len(s)] != 'LP01' and (count == 0)):
                        legacy = 'isLegacy: No \n'
                else:
                    break
            kname = legacy + 'Killer: Billy'
    elif killer == '59':

            count = 0
            count2 = 0
            for s in x1:
                if (count2 < 3):
                    if (s[:3] == 'NR_'):
                        count2 = count2 + 1
                    if (s[:3] == 'NR_' and s[len(s) - 4:len(s)] == 'LP01'):
                        legacy = 'isLegacy: Yes \n'
                        count = 1
                    elif (s[:3] == 'NR_' and s[len(s) - 4:len(s)] != 'LP01' and (count == 0)):
                        legacy = 'isLegacy: No \n'
                else:
                    break
            kname = legacy + 'Killer : Nurse'
    elif killer == '63':
        kname = 'Killer : Huntress'
    elif killer == '61':
        kname = 'Killer : Myers'
    elif killer == '60':
        kname = 'Killer : The Hag'
    elif killer == '62':
        kname = 'Killer : Doctor'
    elif killer == '65':
        kname = 'Killer : Freddy'
    elif killer == '64':
        kname = 'Killer : Cannibal'
    elif killer == '66':
        kname = 'Killer : Pig'
    elif killer == '67':
        kname = 'Killer : Clown'
    elif killer == '68':
        kname = 'Killer : Spirit'
    elif killer == '69':
        kname = 'Killer : Legion'
    elif killer == '70':
        kname = 'Killer : Plague'
    elif killer == '71':
        kname = 'Killer: GhostFace'
    elif killer == '72':
        kname = 'Killer : Demogorgon'
    elif killer == '73':
        kname = 'Killer : Oni'
    elif killer == '74':
        kname = 'Killer : Deathslinger'

    proxies = {
        "http": None,
        "https": None,
    }
    kS = ["GK", "CA", "QK", "DO", "SD", "OK", "BE", "WI", "UK", "TC", "KK", "MM", "TN", "FK", "MK", "HK",
          "SwedenKiller", "TW", "TR"]
    if True:
        if (verifyKiller in kS):
            isTwice = True
        elif (verifyKiller2 in kS) and isTwice == False:
            isTwice = True
            yourId = yourId2
        elif (verifyKiller3 in kS) and isTwice == False:
            isTwice = True
            yourId = yourId3
        elif (verifyKiller4 in kS) and isTwice == False:
            isTwice = True
            yourId = yourId4
        elif (verifyKiller5 in kS) and isTwice == False:
            isTwice = True
            yourId = yourId5
        try:
            r = requests.post('https://steamid.io/lookup/' + str(yourId), timeout=5,
                              proxies=proxies)
        except:
            print('error')
            return
        name = r.text
        name = name.split('"name": "')
        fname = str(name[1]).split('"')
        if isTwice == True:
            addToClipBoard("https://steamcommunity.com/profiles/" + yourId)
            print(kname + '\n' + yourId + '\n' + fname[0])
            killerID = yourId
        else:
            print(kname + '\n' + 'No Name/SteamID')
Credits: Me and @JustTheAndy

Insane! Thank you for sharing it!
Awesome thanks man for sharing
Help
It just opens and then closes for me, no information about the killer appears.
What version of Python are you using?
Quote Originally Posted by makazi View Post
It just opens and then closes for me, no information about the killer appears.
What version of Python are you using?
You need to actually call the function you know? Just copy pasting this wont work.
Ya
Quote Originally Posted by geoxhon View Post
You need to actually call the function you know? Just copy pasting this wont work.
Ya, i did the killer.py file
and a .bat calling the .py

py killer.py
Good work, although like the user above I cannot seem to get it to work. I won't ask of you to explain how to use it since you clearly don't want to, so I'll wait until someone else can. And yes I do have the requests module installed.
Quote Originally Posted by Observant View Post
Good work, although like the user above I cannot seem to get it to work. I won't ask of you to explain how to use it since you clearly don't want to, so I'll wait until someone else can. And yes I do have the requests module installed.
Quote Originally Posted by makazi View Post
Ya, i did the killer.py file
and a .bat calling the .py

py killer.py
I mean if you are running a script that literally defines 2 functions I wouldnt expect it to work either. Try maybe calling the getkiller() function next time
Quote Originally Posted by makazi View Post
Ya, i did the killer.py file
and a .bat calling the .py

py killer.py
Code:
import keyboard
def example():
    getKiller()
shortcut = 'ctrl+h'
keyboard.add_hotkey(shortcut, example)
Like this you can call getKiller() each time you press ctrl+h and get the output.
(And btw each time you call getKiller() , killer's steam profile gets copied in your clipboard, to paste it just press ctrl+v anywhere)
Oh ty
Quote Originally Posted by JustTheAndy View Post
Code:
import keyboard
def example():
    getKiller()
shortcut = 'ctrl+h'
keyboard.add_hotkey(shortcut, example)
Like this you can call getKiller() each time you press ctrl+h and get the output.
(And btw each time you call getKiller() , killer's steam profile gets copied in your clipboard, to paste it just press ctrl+v anywhere)

So should I add this to my code?
I'm not sure how to work with python
Quote Originally Posted by geoxhon View Post
restart your pc and delete dbd logs

Yes ty. All it needed was a restart and deleting the log files

- - - Updated - - -

Sometimes it says No Name/Steamid. Is it because the profile is private?
Quote Originally Posted by xXKing_AsgoreXx View Post
Yes ty. All it needed was a restart and deleting the log files

- - - Updated - - -

Sometimes it says No Name/Steamid. Is it because the profile is private?
No. The source is for learning purposes. Sometimes it has some problems.
Iget this: "PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\meowzer\\AppData\\Local\\DeadByDayligh t\\Saved\\Logs\\DeadByDaylight.log'"

Ran cmd with admin and only dbd is using the log
Quote Originally Posted by xXKing_AsgoreXx View Post
Iget this: "PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\meowzer\\AppData\\Local\\DeadByDayligh t\\Saved\\Logs\\DeadByDaylight.log'"

Ran cmd with admin and only dbd is using the log
restart your pc and delete dbd logs
Quote Originally Posted by xXKing_AsgoreXx View Post
Iget this: "PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\meowzer\\AppData\\Local\\DeadByDayligh t\\Saved\\Logs\\DeadByDaylight.log'"

Ran cmd with admin and only dbd is using the log
Means it's not able to read DeadByDaylight.log
go to C:\Users\meowzer\AppData\Local\DeadByDaylight\Save d\Logs\
And check if you have an txt file called DeadByDaylight.log.
You obviously need dbd opened and be in a lobby maybe if you want to get the infos
Posts 1–15 of 70 · Page 1 of 5
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us