( kantal | 2017. 08. 03., cs – 09:18 )

Ha esetleg jó Pythonban is (csak futólag teszteltem):


#!/usr/bin/env python3
#-*- coding:utf-8 -*-

# file1 tartalma soronként: hash:salt:ID
# file2 tartalma soronként: username:hash:salt
# output file3:  username:hash:salt:ID

f1,f2,f3 = open("file1.txt"),open("file2.txt"),open("file3.txt","w")
l1,l2,l3 = [],[],[]

for line in f1:
    line= line.strip()
    if line:
        hashi,salt,ID = line.split(':')
        l1.append( [ hashi.strip(), salt.strip(),ID.strip() ] )
f1.close()

for line in f2:
    line= line.strip()
    if line:
        user,hashi,salt = line.split(':')
        l2.append( [ user.strip(), hashi.strip(), salt.strip()] )
f2.close()

for hashi,salt,ID in l1:
    for user,h2,s2 in l2:
        if h2==hashi and s2==salt:
            f3.write(user+":"+h2+":"+s2+":"+ID+"\n")
f3.close()

--
eutlantis