Changing Type to NodeType to avoid issues
This commit is contained in:
parent
84e4937f85
commit
1528c28d7e
26
DEMO.md
26
DEMO.md
|
@ -2,14 +2,17 @@
|
||||||
|
|
||||||
```graphql
|
```graphql
|
||||||
{
|
{
|
||||||
Node(func: eq(type, "matcher")){
|
Node(func: eq(nodeType, "matcher")){
|
||||||
id
|
id
|
||||||
target
|
target
|
||||||
type
|
nodeType
|
||||||
full
|
full
|
||||||
nodes {
|
nodes {
|
||||||
uid
|
uid
|
||||||
full
|
full
|
||||||
|
meta {
|
||||||
|
full_url
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +22,7 @@
|
||||||
{
|
{
|
||||||
Node(func: has(nodes) ) {
|
Node(func: has(nodes) ) {
|
||||||
uid
|
uid
|
||||||
type
|
nodeType
|
||||||
target
|
target
|
||||||
timestamp
|
timestamp
|
||||||
nodes {
|
nodes {
|
||||||
|
@ -33,6 +36,23 @@
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```graphql
|
||||||
|
{
|
||||||
|
Node(func: eq(nodeType, "certstream")){
|
||||||
|
id
|
||||||
|
nodeType
|
||||||
|
certNode {
|
||||||
|
cn
|
||||||
|
sourceName
|
||||||
|
fingerprint
|
||||||
|
notBefore
|
||||||
|
notAfter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
* There is TOO MUCH junk data
|
* There is TOO MUCH junk data
|
||||||
|
|
20
README.md
20
README.md
|
@ -79,7 +79,7 @@ query {
|
||||||
uid
|
uid
|
||||||
ndata
|
ndata
|
||||||
modified
|
modified
|
||||||
type
|
nodeType
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ query {
|
||||||
uid
|
uid
|
||||||
created
|
created
|
||||||
modified
|
modified
|
||||||
type
|
nodeType
|
||||||
ndata
|
ndata
|
||||||
certNode {
|
certNode {
|
||||||
uid
|
uid
|
||||||
|
@ -126,7 +126,7 @@ query {
|
||||||
uid
|
uid
|
||||||
created
|
created
|
||||||
modified
|
modified
|
||||||
type
|
nodeType
|
||||||
ndata
|
ndata
|
||||||
pasteNode {
|
pasteNode {
|
||||||
id
|
id
|
||||||
|
@ -161,7 +161,7 @@ query {
|
||||||
uid
|
uid
|
||||||
created
|
created
|
||||||
modified
|
modified
|
||||||
type
|
nodeType
|
||||||
full
|
full
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,7 @@ Node --[Edge]-- Node
|
||||||
```go
|
```go
|
||||||
type Node struct {
|
type Node struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Type string `json:"type"`
|
NodeType string `json:"nodeType"`
|
||||||
Data string `json:"data"` // For plain Node, the data is the ID of another typed node or a unique value like a domain or a host name.
|
Data string `json:"data"` // For plain Node, the data is the ID of another typed node or a unique value like a domain or a host name.
|
||||||
Created string `json:"created"`
|
Created string `json:"created"`
|
||||||
Modified string `json:"modified"`
|
Modified string `json:"modified"`
|
||||||
|
@ -221,7 +221,7 @@ Node -- CertNode -- CertStreamRaw
|
||||||
// data receive in a Go structure.
|
// data receive in a Go structure.
|
||||||
type CertStreamRaw struct {
|
type CertStreamRaw struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Type string `json:"type"`
|
NodeType string `json:"nodeType"`
|
||||||
Data CertStreamStruct `json:"data"`
|
Data CertStreamStruct `json:"data"`
|
||||||
Created string `json:"created"`
|
Created string `json:"created"`
|
||||||
Modified string `json:"modified"`
|
Modified string `json:"modified"`
|
||||||
|
@ -251,7 +251,7 @@ Node -- PasteNode -- FullPaste
|
||||||
// PasteNode is a node from PasteBin.
|
// PasteNode is a node from PasteBin.
|
||||||
type PasteNode struct {
|
type PasteNode struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Type string `json:"type"`
|
NodeType string `json:"nodeType"`
|
||||||
Data FullPaste `json:"data"`
|
Data FullPaste `json:"data"`
|
||||||
Created string `json:"create"`
|
Created string `json:"create"`
|
||||||
Modified string `json:"modified"`
|
Modified string `json:"modified"`
|
||||||
|
@ -261,7 +261,7 @@ type PasteNode struct {
|
||||||
type FullPaste struct {
|
type FullPaste struct {
|
||||||
Meta PasteMeta `json:"meta"`
|
Meta PasteMeta `json:"meta"`
|
||||||
Full string `json:"full"`
|
Full string `json:"full"`
|
||||||
Type string `json:"type"`
|
NodeType string `json:"nodeType"`
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ Node -- ShodanNode -- Node(s) (hostnames and domains)
|
||||||
```go
|
```go
|
||||||
type ShodanNode struct {
|
type ShodanNode struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Type string `json:"type"`
|
NodeType string `json:"nodeType"`
|
||||||
Data *shodan.HostData `json:"data"`
|
Data *shodan.HostData `json:"data"`
|
||||||
Created string `json:"created"`
|
Created string `json:"created"`
|
||||||
Modified string `json:"modified"`
|
Modified string `json:"modified"`
|
||||||
|
@ -289,7 +289,7 @@ Node -- ShodanNode -- Node (domain) -- BalboaNode
|
||||||
```go
|
```go
|
||||||
type BalboaNode struct {
|
type BalboaNode struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Type string `json:"type"`
|
NodeType string `json:"nodeType"`
|
||||||
Data []balboa.Entries `json:"data"`
|
Data []balboa.Entries `json:"data"`
|
||||||
Created string `json:"created"`
|
Created string `json:"created"`
|
||||||
Modified string `json:"modified"`
|
Modified string `json:"modified"`
|
||||||
|
|
|
@ -55,7 +55,7 @@ func loadTargets(graphClient *dgo.Dgraph) error {
|
||||||
Timestamp: rfc3339time,
|
Timestamp: rfc3339time,
|
||||||
Target: scanner.Text(),
|
Target: scanner.Text(),
|
||||||
Nodes: []models.Node{},
|
Nodes: []models.Node{},
|
||||||
Type: "matcher",
|
NodeType: "matcher",
|
||||||
}
|
}
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
query := `query eq($a: string){
|
query := `query eq($a: string){
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package main
|
package styx
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
|
@ -37,7 +37,7 @@ func setupDgraphSchema(c *dgo.Dgraph) error {
|
||||||
err := c.Alter(context.Background(), &api.Operation{
|
err := c.Alter(context.Background(), &api.Operation{
|
||||||
Schema: `
|
Schema: `
|
||||||
id: string @index(exact, term) .
|
id: string @index(exact, term) .
|
||||||
type: string @index(term) .
|
nodeType: string @index(term) .
|
||||||
ndata: string .
|
ndata: string .
|
||||||
nodeOne: uid .
|
nodeOne: uid .
|
||||||
nodeTwo: uid .
|
nodeTwo: uid .
|
||||||
|
@ -53,7 +53,7 @@ match: uid .
|
||||||
|
|
||||||
type Node {
|
type Node {
|
||||||
id: string
|
id: string
|
||||||
type: string
|
nodeType: string
|
||||||
ndata: string
|
ndata: string
|
||||||
created: string
|
created: string
|
||||||
modified: string
|
modified: string
|
||||||
|
@ -107,7 +107,7 @@ chain: CertNode
|
||||||
|
|
||||||
type CertRaw {
|
type CertRaw {
|
||||||
id: string
|
id: string
|
||||||
type: string
|
nodeType: string
|
||||||
created: string
|
created: string
|
||||||
modified: string
|
modified: string
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ hostData: uid .
|
||||||
|
|
||||||
type ShodanNode {
|
type ShodanNode {
|
||||||
id: string
|
id: string
|
||||||
type: string
|
nodeType: string
|
||||||
created: string
|
created: string
|
||||||
modified: string
|
modified: string
|
||||||
hostData: uid
|
hostData: uid
|
||||||
|
@ -187,12 +187,12 @@ user: string
|
||||||
type FullPaste {
|
type FullPaste {
|
||||||
meta: PasteMeta
|
meta: PasteMeta
|
||||||
full: string
|
full: string
|
||||||
type: string
|
nodeType: string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PasteNode {
|
type PasteNode {
|
||||||
id: string
|
id: string
|
||||||
type: string
|
nodeType: string
|
||||||
created: string
|
created: string
|
||||||
modified: string
|
modified: string
|
||||||
fullPaste: FullPaste
|
fullPaste: FullPaste
|
||||||
|
|
|
@ -87,7 +87,7 @@ func loadTargets(graphClient *dgo.Dgraph) ([]string, error) {
|
||||||
Timestamp: rfc3339time,
|
Timestamp: rfc3339time,
|
||||||
Target: scanner.Text(),
|
Target: scanner.Text(),
|
||||||
Nodes: []models.Node{},
|
Nodes: []models.Node{},
|
||||||
Type: "matcher",
|
NodeType: "matcher",
|
||||||
}
|
}
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
query := `query eq($a: string){
|
query := `query eq($a: string){
|
||||||
|
@ -175,7 +175,7 @@ func runPasteMatcher(target string, graphClient *dgo.Dgraph) {
|
||||||
q := `query allofterms($a: string) {
|
q := `query allofterms($a: string) {
|
||||||
Node(func: allofterms(full, $a)) {
|
Node(func: allofterms(full, $a)) {
|
||||||
uid
|
uid
|
||||||
type
|
nodeType
|
||||||
full
|
full
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ Node(func: allofterms(full, $a)) {
|
||||||
Timestamp: rfc3339time,
|
Timestamp: rfc3339time,
|
||||||
Target: target,
|
Target: target,
|
||||||
Nodes: []models.Node{},
|
Nodes: []models.Node{},
|
||||||
Type: "matcher",
|
NodeType: "matcher",
|
||||||
}
|
}
|
||||||
if len(n.Result) != 0 {
|
if len(n.Result) != 0 {
|
||||||
time.Sleep(time.Duration(2) * time.Second)
|
time.Sleep(time.Duration(2) * time.Second)
|
||||||
|
@ -221,7 +221,7 @@ Node(func: allofterms(full, $a)) {
|
||||||
|
|
||||||
query := fmt.Sprintf(`query { match as var(func: eq(target, "%s")) }`, target)
|
query := fmt.Sprintf(`query { match as var(func: eq(target, "%s")) }`, target)
|
||||||
|
|
||||||
pb, err := json.Marshal(models.Match{UID: "uid(match)", ID: matcher.ID, Target: target, Nodes: matcher.Nodes, Type: "matcher", Timestamp: rfc3339time})
|
pb, err := json.Marshal(models.Match{UID: "uid(match)", ID: matcher.ID, Target: target, Nodes: matcher.Nodes, NodeType: "matcher", Timestamp: rfc3339time})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ Node(func: allofterms(cn, $a)){
|
||||||
Timestamp: rfc3339time,
|
Timestamp: rfc3339time,
|
||||||
Target: target,
|
Target: target,
|
||||||
Nodes: []models.Node{},
|
Nodes: []models.Node{},
|
||||||
Type: "matcher",
|
NodeType: "matcher",
|
||||||
}
|
}
|
||||||
if len(n.Result) != 0 {
|
if len(n.Result) != 0 {
|
||||||
time.Sleep(time.Duration(2) * time.Second)
|
time.Sleep(time.Duration(2) * time.Second)
|
||||||
|
@ -300,7 +300,7 @@ Node(func: allofterms(cn, $a)){
|
||||||
|
|
||||||
query := fmt.Sprintf(`query { match as var(func: eq(target, "%s")) }`, target)
|
query := fmt.Sprintf(`query { match as var(func: eq(target, "%s")) }`, target)
|
||||||
|
|
||||||
pb, err := json.Marshal(models.Match{UID: "uid(match)", ID: matcher.ID, Target: target, Nodes: matcher.Nodes, Type: "matcher"})
|
pb, err := json.Marshal(models.Match{UID: "uid(match)", ID: matcher.ID, Target: target, Nodes: matcher.Nodes, NodeType: "matcher"})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ func runShodanMatcher(target string, graphClient *dgo.Dgraph) {
|
||||||
Timestamp: rfc3339time,
|
Timestamp: rfc3339time,
|
||||||
Target: target,
|
Target: target,
|
||||||
Nodes: []models.Node{},
|
Nodes: []models.Node{},
|
||||||
Type: "matcher",
|
NodeType: "matcher",
|
||||||
}
|
}
|
||||||
if len(n.Result) != 0 {
|
if len(n.Result) != 0 {
|
||||||
time.Sleep(time.Duration(2) * time.Second)
|
time.Sleep(time.Duration(2) * time.Second)
|
||||||
|
@ -392,7 +392,7 @@ func runShodanMatcher(target string, graphClient *dgo.Dgraph) {
|
||||||
|
|
||||||
query := fmt.Sprintf(`query { match as var(func: eq(target, "%s")) }`, target)
|
query := fmt.Sprintf(`query { match as var(func: eq(target, "%s")) }`, target)
|
||||||
|
|
||||||
pb, err := json.Marshal(models.Match{UID: "uid(match)", ID: matcher.ID, Target: target, Nodes: matcher.Nodes, Type: "matcher", Timestamp: rfc3339time})
|
pb, err := json.Marshal(models.Match{UID: "uid(match)", ID: matcher.ID, Target: target, Nodes: matcher.Nodes, NodeType: "matcher", Timestamp: rfc3339time})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ Structure of this file:
|
||||||
type Node struct {
|
type Node struct {
|
||||||
UID string `json:"uid,omitempty"`
|
UID string `json:"uid,omitempty"`
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
Type string `json:"type,omitempty"`
|
NodeType string `json:"nodeType,omitempty"`
|
||||||
NData string `json:"ndata,omitempty"`
|
NData string `json:"ndata,omitempty"`
|
||||||
Created string `json:"created,omitempty"`
|
Created string `json:"created,omitempty"`
|
||||||
Modified string `json:"modified,omitempty"`
|
Modified string `json:"modified,omitempty"`
|
||||||
|
@ -45,7 +45,7 @@ func BuildNode(flag string, dataType string, data string) *Node {
|
||||||
uuid := uuid.New().String()
|
uuid := uuid.New().String()
|
||||||
return &Node{
|
return &Node{
|
||||||
ID: flag + "--" + uuid,
|
ID: flag + "--" + uuid,
|
||||||
Type: dataType,
|
NodeType: dataType,
|
||||||
NData: data,
|
NData: data,
|
||||||
Created: rfc3339time,
|
Created: rfc3339time,
|
||||||
Modified: rfc3339time,
|
Modified: rfc3339time,
|
||||||
|
@ -141,14 +141,14 @@ type Match struct {
|
||||||
Nodes []Node `json:"nodes,omitempty"`
|
Nodes []Node `json:"nodes,omitempty"`
|
||||||
Target string `json:"target,omitempty"`
|
Target string `json:"target,omitempty"`
|
||||||
Timestamp string `json:"timestamp,omitempty"`
|
Timestamp string `json:"timestamp,omitempty"`
|
||||||
Type string `json:"type,omitempty"`
|
NodeType string `json:"nodeType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CertStreamRaw is a wrapper around the stream function to unmarshall the
|
// CertStreamRaw is a wrapper around the stream function to unmarshall the
|
||||||
// data receive in a Go structure.
|
// data receive in a Go structure.
|
||||||
type CertStreamRaw struct {
|
type CertStreamRaw struct {
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
Type string `json:"type,omitempty"`
|
NodeType string `json:"nodeType,omitempty"`
|
||||||
Data CertStreamStruct `json:"data,omitempty"`
|
Data CertStreamStruct `json:"data,omitempty"`
|
||||||
Created string `json:"created,omitempty"`
|
Created string `json:"created,omitempty"`
|
||||||
Modified string `json:"modified,omitempty"`
|
Modified string `json:"modified,omitempty"`
|
||||||
|
@ -174,7 +174,7 @@ func WrapCertStreamData(data CertStreamStruct) *CertStreamRaw {
|
||||||
rfc3339time := t.Format(time.RFC3339)
|
rfc3339time := t.Format(time.RFC3339)
|
||||||
return &CertStreamRaw{
|
return &CertStreamRaw{
|
||||||
ID: "certstream--" + uuid.New().String(),
|
ID: "certstream--" + uuid.New().String(),
|
||||||
Type: "certstream_raw",
|
NodeType: "certstream_raw",
|
||||||
Data: data,
|
Data: data,
|
||||||
Created: rfc3339time,
|
Created: rfc3339time,
|
||||||
Modified: rfc3339time,
|
Modified: rfc3339time,
|
||||||
|
@ -273,7 +273,7 @@ func SaveCertNode(filename string, node *CertNode) {
|
||||||
// PasteNode is a node from PasteBin.
|
// PasteNode is a node from PasteBin.
|
||||||
type PasteNode struct {
|
type PasteNode struct {
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
Type string `json:"type,omitempty"`
|
NodeType string `json:"nodeType,omitempty"`
|
||||||
FullPaste FullPaste `json:"fullPaste,omitempty"`
|
FullPaste FullPaste `json:"fullPaste,omitempty"`
|
||||||
Created string `json:"create,omitempty"`
|
Created string `json:"create,omitempty"`
|
||||||
Modified string `json:"modified,omitempty"`
|
Modified string `json:"modified,omitempty"`
|
||||||
|
@ -283,7 +283,7 @@ type PasteNode struct {
|
||||||
type FullPaste struct {
|
type FullPaste struct {
|
||||||
Meta PasteMeta `json:"meta,omitempty"`
|
Meta PasteMeta `json:"meta,omitempty"`
|
||||||
Full string `json:"full,omitempty"`
|
Full string `json:"full,omitempty"`
|
||||||
Type string `json:"type,omitempty"`
|
NodeType string `json:"nodeType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// BuildPasteNode builds a node from a FullPaste data.
|
// BuildPasteNode builds a node from a FullPaste data.
|
||||||
|
@ -292,7 +292,7 @@ func BuildPasteNode(data *FullPaste) *PasteNode {
|
||||||
rfc3339time := t.Format(time.RFC3339)
|
rfc3339time := t.Format(time.RFC3339)
|
||||||
return &PasteNode{
|
return &PasteNode{
|
||||||
ID: "pastebin--" + uuid.New().String(),
|
ID: "pastebin--" + uuid.New().String(),
|
||||||
Type: "pastebin",
|
NodeType: "pastebin",
|
||||||
FullPaste: *data,
|
FullPaste: *data,
|
||||||
Created: rfc3339time,
|
Created: rfc3339time,
|
||||||
Modified: rfc3339time,
|
Modified: rfc3339time,
|
||||||
|
@ -332,7 +332,7 @@ func SavePaste(filename string, data *PasteNode) {
|
||||||
// ShodanNode is node around the shodan.HostData struct.
|
// ShodanNode is node around the shodan.HostData struct.
|
||||||
type ShodanNode struct {
|
type ShodanNode struct {
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
Type string `json:"type,omitempty"`
|
NodeType string `json:"nodeType,omitempty"`
|
||||||
HostData ShodanHostData `json:"hostData,omitempty"`
|
HostData ShodanHostData `json:"hostData,omitempty"`
|
||||||
Created string `json:"created,omitempty"`
|
Created string `json:"created,omitempty"`
|
||||||
Modified string `json:"modified,omitempty"`
|
Modified string `json:"modified,omitempty"`
|
||||||
|
@ -372,7 +372,7 @@ func BuildShodanNode(data *shodan.HostData) *ShodanNode {
|
||||||
rfc3339time := t.Format(time.RFC3339)
|
rfc3339time := t.Format(time.RFC3339)
|
||||||
return &ShodanNode{
|
return &ShodanNode{
|
||||||
ID: "shodan--" + uuid.New().String(),
|
ID: "shodan--" + uuid.New().String(),
|
||||||
Type: "shodan_stream",
|
NodeType: "shodan_stream",
|
||||||
HostData: ShodanHostData{
|
HostData: ShodanHostData{
|
||||||
Product: data.Product,
|
Product: data.Product,
|
||||||
Hostnames: data.Hostnames,
|
Hostnames: data.Hostnames,
|
||||||
|
@ -433,7 +433,7 @@ func SaveShodanNode(filename string, data *ShodanNode) {
|
||||||
// BalboaNode represents a return from Balboa.
|
// BalboaNode represents a return from Balboa.
|
||||||
type BalboaNode struct {
|
type BalboaNode struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Type string `json:"type"`
|
NodeType string `json:"nodeType"`
|
||||||
Data []balboa.Entries `json:"data"`
|
Data []balboa.Entries `json:"data"`
|
||||||
Created string `json:"created"`
|
Created string `json:"created"`
|
||||||
Modified string `json:"modified"`
|
Modified string `json:"modified"`
|
||||||
|
@ -445,7 +445,7 @@ func BuildBalboaNode(data []balboa.Entries) *BalboaNode {
|
||||||
rfc3339time := t.Format(time.RFC3339)
|
rfc3339time := t.Format(time.RFC3339)
|
||||||
return &BalboaNode{
|
return &BalboaNode{
|
||||||
ID: "balboa--" + uuid.New().String(),
|
ID: "balboa--" + uuid.New().String(),
|
||||||
Type: "balboa",
|
NodeType: "balboa",
|
||||||
Data: data,
|
Data: data,
|
||||||
Created: rfc3339time,
|
Created: rfc3339time,
|
||||||
Modified: rfc3339time,
|
Modified: rfc3339time,
|
||||||
|
|
|
@ -83,7 +83,7 @@ func (c *CertStreamPlugin) doRun(graphClient *dgo.Dgraph) {
|
||||||
// edge between Node and CertNode
|
// edge between Node and CertNode
|
||||||
e := models.Node{
|
e := models.Node{
|
||||||
ID: mainNode.ID,
|
ID: mainNode.ID,
|
||||||
Type: mainNode.Type,
|
NodeType: mainNode.NodeType,
|
||||||
NData: mainNode.NData,
|
NData: mainNode.NData,
|
||||||
Created: mainNode.Created,
|
Created: mainNode.Created,
|
||||||
Modified: mainNode.Modified,
|
Modified: mainNode.Modified,
|
||||||
|
|
|
@ -66,7 +66,7 @@ func (p *PastebinPlugin) doRun(graphClient *dgo.Dgraph) {
|
||||||
fp := models.FullPaste{
|
fp := models.FullPaste{
|
||||||
Meta: p,
|
Meta: p,
|
||||||
Full: paste,
|
Full: paste,
|
||||||
Type: "fullPaste",
|
NodeType: "fullPaste",
|
||||||
}
|
}
|
||||||
pasteNode := models.BuildPasteNode(&fp)
|
pasteNode := models.BuildPasteNode(&fp)
|
||||||
mainNode := models.BuildNode("node", "pastebin", pasteNode.ID)
|
mainNode := models.BuildNode("node", "pastebin", pasteNode.ID)
|
||||||
|
@ -77,7 +77,7 @@ func (p *PastebinPlugin) doRun(graphClient *dgo.Dgraph) {
|
||||||
|
|
||||||
e := models.Node{
|
e := models.Node{
|
||||||
ID: mainNode.ID,
|
ID: mainNode.ID,
|
||||||
Type: mainNode.Type,
|
NodeType: mainNode.NodeType,
|
||||||
NData: mainNode.NData,
|
NData: mainNode.NData,
|
||||||
Created: mainNode.Created,
|
Created: mainNode.Created,
|
||||||
Modified: mainNode.Modified,
|
Modified: mainNode.Modified,
|
||||||
|
|
|
@ -103,7 +103,7 @@ func (s *ShodanPlugin) doRun(graphClient *dgo.Dgraph) {
|
||||||
// models.SaveEdge(edge)
|
// models.SaveEdge(edge)
|
||||||
e := models.Node{
|
e := models.Node{
|
||||||
ID: mainNode.ID,
|
ID: mainNode.ID,
|
||||||
Type: mainNode.Type,
|
NodeType: mainNode.NodeType,
|
||||||
NData: mainNode.NData,
|
NData: mainNode.NData,
|
||||||
Created: mainNode.Created,
|
Created: mainNode.Created,
|
||||||
Modified: mainNode.Modified,
|
Modified: mainNode.Modified,
|
||||||
|
|
Loading…
Reference in a new issue