diff --git a/javascript/audit/mysql/mysql-load-file.yaml b/javascript/audit/mysql/mysql-load-file.yaml index 2b767b2605..4d02114000 100644 --- a/javascript/audit/mysql/mysql-load-file.yaml +++ b/javascript/audit/mysql/mysql-load-file.yaml @@ -12,8 +12,11 @@ info: max-request: 16 shodan-query: "port:3306" tags: js,mysql,network,audit + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let m = require('nuclei/mysql'); let c = m.MySQLClient(); let response = c.ExecuteQuery(Host,Port,User,Pass,Query); diff --git a/javascript/backdoor/proftpd-backdoor.yaml b/javascript/backdoor/proftpd-backdoor.yaml index 85cea61ff4..0565b6dec5 100644 --- a/javascript/backdoor/proftpd-backdoor.yaml +++ b/javascript/backdoor/proftpd-backdoor.yaml @@ -13,8 +13,11 @@ info: max-request: 1 shodan-query: "product:\"ProFTPD\"" tags: js,network,proftpd,ftp,backdoor + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const data = ["HELP ACIDBITCHEZ\n", "id"]; const c = require("nuclei/net"); let conn = c.Open('tcp', `${Host}:${Port}`); diff --git a/javascript/cves/2012/CVE-2012-2122.yaml b/javascript/cves/2012/CVE-2012-2122.yaml index e97f14c92e..9226beb40e 100644 --- a/javascript/cves/2012/CVE-2012-2122.yaml +++ b/javascript/cves/2012/CVE-2012-2122.yaml @@ -29,8 +29,11 @@ info: - "product:\"MySQL\"" - product:"mysql" tags: cve,cve2012,js,enum,network,mssql,fuzz,oracle + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const mysql = require('nuclei/mysql'); const client = new mysql.MySQLClient; for (let i = 1; i <= 1001; i++) { diff --git a/javascript/cves/2016/CVE-2016-8706.yaml b/javascript/cves/2016/CVE-2016-8706.yaml index 0730a6857e..1fb22d6a0d 100644 --- a/javascript/cves/2016/CVE-2016-8706.yaml +++ b/javascript/cves/2016/CVE-2016-8706.yaml @@ -26,8 +26,11 @@ info: product: memcached verfied: true tags: cve,cve2016,rce,js,memcached + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let packet = bytes.NewBuffer(); packet.Write(new Uint8Array([0x80, 0x21])) let cmd = 'stats' diff --git a/javascript/cves/2019/CVE-2019-9193.yaml b/javascript/cves/2019/CVE-2019-9193.yaml index bdfb0d611c..b7d4130a42 100644 --- a/javascript/cves/2019/CVE-2019-9193.yaml +++ b/javascript/cves/2019/CVE-2019-9193.yaml @@ -13,8 +13,11 @@ info: max-request: 1 shodan-query: "product:\"PostgreSQL\"" tags: cve,cve2018,js,network,postgresql,intrusive + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const postgres = require('nuclei/postgres'); const client = new postgres.PGClient; const tbl = tbl_exec diff --git a/javascript/cves/2020/CVE-2020-7247.yaml b/javascript/cves/2020/CVE-2020-7247.yaml index 82674b24fa..b4f440fb83 100644 --- a/javascript/cves/2020/CVE-2020-7247.yaml +++ b/javascript/cves/2020/CVE-2020-7247.yaml @@ -28,8 +28,11 @@ info: vendor: openbsd product: opensmtpd tags: packetstorm,cve,cve2020,js,smtp,opensmtpd,network,rce,oast,kev,openbsd + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const smtp = require('nuclei/smtp'); const client = new smtp.Client(Host,Port); const message = new smtp.SMTPMessage(); diff --git a/javascript/cves/2023/CVE-2023-46604.yaml b/javascript/cves/2023/CVE-2023-46604.yaml index f018043b2e..57c49474b6 100644 --- a/javascript/cves/2023/CVE-2023-46604.yaml +++ b/javascript/cves/2023/CVE-2023-46604.yaml @@ -37,7 +37,9 @@ variables: final: "{{prefix}}{{classname}}" javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let m1 = require('nuclei/net'); let m2 = require('nuclei/bytes'); let b = m2.Buffer(); diff --git a/javascript/cves/2023/CVE-2023-48795.yaml b/javascript/cves/2023/CVE-2023-48795.yaml index 3ffee1767f..d28618fffb 100644 --- a/javascript/cves/2023/CVE-2023-48795.yaml +++ b/javascript/cves/2023/CVE-2023-48795.yaml @@ -32,8 +32,11 @@ info: - product:"openssh" - cpe:"cpe:2.3:a:openbsd:openssh" tags: cve,cve2023,packetstorm,seclists,js,ssh,network,passive,openbsd + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const m = require("nuclei/ssh"); const c = m.SSHClient(); const response = c.ConnectSSHInfoMode(Host, Port); diff --git a/javascript/cves/2024/CVE-2024-23897.yaml b/javascript/cves/2024/CVE-2024-23897.yaml index 95cee4790f..ad32e1e79a 100644 --- a/javascript/cves/2024/CVE-2024-23897.yaml +++ b/javascript/cves/2024/CVE-2024-23897.yaml @@ -35,7 +35,9 @@ variables: payload: "{{hex_decode('0000000e00000c636f6e6e6563742d6e6f64650000000e00000c402f6574632f706173737764000000070200055554462d3800000007010005656e5f41450000000003')}}" javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let m = require('nuclei/net'); let name=(Host.includes(':') ? Host : Host+":80"); let conn,conn2; diff --git a/javascript/default-logins/redis-default-logins.yaml b/javascript/default-logins/redis-default-logins.yaml index 2092cfa5c9..930f643a0f 100644 --- a/javascript/default-logins/redis-default-logins.yaml +++ b/javascript/default-logins/redis-default-logins.yaml @@ -22,6 +22,7 @@ info: - intitle:"airflow - dags" || http.html:"apache airflow" - intitle:"sign in - airflow" tags: js,redis,default-login,network + javascript: - pre-condition: | isPortOpen(Host,Port) diff --git a/javascript/detection/oracle-tns-listener.yaml b/javascript/detection/oracle-tns-listener.yaml index 93c76997e7..887a289c3d 100644 --- a/javascript/detection/oracle-tns-listener.yaml +++ b/javascript/detection/oracle-tns-listener.yaml @@ -15,7 +15,9 @@ info: tags: js,detect,oracle,tns,network javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/oracle"); var response = m.IsOracle(Host, Port); Export(response); diff --git a/javascript/detection/samba-detect.yaml b/javascript/detection/samba-detect.yaml index c7c340fab9..e88d83ed16 100644 --- a/javascript/detection/samba-detect.yaml +++ b/javascript/detection/samba-detect.yaml @@ -13,7 +13,9 @@ info: vendor: dionaea tags: js,network,samba,detect,linux javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let m = require("nuclei/smb"); let c = new m.SMBClient(); let response = c.ConnectSMBInfoMode(Host, Port); diff --git a/javascript/detection/ssh-auth-methods.yaml b/javascript/detection/ssh-auth-methods.yaml index f3b05c809e..000e98ed99 100644 --- a/javascript/detection/ssh-auth-methods.yaml +++ b/javascript/detection/ssh-auth-methods.yaml @@ -14,7 +14,9 @@ info: tags: js,detect,ssh,enum,network javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/ssh"); var c = m.SSHClient(); var response = c.ConnectSSHInfoMode(Host, Port); diff --git a/javascript/enumeration/checkpoint-firewall-enum.yaml b/javascript/enumeration/checkpoint-firewall-enum.yaml index a2c4ce2f7a..13a383d839 100644 --- a/javascript/enumeration/checkpoint-firewall-enum.yaml +++ b/javascript/enumeration/checkpoint-firewall-enum.yaml @@ -13,7 +13,9 @@ info: tags: js,network,firewall,checkpoint,enum javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let packet = bytes.NewBuffer(); let prob = "\x51\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x0bsecuremote\x00" data = packet.Write(prob) diff --git a/javascript/enumeration/ldap/ldap-metadata.yaml b/javascript/enumeration/ldap/ldap-metadata.yaml index c9f1fd8b63..65c2229624 100644 --- a/javascript/enumeration/ldap/ldap-metadata.yaml +++ b/javascript/enumeration/ldap/ldap-metadata.yaml @@ -14,7 +14,9 @@ info: tags: js,network,ldap javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const ldap = require('nuclei/ldap'); const cfg = new ldap.Config(); cfg.Upgrade = true; diff --git a/javascript/enumeration/mysql/mysql-default-login.yaml b/javascript/enumeration/mysql/mysql-default-login.yaml index 6af3fa95a9..393a6d9828 100644 --- a/javascript/enumeration/mysql/mysql-default-login.yaml +++ b/javascript/enumeration/mysql/mysql-default-login.yaml @@ -14,10 +14,7 @@ info: javascript: - pre-condition: | - var m = require("nuclei/mysql"); - var c = m.MySQLClient(); - c.IsMySQL(Host, Port); - + isPortOpen(Host,Port); code: | var m = require("nuclei/mysql"); var c = m.MySQLClient(); diff --git a/javascript/enumeration/mysql/mysql-info.yaml b/javascript/enumeration/mysql/mysql-info.yaml index e791921b22..7cfcce89d3 100644 --- a/javascript/enumeration/mysql/mysql-info.yaml +++ b/javascript/enumeration/mysql/mysql-info.yaml @@ -12,8 +12,11 @@ info: max-request: 1 shodan-query: "port:3306" tags: js,mssql,network,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/mysql"); var c = m.MySQLClient(); var response = c.FingerprintMySQL(Host,Port); diff --git a/javascript/enumeration/mysql/mysql-show-databases.yaml b/javascript/enumeration/mysql/mysql-show-databases.yaml index ee5a50b614..2612165a37 100644 --- a/javascript/enumeration/mysql/mysql-show-databases.yaml +++ b/javascript/enumeration/mysql/mysql-show-databases.yaml @@ -12,7 +12,9 @@ info: shodan-query: "port:3306" tags: js,mysql,network,enum javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let m = require('nuclei/mysql'); let c = m.MySQLClient(); let response = c.ExecuteQuery(Host,Port,User,Pass,Query); diff --git a/javascript/enumeration/mysql/mysql-show-variables.yaml b/javascript/enumeration/mysql/mysql-show-variables.yaml index 1896ca42a8..e8c453f63f 100644 --- a/javascript/enumeration/mysql/mysql-show-variables.yaml +++ b/javascript/enumeration/mysql/mysql-show-variables.yaml @@ -13,7 +13,9 @@ info: tags: js,mysql,network,enum javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let m = require('nuclei/mysql'); let c = m.MySQLClient(); let response = c.ExecuteQuery(Host,Port,User,Pass,Query); diff --git a/javascript/enumeration/mysql/mysql-user-enum.yaml b/javascript/enumeration/mysql/mysql-user-enum.yaml index 11855aa4f4..2c38ea218b 100644 --- a/javascript/enumeration/mysql/mysql-user-enum.yaml +++ b/javascript/enumeration/mysql/mysql-user-enum.yaml @@ -13,8 +13,11 @@ info: max-request: 16 shodan-query: "port:3306" tags: js,mysql,network,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let m = require('nuclei/mysql'); let c = m.MySQLClient(); let response = c.ExecuteQuery(Host,Port,User,Pass,Query); diff --git a/javascript/enumeration/pgsql/pgsql-default-db.yaml b/javascript/enumeration/pgsql/pgsql-default-db.yaml index d3520c261e..828a5190aa 100644 --- a/javascript/enumeration/pgsql/pgsql-default-db.yaml +++ b/javascript/enumeration/pgsql/pgsql-default-db.yaml @@ -13,11 +13,10 @@ info: max-request: 40 shodan-query: "product:\"PostgreSQL\"" tags: js,network,postgresql,authenticated,enum + javascript: - pre-condition: | - var m = require("nuclei/postgres"); - var c = m.PGClient(); - c.IsPostgres(Host, Port); + isPortOpen(Host,Port); code: | const postgres = require('nuclei/postgres'); const client = new postgres.PGClient; diff --git a/javascript/enumeration/pgsql/pgsql-file-read.yaml b/javascript/enumeration/pgsql/pgsql-file-read.yaml index 2e3f505e39..f12def1f40 100644 --- a/javascript/enumeration/pgsql/pgsql-file-read.yaml +++ b/javascript/enumeration/pgsql/pgsql-file-read.yaml @@ -15,9 +15,7 @@ info: tags: js,network,postgresql,authenticated,enum javascript: - pre-condition: | - var m = require("nuclei/postgres"); - var c = m.PGClient(); - c.IsPostgres(Host, Port); + isPortOpen(Host,Port); code: | const postgres = require('nuclei/postgres'); const client = new postgres.PGClient; diff --git a/javascript/enumeration/pgsql/pgsql-list-database.yaml b/javascript/enumeration/pgsql/pgsql-list-database.yaml index c32d8addb0..0c72259889 100644 --- a/javascript/enumeration/pgsql/pgsql-list-database.yaml +++ b/javascript/enumeration/pgsql/pgsql-list-database.yaml @@ -16,9 +16,7 @@ info: tags: js,network,postgresql,authenticated,enum javascript: - pre-condition: | - var m = require("nuclei/postgres"); - var c = m.PGClient(); - c.IsPostgres(Host, Port); + isPortOpen(Host,Port); code: | const postgres = require('nuclei/postgres'); const client = new postgres.PGClient; diff --git a/javascript/enumeration/pgsql/pgsql-list-password-hashes.yaml b/javascript/enumeration/pgsql/pgsql-list-password-hashes.yaml index 8738211d67..0d2ad7056c 100644 --- a/javascript/enumeration/pgsql/pgsql-list-password-hashes.yaml +++ b/javascript/enumeration/pgsql/pgsql-list-password-hashes.yaml @@ -17,9 +17,7 @@ info: tags: js,network,postgresql,authenticated,enum javascript: - pre-condition: | - var m = require("nuclei/postgres"); - var c = m.PGClient(); - c.IsPostgres(Host, Port); + isPortOpen(Host,Port); code: | const postgres = require('nuclei/postgres'); const client = new postgres.PGClient; diff --git a/javascript/enumeration/pgsql/pgsql-list-users.yaml b/javascript/enumeration/pgsql/pgsql-list-users.yaml index 5be3639250..06ebbe4189 100644 --- a/javascript/enumeration/pgsql/pgsql-list-users.yaml +++ b/javascript/enumeration/pgsql/pgsql-list-users.yaml @@ -15,9 +15,7 @@ info: tags: js,network,postgresql,enum,authenticated javascript: - pre-condition: | - var m = require("nuclei/postgres"); - var c = m.PGClient(); - c.IsPostgres(Host, Port); + isPortOpen(Host,Port); code: | const postgres = require('nuclei/postgres'); const client = new postgres.PGClient; diff --git a/javascript/enumeration/pgsql/pgsql-version-detect.yaml b/javascript/enumeration/pgsql/pgsql-version-detect.yaml index 9c23f5b4fc..c0d11f1656 100644 --- a/javascript/enumeration/pgsql/pgsql-version-detect.yaml +++ b/javascript/enumeration/pgsql/pgsql-version-detect.yaml @@ -13,11 +13,10 @@ info: max-request: 8 shodan-query: "product:\"PostgreSQL\"" tags: js,network,postgresql,enum,authenticated + javascript: - pre-condition: | - var m = require("nuclei/postgres"); - var c = m.PGClient(); - c.IsPostgres(Host, Port); + isPortOpen(Host,Port); code: | const postgres = require('nuclei/postgres'); const client = new postgres.PGClient; diff --git a/javascript/enumeration/pop3/pop3-capabilities-enum.yaml b/javascript/enumeration/pop3/pop3-capabilities-enum.yaml index b363e141f6..8e9c3645c0 100644 --- a/javascript/enumeration/pop3/pop3-capabilities-enum.yaml +++ b/javascript/enumeration/pop3/pop3-capabilities-enum.yaml @@ -13,8 +13,11 @@ info: max-request: 1 shodan-query: "port:110" tags: js,network,pop3,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let data = "CAPA\r\n" let c = require("nuclei/net"); let conn = c.Open('tcp', `${Host}:${Port}`); diff --git a/javascript/enumeration/redis/redis-info.yaml b/javascript/enumeration/redis/redis-info.yaml index 4d1feed2e6..5ba6ca9341 100644 --- a/javascript/enumeration/redis/redis-info.yaml +++ b/javascript/enumeration/redis/redis-info.yaml @@ -24,8 +24,11 @@ info: - intitle:"airflow - dags" || http.html:"apache airflow" - intitle:"sign in - airflow" tags: js,redis,network,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const redis = require('nuclei/redis'); const info = redis.GetServerInfo(Host,Port); Export(info); diff --git a/javascript/enumeration/redis/redis-require-auth.yaml b/javascript/enumeration/redis/redis-require-auth.yaml index 990a483a20..fb326c1ca3 100644 --- a/javascript/enumeration/redis/redis-require-auth.yaml +++ b/javascript/enumeration/redis/redis-require-auth.yaml @@ -24,8 +24,11 @@ info: - intitle:"airflow - dags" || http.html:"apache airflow" - intitle:"sign in - airflow" tags: js,redis,network,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const redis = require('nuclei/redis'); const isAuthenticated = redis.IsAuthenticated(Host,Port); Export(isAuthenticated); diff --git a/javascript/enumeration/rsync/rsync-list-modules.yaml b/javascript/enumeration/rsync/rsync-list-modules.yaml index 9bcfbdc8dc..d42a51740d 100644 --- a/javascript/enumeration/rsync/rsync-list-modules.yaml +++ b/javascript/enumeration/rsync/rsync-list-modules.yaml @@ -13,8 +13,11 @@ info: max-request: 1 shodan-query: port:873 tags: network,rsync,enum,js + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const c = require("nuclei/net"); const data = "@RSYNCD: 31.0\n\n" const conn = c.Open('tcp', `${Host}:${Port}`); diff --git a/javascript/enumeration/rsync/rsync-version.yaml b/javascript/enumeration/rsync/rsync-version.yaml index 628a80d5d6..fa0d3adf9b 100644 --- a/javascript/enumeration/rsync/rsync-version.yaml +++ b/javascript/enumeration/rsync/rsync-version.yaml @@ -13,7 +13,9 @@ info: tags: js,network,rsync,enum javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let m = require('nuclei/rsync'); let response = m.IsRsync(Host,Port); Export(response); diff --git a/javascript/enumeration/smb/smb-default-creds.yaml b/javascript/enumeration/smb/smb-default-creds.yaml index 2729ffeb85..4d5cb7b8d7 100644 --- a/javascript/enumeration/smb/smb-default-creds.yaml +++ b/javascript/enumeration/smb/smb-default-creds.yaml @@ -15,8 +15,11 @@ info: product: dionaea vendor: dionaea tags: js,network,smb,enum,default,bruteforce + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/smb"); var c = new m.SMBClient(); var response = c.ListShares(Host, Port, User, Pass); diff --git a/javascript/enumeration/smb/smb-enum-domains.yaml b/javascript/enumeration/smb/smb-enum-domains.yaml index 4f4a817145..4ad13ed913 100644 --- a/javascript/enumeration/smb/smb-enum-domains.yaml +++ b/javascript/enumeration/smb/smb-enum-domains.yaml @@ -15,8 +15,11 @@ info: product: dionaea vendor: dionaea tags: js,network,smb,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/smb"); var c = new m.SMBClient(); var response = c.ListSMBv2Metadata(Host, Port); diff --git a/javascript/enumeration/smb/smb-enum.yaml b/javascript/enumeration/smb/smb-enum.yaml index 608241aa8e..6a40dca5b2 100644 --- a/javascript/enumeration/smb/smb-enum.yaml +++ b/javascript/enumeration/smb/smb-enum.yaml @@ -16,8 +16,11 @@ info: product: dionaea vendor: dionaea tags: js,network,smb,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/smb"); var c = m.SMBClient(); var response = c.ListSMBv2Metadata(Host, Port); diff --git a/javascript/enumeration/smb/smb-os-detect.yaml b/javascript/enumeration/smb/smb-os-detect.yaml index bc445e0aea..b279a0a4ca 100644 --- a/javascript/enumeration/smb/smb-os-detect.yaml +++ b/javascript/enumeration/smb/smb-os-detect.yaml @@ -14,8 +14,11 @@ info: product: dionaea vendor: dionaea tags: js,network,smb,enum,os + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/smb"); var c = new m.SMBClient(); var response = c.ListSMBv2Metadata(Host, Port); diff --git a/javascript/enumeration/smb/smb-version-detect.yaml b/javascript/enumeration/smb/smb-version-detect.yaml index 8e4566cd53..1fb9c33452 100644 --- a/javascript/enumeration/smb/smb-version-detect.yaml +++ b/javascript/enumeration/smb/smb-version-detect.yaml @@ -12,8 +12,11 @@ info: product: dionaea vendor: dionaea tags: js,network,smb,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let m = require("nuclei/smb"); let c = new m.SMBClient(); let response = c.ConnectSMBInfoMode(Host, Port); diff --git a/javascript/enumeration/smb/smb2-capabilities.yaml b/javascript/enumeration/smb/smb2-capabilities.yaml index cc588eb295..6f190072d3 100644 --- a/javascript/enumeration/smb/smb2-capabilities.yaml +++ b/javascript/enumeration/smb/smb2-capabilities.yaml @@ -14,8 +14,11 @@ info: product: dionaea vendor: dionaea tags: js,network,smb,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/smb"); var c = m.SMBClient(); var response = c.ConnectSMBInfoMode(Host, Port); diff --git a/javascript/enumeration/smb/smb2-server-time.yaml b/javascript/enumeration/smb/smb2-server-time.yaml index 796af38598..40311b77c1 100644 --- a/javascript/enumeration/smb/smb2-server-time.yaml +++ b/javascript/enumeration/smb/smb2-server-time.yaml @@ -15,8 +15,11 @@ info: product: dionaea vendor: dionaea tags: js,network,smb,enum + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/smb"); var c = m.SMBClient(); var response = c.ConnectSMBInfoMode(Host,Port); diff --git a/javascript/misconfiguration/mysql/mysql-empty-password.yaml b/javascript/misconfiguration/mysql/mysql-empty-password.yaml index 9b9a977fd5..305deae92a 100644 --- a/javascript/misconfiguration/mysql/mysql-empty-password.yaml +++ b/javascript/misconfiguration/mysql/mysql-empty-password.yaml @@ -13,10 +13,7 @@ info: javascript: - pre-condition: | - var m = require("nuclei/mysql"); - var c = m.MySQLClient(); - c.IsMySQL(Host, Port); - + isPortOpen(Host,Port); code: | var m = require("nuclei/mysql"); var c = m.MySQLClient(); diff --git a/javascript/misconfiguration/pgsql/pgsql-empty-password.yaml b/javascript/misconfiguration/pgsql/pgsql-empty-password.yaml index ab6cebda55..9e6d14b5e7 100644 --- a/javascript/misconfiguration/pgsql/pgsql-empty-password.yaml +++ b/javascript/misconfiguration/pgsql/pgsql-empty-password.yaml @@ -13,8 +13,11 @@ info: max-request: 1 shodan-query: "product:\"PostgreSQL\"" tags: js,network,postgresql,authenticated + javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const postgres = require('nuclei/postgres'); const client = new postgres.PGClient; const connected = client.Connect(Host, Port, User, Pass); diff --git a/javascript/misconfiguration/pgsql/pgsql-extensions-rce.yaml b/javascript/misconfiguration/pgsql/pgsql-extensions-rce.yaml index 7b84c5d313..f149107cb0 100644 --- a/javascript/misconfiguration/pgsql/pgsql-extensions-rce.yaml +++ b/javascript/misconfiguration/pgsql/pgsql-extensions-rce.yaml @@ -16,7 +16,9 @@ info: shodan-query: "product:\"PostgreSQL\"" tags: postgresql,js,network,rce javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | const postgres = require('nuclei/postgres'); const client = new postgres.PGClient; const collab = shurl diff --git a/javascript/misconfiguration/smb/smb-anonymous-access.yaml b/javascript/misconfiguration/smb/smb-anonymous-access.yaml index bf93e20c96..749e9f8d7e 100644 --- a/javascript/misconfiguration/smb/smb-anonymous-access.yaml +++ b/javascript/misconfiguration/smb/smb-anonymous-access.yaml @@ -16,7 +16,9 @@ info: vendor: dionaea tags: js,network,smb,enum,misconfig javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/smb"); var c = m.SMBClient(); var response = c.ListShares(Host,Port,User,Pass); diff --git a/javascript/misconfiguration/smb/smb-shares.yaml b/javascript/misconfiguration/smb/smb-shares.yaml index 809e3d3c2e..2394816c01 100644 --- a/javascript/misconfiguration/smb/smb-shares.yaml +++ b/javascript/misconfiguration/smb/smb-shares.yaml @@ -16,7 +16,9 @@ info: vendor: dionaea tags: js,network,smb,enum javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/smb"); var c = m.SMBClient(); var response = c.ListShares(Host, Port, User, Pass); diff --git a/javascript/misconfiguration/smb/smb-signing-not-required.yaml b/javascript/misconfiguration/smb/smb-signing-not-required.yaml index 3015194aca..bc1cddccda 100644 --- a/javascript/misconfiguration/smb/smb-signing-not-required.yaml +++ b/javascript/misconfiguration/smb/smb-signing-not-required.yaml @@ -17,7 +17,9 @@ info: vendor: dionaea tags: js,network,smb,enum javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | var m = require("nuclei/smb"); var c = m.SMBClient(); var response = c.ListSMBv2Metadata(Host, Port, User, Pass); diff --git a/javascript/udp/detection/tftp-detect.yaml b/javascript/udp/detection/tftp-detect.yaml index 6508f1b67d..5f889a2468 100644 --- a/javascript/udp/detection/tftp-detect.yaml +++ b/javascript/udp/detection/tftp-detect.yaml @@ -12,7 +12,9 @@ info: shodan-query: "port:69" tags: js,tftp,udp,network javascript: - - code: | + - pre-condition: | + isPortOpen(Host,Port); + code: | let packet = bytes.NewBuffer(); let message = "1.txt" let data = message;