20c1ecee775cf75cbd315e410ed91503f2eb75d2,api/app/data.py,Nodes,build_nodes,#Nodes#,60

Before Change



                        if "ignore" in node:
                            node["ignored"] = node["ignore"]
                            del node["ignore"]

                        if "prev_states" in node:
                            prev_states = ast.literal_eval(node["prev_states"])
                            node["first_seen"] = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(

After Change


                                    ipv4 = endpoint_data["ipv4"]
                                    if isinstance(ipv4, str) and ipv4 != "None":
                                        if "ipv4_subnet" in node:
                                            if "." in ipv4:
                                                node["ipv4_subnet"] = ".".join(
                                                    ipv4.split(".")[:-1])+".0/24"
                                            else:
                                                node["ipv4_subnet"] = "NO DATA"
                                        ipv4_info = self.r.hgetall(ipv4)
                                        if ipv4_info and "short_os" in ipv4_info:
                                            node["ipv4_os"] = ipv4_info["short_os"]
                                except Exception as e:  // pragma: no cover
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: CyberReboot/poseidon
Commit Name: 20c1ecee775cf75cbd315e410ed91503f2eb75d2
Time: 2019-03-01
Author: clewis@iqt.org
File Name: api/app/data.py
Class Name: Nodes
Method Name: build_nodes


Project Name: evilsocket/pwnagotchi
Commit Name: 90b0e10e81a5a0e03753715ec1034278bdd5f600
Time: 2019-10-07
Author: evilsocket@gmail.com
File Name: pwnagotchi/plugins/default/api.py
Class Name:
Method Name: parse_pcap


Project Name: CyberReboot/poseidon
Commit Name: 20c1ecee775cf75cbd315e410ed91503f2eb75d2
Time: 2019-03-01
Author: clewis@iqt.org
File Name: api/app/data.py
Class Name: Nodes
Method Name: build_nodes


Project Name: sahana/eden
Commit Name: be50c77d82ba2e7fb8d84981ade2f07cf366e3c3
Time: 2020-02-06
Author: fran@aidiq.com
File Name: modules/templates/UCCE/controllers.py
Class Name: dc_TargetReport
Method Name: extract