forked from sherlock-project/sherlock
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sherlock-project#2099 from ppfeister/feature/schema
Set schema for manifest
- Loading branch information
Showing
4 changed files
with
97 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "Sherlock Targets", | ||
"description": "Social media target to probe for existence of usernames", | ||
"type": "object", | ||
"properties": { | ||
"$schema": { "type": "string" } | ||
}, | ||
"patternProperties": { | ||
"^(?!\\$).*?$": { | ||
"type": "object", | ||
"description": "User-friendly target name", | ||
"required": [ "url", "urlMain", "errorType", "username_claimed" ], | ||
"properties": { | ||
"url": { "type": "string" }, | ||
"urlMain": { "type": "string" }, | ||
"urlProbe": { "type": "string" }, | ||
"username_claimed": { "type": "string" }, | ||
"regexCheck": { "type": "string" }, | ||
"isNSFW": { "type": "boolean" }, | ||
"headers": { "type": "object" }, | ||
"request_payload": { "type": "object" }, | ||
"__comment__": { | ||
"type": "string", | ||
"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." | ||
}, | ||
"tags": { | ||
"oneOf": [ | ||
{ "$ref": "#/$defs/tag" }, | ||
{ "type": "array", "items": { "$ref": "#/$defs/tag" } } | ||
] | ||
}, | ||
"request_method": { | ||
"type": "string", | ||
"enum": [ "GET", "POST", "HEAD", "PUT" ] | ||
}, | ||
"errorType": { | ||
"type": "string", | ||
"enum": [ "message", "response_url", "status_code" ] | ||
}, | ||
"errorMsg": { | ||
"oneOf": [ | ||
{ "type": "string" }, | ||
{ "type": "array", "items": { "type": "string" } } | ||
] | ||
}, | ||
"errorCode": { | ||
"oneOf": [ | ||
{ "type": "integer" }, | ||
{ "type": "array", "items": { "type": "integer" } } | ||
] | ||
}, | ||
"errorUrl": { "type": "string" }, | ||
"response_url": { "type": "string" } | ||
}, | ||
"dependencies": { | ||
"errorMsg": { | ||
"properties" : { "errorType": { "const": "message" } } | ||
}, | ||
"errorUrl": { | ||
"properties": { "errorType": { "const": "response_url" } } | ||
}, | ||
"errorCode": { | ||
"properties": { "errorType": { "const": "status_code" } } | ||
} | ||
}, | ||
"if": { "properties": { "errorType": { "const": "message" } } }, | ||
"then": { "required": [ "errorMsg" ] }, | ||
"else": { | ||
"if": { "properties": { "errorType": { "const": "response_url" } } }, | ||
"then": { "required": [ "errorUrl" ] } | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"$defs": { | ||
"tag": { "type": "string", "enum": [ "adult", "gaming" ] } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters