Hello,
I have a bunch of logs and I would like to extract information from it:
EXAMPLE 1:
mdm-tlv=device-platform=win, mdm-tlv=device-mac=d4-25-8b-db-aa-bb, mdm-tlv=device-type=LENOVO 20JVS04J00, mdm-tlv=device-platform-version=10.0.16299 , mdm-tlv=device-uid=28A903C8C190CE102E1A29DFC2A231921911ED16D377E31CD235648A6BC2A41B, audit-session-id=0acd0164050200004b6359c5, ip:source-ip=1.2.3.4, coa-push=true
EXAMPLE 2:
mdm-tlv=device-platform=win, mdm-tlv=device-mac=d4-25-8b-db-cc-dd, mdm-tlv=device-type=LENOVO 20JVS04J00, mdm-tlv=device-platform-version=10.0.16299 , mdm-tlv=device-uid=AADD364FDA6CFAE37C334BD7D6790DCF78D10CE6A25FD1AA04EBCBCFE4E59E8A, audit-session-id=0acd01640501e0005b6359ba, ip:source-ip=1.2.3.4, coa-push=true
EXAMPLE 3:
mdm-tlv=device-platform=win, mdm-tlv=device-mac=00-a0-c6-00-cc-aa, mdm-tlv=device-type=LENOVO 20FMS2WM07, mdm-tlv=device-platform-version=6.1.7601 Service Pack 1, mdm-tlv=device-uid=71DD364FDA6CFAE37C334BD7D6790DCF78D10CE6A25FD1AA04EBCBCFE4E59E8A, audit-session-id=0acd0164050060005b635522, ip:source-ip=1.2.3.4, coa-push=true
EXAMPLE4:
mdm-tlv=device-platform=win, mdm-tlv=device-mac=00-a0-c6-00-bb-dd, mdm-tlv=device-type=LENOVO 20FMS2WM07, mdm-tlv=device-platform-version=6.1.7601 Service Pack 1, mdm-tlv=device-uid=71DD364FDA6CFDE27C334BD7D6790DCF78D10CE6A25FD1AA04EBCBCFE4E59E8A, audit-session-id=0acd016404ffd0005b635443, ip:source-ip=1.2.3.4, coa-push=true
I need someone to build a function that receives a whole string (e.g: EXAMPLE1) and returns the UID value of 28A903C8C190CE102E1A29DFC2A231921911ED16D377E31CD235648A6BC2A41B.
If it's relevant, I am using Python3 and Pandas.
Please only bid if you are ready to work immediately.
I can write a script for you that will do this using your examples and you can tie it in with your existing program if you like. Additionally, I would be available to assist in that as well for a nominal fee.
I've already written a quick one-liner with .split() and .strip(). If there are more complex strings or performance considerations I can look into this further.
Output on my screen currently:
>>> for e in examples:
... print(GetUID(e))
...
28A903C8C190CE102E1A29DFC2A231921911ED16D377E31CD235648A6BC2A41B
AADD364FDA6CFAE37C334BD7D6790DCF78D10CE6A25FD1AA04EBCBCFE4E59E8A
71DD364FDA6CFAE37C334BD7D6790DCF78D10CE6A25FD1AA04EBCBCFE4E59E8A
71DD364FDA6CFDE27C334BD7D6790DCF78D10CE6A25FD1AA04EBCBCFE4E59E8A