-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrating custom bot detection into frictionless captcha (#1282)
* Integrating custom bot detection into frictionless captcha * Tidying up build * Removing context provider * Resolving frictionless deps * package lock fix * Adding index.ts file to src in detector * typo fix
- Loading branch information
Showing
11 changed files
with
4,484 additions
and
756 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,58 @@ | ||
export function isBot(): Promise<{ | ||
fingerprint: { | ||
resistance: | ||
| { | ||
privacy: undefined | ||
security: undefined | ||
mode: undefined | ||
extension: undefined | ||
engine: any | ||
} | ||
| undefined | ||
headlessFeaturesFingerprint: | ||
| { | ||
likeHeadlessRating: number | ||
headlessRating: number | ||
stealthRating: number | ||
systemFonts: string | ||
platformEstimate: any[] | ||
chromium: boolean | ||
likeHeadless: { | ||
noChrome: boolean | ||
hasPermissionsBug: boolean | ||
noPlugins: boolean | ||
noMimeTypes: boolean | ||
notificationIsDenied: boolean | ||
hasKnownBgColor: boolean | ||
prefersLightColor: any | ||
uaDataIsBlank: boolean | ||
pdfIsDisabled: boolean | ||
noTaskbar: boolean | ||
hasVvpScreenRes: boolean | ||
hasSwiftShader: any | ||
noWebShare: any | ||
noContentIndex: boolean | ||
noContactsManager: boolean | ||
noDownlinkMax: boolean | ||
} | ||
headless: { | ||
webDriverIsOn: any | ||
hasHeadlessUA: any | ||
hasHeadlessWorkerUA: any | ||
} | ||
stealth: { | ||
hasIframeProxy: boolean | ||
hasHighChromeIndex: any | ||
hasBadChromeRuntime: boolean | ||
hasToStringProxy: boolean | ||
hasBadWebGL: any | ||
} | ||
} | ||
| undefined | ||
} | ||
isBotBotD: any | ||
botScore: any | ||
isBot: boolean | ||
botType: any | ||
}> | ||
//# sourceMappingURL=index.d.ts.map |
Large diffs are not rendered by default.
Oops, something went wrong.
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,8 @@ | ||
{ | ||
"extends": "../../tsconfig.esm.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./dist" | ||
}, | ||
"include": ["src"] | ||
} |
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
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
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,14 @@ | ||
// Copyright 2021-2024 Prosopo (UK) Ltd. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
export * from './props.js' |
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,23 @@ | ||
// Copyright 2021-2024 Prosopo (UK) Ltd. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
import { ProcaptchaProps } from '../procaptcha/props.js' | ||
|
||
export type BotDetectionFunction = () => Promise<{ bot: boolean }> | ||
|
||
/** | ||
* The props for the Procaptcha Frictionless component. | ||
*/ | ||
export interface ProcaptchaFrictionlessProps extends ProcaptchaProps { | ||
detectBot?: BotDetectionFunction | ||
} |