knock 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,29 +1,59 @@
1
1
  {
2
- "name": "knock", "description": "Attempts to enumerate subdomains of a domain",
3
- "version": "0.1.0",
4
- "tags": [
2
+ "name": "knock",
3
+ "version": "1.0.0",
4
+ "description": "Knock, knock. Who's there? Wordlist-based subdomain enumeration with wildcard DNS detection. Zero dependencies.",
5
+ "keywords": [
5
6
  "domain",
6
7
  "subdomain",
7
8
  "dns",
9
+ "enumeration",
10
+ "recon",
11
+ "osint",
12
+ "pentest",
13
+ "security",
8
14
  "util",
9
15
  "utility"
10
16
  ],
11
- "author": { "name": "Carter Cole", "email": "node@cartercole.com" },
12
- "maintainers": [{ "name": "Carter Cole", "email": "node@cartercole.com" }],
13
- "homepage": "http://blog.cartercole.com",
17
+ "author": "Carter Cole <node@cartercole.com>",
18
+ "license": "MIT",
19
+ "homepage": "https://github.com/neopunisher/node-knock#readme",
14
20
  "repository": {
15
- "type": "git", "url": "git@github.com:neopunisher/node-knock.git"
21
+ "type": "git",
22
+ "url": "git+https://github.com/neopunisher/node-knock.git"
16
23
  },
17
- "main": "lib.js",
18
- "licenses": [{
19
- "type": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php"
20
- }],
21
- "bugs": { "url": "https://github.com/neopunisher/node-knock/issues" },
22
- "dependencies": {
23
- "request": "*",
24
- "tldtools": "*",
25
- "optimist": "*",
26
- "glob" : "*",
27
- "step" : "*"
24
+ "bugs": {
25
+ "url": "https://github.com/neopunisher/node-knock/issues"
26
+ },
27
+ "type": "module",
28
+ "main": "./dist/index.js",
29
+ "types": "./dist/index.d.ts",
30
+ "exports": {
31
+ ".": {
32
+ "types": "./dist/index.d.ts",
33
+ "default": "./dist/index.js"
34
+ },
35
+ "./package.json": "./package.json"
36
+ },
37
+ "bin": {
38
+ "knock": "dist/cli.js"
39
+ },
40
+ "files": [
41
+ "dist/",
42
+ "lists/"
43
+ ],
44
+ "engines": {
45
+ "node": ">=22"
46
+ },
47
+ "scripts": {
48
+ "build": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
49
+ "typecheck": "tsc",
50
+ "test": "node --test \"test/**/*.test.ts\"",
51
+ "knock": "node src/cli.ts",
52
+ "update-psl": "node scripts/update-psl.mjs",
53
+ "prepublishOnly": "npm run typecheck && npm test && npm run build"
54
+ },
55
+ "devDependencies": {
56
+ "@types/node": "^22.20.4",
57
+ "typescript": "^7.0.2"
28
58
  }
29
59
  }
package/.npmignore DELETED
@@ -1 +0,0 @@
1
- node_modules/*
package/knock.js DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- var argv = require('optimist').argv,
3
- knock = require('./lib.js'),
4
- _ = require('underscore');
5
-
6
- _.defer(function(){
7
- _.each(argv._,function doKnock(domain){
8
- knock(domain);
9
- });
10
- });
package/lib.js DELETED
@@ -1,49 +0,0 @@
1
- var _ = require('underscore')._,
2
- glob = require('glob'),
3
- tldtools = require('tldtools').init(function () {
4
- //console.log('tldsready')
5
- }),
6
- dns = require('dns'),
7
- request = require('request'),
8
- Step = require('step'),
9
- fs = require('fs'),
10
- dnstest = function () {},
11
- webtest = function () {},
12
- basedomain = function (domain) {
13
- if (domain.indexOf('http') != 0) {
14
- domain = 'http://' + domain + '/'
15
- }
16
- var res = tldtools.extract(domain);
17
- return res.inspect.useful() ? res.domain + '.' + res.tld : false;
18
- }
19
- module.exports.opts = {
20
- type: dnstest,
21
- types: [dnstest, webtest],
22
- verify: true,
23
- wildcard: {
24
- tests: 1,
25
- neverthere: 'knocknpmknocknpm'
26
- }
27
- };
28
-
29
- //dns.resolve4(domain, cb);
30
-
31
- module.exports = function knock(domain, opts, cb) {
32
- if (_.isFunction(opts)) {
33
- console.log('swaped for cb', module.exports.opts);
34
- cb = opts;
35
- opts = module.export.opts
36
- } else if (_.isObject(opts)) {
37
- opts = _.extend(module.exports.opts, opts)
38
- console.log('extended', opts)
39
- }
40
-
41
- var domain = basedomain(domain);
42
- if (domain === false) {
43
- cb('invalid domain');
44
- } else {
45
- console.log('basedomain', domain);
46
-
47
-
48
- }
49
- }