A Cloudflare redirect script that can be used to simulate a CF that guides the user to click on it and then redirect to the link they want the user to open
- The HTML structure is centered around a
div
with the classcf - verification
, which contains all the verification elements. - There is a hidden checkbox (
input[type="checkbox"]
) with the IDhumanCheck
. This checkbox is used to trigger the verification process when it is checked. - A
div
with the classcf - box
serves as a visual representation of the checkbox. When the hidden checkbox is checked, an orange tick appears inside this box. - A
span
with the classcf - text
displays the verification prompt text. Initially, it shows "Verify you are human", and after successful verification, it changes to "Success!". - A
div
with the classcf - logo - section
contains the Cloudflare logo (represented by adiv
with the classcf - logo
) and the privacy and terms text (span
with the classcf - privacy
).
- Global Styling:
- The
body
is centered both horizontally and vertically usingdisplay: flex
,justify - content: center
, andalign - items: center
. It has a light gray background color and uses a modern sans - serif font.
- The
- Verification Container:
- The
cf - verification
class has a white background, rounded corners, and a shadow to give it a card - like appearance. It usesdisplay: flex
to arrange its child elements horizontally.
- The
- Checkbox Styling:
- The
cf - box
class represents the visual checkbox. It has a border and rounded corners. When hovered, it changes the border color and adds a shadow for better interactivity. - The
cf - box.checked::after
pseudo - element is used to display the orange tick when the checkbox is checked. It uses theclip - path
property to create the tick shape.
- The
- Text Styling:
- The
cf - text
class has a dark gray color and a specific font size and line height for readability.
- The
- Logo and Privacy Section:
- The
cf - logo - section
class arranges the logo and privacy text vertically. The logo (cf - logo
) has a fixed width and height and usesbackground - size: contain
to display the logo image properly. The privacy text (cf - privacy
) is smaller and has a lighter gray color.
- The
- The
verifyHuman
function is called when the state of thehumanCheck
checkbox changes. - When the checkbox is checked:
- The
checked
class is added to thecf - box
element, which triggers the appearance of the orange tick. - The text content of the
cf - text
element is changed to "Success!". - After a short delay (set by
setTimeout
), the user is redirected to the GitHub website.
- The
- When the checkbox is unchecked:
- The
checked
class is removed from thecf - box
element, and the text content of thecf - text
element is changed back to "Verify you are human".
- The
- Replace the placeholder
data:image/png;base64
in thestyle
attribute of thecf - logo
element with the actual base64 - encoded image of the Cloudflare logo. - Open the HTML file in a web browser.
- Check the checkbox to complete the verification. After successful verification, you will be redirected to GitHub.
This code is compatible with modern web browsers that support HTML5, CSS3, and JavaScript. It is designed to be responsive and should work well on both desktop and mobile devices.
To demonstrate the effect, you can put this script in an email and send it to the target, and after the target clicks, it will be redirected to the construction link
Here redirects to github
Of course, this is just a rough script, which can be used to improve the authenticity of CF and encrypt jump links and functions, such as saving the above as ASCII code and storing it in an array, and then calling it