Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/integration_tests/protocols/javascript/net-multi-step.yaml
2070 views
1
id: network-multi-step
2
info:
3
name: network multi-step
4
author: tarunKoyalwar
5
severity: high
6
description: |
7
Network multi-step template for testing
8
9
10
javascript:
11
- code: |
12
var m = require("nuclei/net");
13
var conn = m.Open("tcp",address);
14
conn.SetTimeout(timeout); // optional timeout
15
conn.Send("FIRST")
16
conn.RecvString(4) // READ 4 bytes i.e PING
17
conn.Send("SECOND")
18
conn.RecvString(4) // READ 4 bytes i.e PONG
19
conn.RecvString(6) // READ 6 bytes i.e NUCLEI
20
21
args:
22
address: "{{Host}}:{{Port}}"
23
Host: "{{Host}}"
24
Port: 5431
25
timeout: 3 # in sec
26
27
matchers:
28
- type: dsl
29
dsl:
30
- success == true
31
- response == "NUCLEI"
32
condition: and
33
34