| skipped 717 lines |
718 | 718 | | if data.get("Name") in "AuthenticationPackageName": |
719 | 719 | | authname = data.text |
720 | 720 | | |
721 | | - | if username != "-" and ipaddress != "-" and ipaddress != "::1" and ipaddress != "127.0.0.1": |
722 | | - | event_series = pd.Series([eventid, ipaddress, username, logintype, status, authname], index=event_set.columns) |
| 721 | + | if username != "-" and ipaddress != "::1" and ipaddress != "127.0.0.1" and (ipaddress != "-" or hostname != "-"): |
| 722 | + | if ipaddress != "-": |
| 723 | + | event_series = pd.Series([eventid, ipaddress, username, logintype, status, authname], index=event_set.columns) |
| 724 | + | ml_series = pd.Series([etime.strftime("%Y-%m-%d %H:%M:%S"), username, ipaddress, eventid], index=ml_frame.columns) |
| 725 | + | else: |
| 726 | + | event_series = pd.Series([eventid, hostname, username, logintype, status, authname], index=event_set.columns) |
| 727 | + | ml_series = pd.Series([etime.strftime("%Y-%m-%d %H:%M:%S"), username, hostname, eventid], index=ml_frame.columns) |
723 | 728 | | event_set = event_set.append(event_series, ignore_index = True) |
| 729 | + | ml_frame = ml_frame.append(ml_series, ignore_index=True) |
724 | 730 | | # print("%s,%i,%s,%s,%s,%s" % (eventid, ipaddress, username, comment, logintype)) |
725 | 731 | | count_series = pd.Series([stime.strftime("%Y-%m-%d %H:%M:%S"), eventid, username], index=count_set.columns) |
726 | 732 | | count_set = count_set.append(count_series, ignore_index = True) |
727 | 733 | | # print("%s,%s" % (stime.strftime("%Y-%m-%d %H:%M:%S"), username)) |
728 | | - | ml_series = pd.Series([etime.strftime("%Y-%m-%d %H:%M:%S"), username, ipaddress, eventid], index=ml_frame.columns) |
729 | | - | ml_frame = ml_frame.append(ml_series, ignore_index=True) |
730 | 734 | | |
731 | 735 | | if domain != "-": |
732 | 736 | | domain_set.append([username, domain]) |
| skipped 4 lines |
737 | 741 | | if domain not in domains and domain != "-": |
738 | 742 | | domains.append(domain) |
739 | 743 | | |
740 | | - | if sid not in "-": |
| 744 | + | if sid != "-": |
741 | 745 | | sids[username] = sid |
742 | 746 | | |
743 | | - | if hostname not in "-": |
| 747 | + | if hostname != "-" and ipaddress != "-" : |
744 | 748 | | hosts[hostname] = ipaddress |
745 | 749 | | |
746 | 750 | | if authname in "NTML" and authname not in ntmlauth: |
| skipped 200 lines |