|
1 | 1 | {
|
2 |
| - "$schema": "https://json-schema.org/draft/2020-12/schema", |
3 |
| - "title": "Sherlock Target Manifest", |
4 |
| - "description": "Social media targets to probe for the existence of known usernames", |
5 |
| - "type": "object", |
6 |
| - "properties": { |
7 |
| - "$schema": { "type": "string" } |
8 |
| - }, |
9 |
| - "patternProperties": { |
10 |
| - "^(?!\\$).*?$": { |
11 |
| - "type": "object", |
12 |
| - "description": "Target name and associated information (key should be human readable name)", |
13 |
| - "required": [ "url", "urlMain", "errorType", "username_claimed" ], |
14 |
| - "properties": { |
15 |
| - "url": { "type": "string" }, |
16 |
| - "urlMain": { "type": "string" }, |
17 |
| - "urlProbe": { "type": "string" }, |
18 |
| - "username_claimed": { "type": "string" }, |
19 |
| - "regexCheck": { "type": "string" }, |
20 |
| - "isNSFW": { "type": "boolean" }, |
21 |
| - "headers": { "type": "object" }, |
22 |
| - "request_payload": { "type": "object" }, |
23 |
| - "__comment__": { |
24 |
| - "type": "string", |
25 |
| - "description": "Used to clarify important target information if (and only if) a commit message would not suffice.\nThis key should not be parsed anywhere within Sherlock." |
26 |
| - }, |
27 |
| - "tags": { |
28 |
| - "oneOf": [ |
29 |
| - { "$ref": "#/$defs/tag" }, |
30 |
| - { "type": "array", "items": { "$ref": "#/$defs/tag" } } |
31 |
| - ] |
32 |
| - }, |
33 |
| - "request_method": { |
34 |
| - "type": "string", |
35 |
| - "enum": [ "GET", "POST", "HEAD", "PUT" ] |
36 |
| - }, |
37 |
| - "errorType": { |
38 |
| - "type": "string", |
39 |
| - "enum": [ "message", "response_url", "status_code" ] |
40 |
| - }, |
41 |
| - "errorMsg": { |
42 |
| - "oneOf": [ |
43 |
| - { "type": "string" }, |
44 |
| - { "type": "array", "items": { "type": "string" } } |
45 |
| - ] |
46 |
| - }, |
47 |
| - "errorCode": { |
48 |
| - "oneOf": [ |
49 |
| - { "type": "integer" }, |
50 |
| - { "type": "array", "items": { "type": "integer" } } |
51 |
| - ] |
52 |
| - }, |
53 |
| - "errorUrl": { "type": "string" }, |
54 |
| - "response_url": { "type": "string" } |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "title": "Sherlock Target Manifest", |
| 4 | + "description": "Social media targets to probe for the existence of known usernames", |
| 5 | + "type": "object", |
| 6 | + "properties": { |
| 7 | + "$schema": { "type": "string" } |
| 8 | + }, |
| 9 | + "patternProperties": { |
| 10 | + "^(?!\\$).*?$": { |
| 11 | + "type": "object", |
| 12 | + "description": "Target name and associated information (key should be human readable name)", |
| 13 | + "required": ["url", "urlMain", "errorType", "username_claimed"], |
| 14 | + "properties": { |
| 15 | + "url": { "type": "string" }, |
| 16 | + "urlMain": { "type": "string" }, |
| 17 | + "urlProbe": { "type": "string" }, |
| 18 | + "username_claimed": { "type": "string" }, |
| 19 | + "regexCheck": { "type": "string" }, |
| 20 | + "isNSFW": { "type": "boolean" }, |
| 21 | + "headers": { "type": "object" }, |
| 22 | + "request_payload": { "type": "object" }, |
| 23 | + "__comment__": { |
| 24 | + "type": "string", |
| 25 | + "description": "Used to clarify important target information if (and only if) a commit message would not suffice.\nThis key should not be parsed anywhere within Sherlock." |
| 26 | + }, |
| 27 | + "tags": { |
| 28 | + "oneOf": [ |
| 29 | + { "$ref": "#/$defs/tag" }, |
| 30 | + { "type": "array", "items": { "$ref": "#/$defs/tag" } } |
| 31 | + ] |
| 32 | + }, |
| 33 | + "request_method": { |
| 34 | + "type": "string", |
| 35 | + "enum": ["GET", "POST", "HEAD", "PUT"] |
| 36 | + }, |
| 37 | + "errorType": { |
| 38 | + "oneOf": [ |
| 39 | + { |
| 40 | + "type": "string", |
| 41 | + "enum": ["message", "response_url", "status_code"] |
55 | 42 | },
|
56 |
| - "dependencies": { |
57 |
| - "errorMsg": { |
58 |
| - "properties" : { "errorType": { "const": "message" } } |
59 |
| - }, |
60 |
| - "errorUrl": { |
61 |
| - "properties": { "errorType": { "const": "response_url" } } |
62 |
| - }, |
63 |
| - "errorCode": { |
64 |
| - "properties": { "errorType": { "const": "status_code" } } |
| 43 | + { |
| 44 | + "type": "array", |
| 45 | + "items": { |
| 46 | + "type": "string", |
| 47 | + "enum": ["message", "response_url", "status_code"] |
| 48 | + } |
| 49 | + } |
| 50 | + ] |
| 51 | + }, |
| 52 | + "errorMsg": { |
| 53 | + "oneOf": [ |
| 54 | + { "type": "string" }, |
| 55 | + { "type": "array", "items": { "type": "string" } } |
| 56 | + ] |
| 57 | + }, |
| 58 | + "errorCode": { |
| 59 | + "oneOf": [ |
| 60 | + { "type": "integer" }, |
| 61 | + { "type": "array", "items": { "type": "integer" } } |
| 62 | + ] |
| 63 | + }, |
| 64 | + "errorUrl": { "type": "string" }, |
| 65 | + "response_url": { "type": "string" } |
| 66 | + }, |
| 67 | + "dependencies": { |
| 68 | + "errorMsg": { |
| 69 | + "oneOf": [ |
| 70 | + { "properties": { "errorType": { "const": "message" } } }, |
| 71 | + { |
| 72 | + "properties": { |
| 73 | + "errorType": { |
| 74 | + "type": "array", |
| 75 | + "contains": { "const": "message" } |
65 | 76 | }
|
66 |
| - }, |
67 |
| - "if": { "properties": { "errorType": { "const": "message" } } }, |
68 |
| - "then": { "required": [ "errorMsg" ] }, |
69 |
| - "else": { |
70 |
| - "if": { "properties": { "errorType": { "const": "response_url" } } }, |
71 |
| - "then": { "required": [ "errorUrl" ] } |
72 |
| - }, |
73 |
| - "additionalProperties": false |
| 77 | + } |
| 78 | + } |
| 79 | + ] |
| 80 | + }, |
| 81 | + "errorUrl": { |
| 82 | + "oneOf": [ |
| 83 | + { "properties": { "errorType": { "const": "response_url" } } }, |
| 84 | + { |
| 85 | + "properties": { |
| 86 | + "errorType": { |
| 87 | + "type": "array", |
| 88 | + "contains": { "const": "response_url" } |
| 89 | + } |
| 90 | + } |
| 91 | + } |
| 92 | + ] |
| 93 | + }, |
| 94 | + "errorCode": { |
| 95 | + "oneOf": [ |
| 96 | + { "properties": { "errorType": { "const": "status_code" } } }, |
| 97 | + { |
| 98 | + "properties": { |
| 99 | + "errorType": { |
| 100 | + "type": "array", |
| 101 | + "contains": { "const": "status_code" } |
| 102 | + } |
| 103 | + } |
| 104 | + } |
| 105 | + ] |
| 106 | + } |
| 107 | + }, |
| 108 | + "allOf": [ |
| 109 | + { |
| 110 | + "if": { |
| 111 | + "anyOf": [ |
| 112 | + { "properties": { "errorType": { "const": "message" } } }, |
| 113 | + { |
| 114 | + "properties": { |
| 115 | + "errorType": { |
| 116 | + "type": "array", |
| 117 | + "contains": { "const": "message" } |
| 118 | + } |
| 119 | + } |
| 120 | + } |
| 121 | + ] |
| 122 | + }, |
| 123 | + "then": { "required": ["errorMsg"] } |
| 124 | + }, |
| 125 | + { |
| 126 | + "if": { |
| 127 | + "anyOf": [ |
| 128 | + { "properties": { "errorType": { "const": "response_url" } } }, |
| 129 | + { |
| 130 | + "properties": { |
| 131 | + "errorType": { |
| 132 | + "type": "array", |
| 133 | + "contains": { "const": "response_url" } |
| 134 | + } |
| 135 | + } |
| 136 | + } |
| 137 | + ] |
| 138 | + }, |
| 139 | + "then": { "required": ["errorUrl"] } |
74 | 140 | }
|
75 |
| - }, |
76 |
| - "additionalProperties": false, |
77 |
| - "$defs": { |
78 |
| - "tag": { "type": "string", "enum": [ "adult", "gaming" ] } |
| 141 | + ], |
| 142 | + "additionalProperties": false |
79 | 143 | }
|
| 144 | + }, |
| 145 | + "additionalProperties": false, |
| 146 | + "$defs": { |
| 147 | + "tag": { "type": "string", "enum": ["adult", "gaming"] } |
| 148 | + } |
80 | 149 | }
|
0 commit comments