Given:
I have this strings inside of my sha1_vsdt.csv and a trendx.log file
So this is my samples inside of my csv file
--------------------SHA-1---------------|-----VSDT-----
3ecca1d4af42561676de09019ddc94a52b49efcc|MS Office 1-0,
3f99507159f62331af7dedafeaac9da47fd9338b|MS Office 1-0,
3fdd26300c7f86c1a24dd8b13e99d5d7abea0604|WIN32 EXE 7-2,
4016bf58ee14e73cc42d8de918c6547c6b3b8f42|MS Office 1-0,
0e13d281af08954102e7caf95864ef553c7277bd|WIN32 EXE 7-2,
And samples inside of my trendx.log file:
1537762040 0 1 1 1537733240 1537733240 1537733240 8224 98 88064 0e13d281af08954102e7caf95864ef553c7277bd Troj.Win32.TRX.XXPE50FFF026 c:\users\administrator\desktop\downloader\download\ Troj.Win32.TRX.XXPE50FFF026 Administrator 0e13d281af08954102e7caf95864ef553c7277bd ACIKwAgACIAIAQAAMQAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
Task:
My task is to match the SHA-1 strings in my SHA-1 column and find it's match in my trendx.log file and when it matched it should get the description then put it in the third column like this:
--------------------SHA-1---------------|-----VSDT-----|-------MATCH--------
3ecca1d4af42561676de09019ddc94a52b49efcc|MS Office 1-0,|undetected
3f99507159f62331af7dedafeaac9da47fd9338b|MS Office 1-0,|undetected
3fdd26300c7f86c1a24dd8b13e99d5d7abea0604|WIN32 EXE 7-2,|undetected
4016bf58ee14e73cc42d8de918c6547c6b3b8f42|MS Office 1-0,|undetected
0e13d281af08954102e7caf95864ef553c7277bd|WIN32 EXE 7-2,|TRENDX 172.20.4.179
If it doesn't find a match then it should put undetected in the third column. I don't have an idea to do this, I'm very new to python, any ideas will be very helpful to me.
Here are my full contents of csv and log file: