Add contact form spambot honeytrap
This commit is contained in:
parent
3a08a2e50c
commit
f93a528822
@ -28,7 +28,7 @@ function output_card($content) {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($_POST['name']) || empty($_POST['message']) || !filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
|
if (empty($_POST['name']) || empty($_POST['message']) || !filter_var($_POST['real_email'], FILTER_VALIDATE_EMAIL) || !empty($_POST['email'])) {
|
||||||
$content = <<<END
|
$content = <<<END
|
||||||
<p>Whoops! You didn't fill out the contact form properly.</p>
|
<p>Whoops! You didn't fill out the contact form properly.</p>
|
||||||
<p><a href="javascript:history.back()" class="btn btn-primary btn-sm">Go back</a> and try again.</p>
|
<p><a href="javascript:history.back()" class="btn btn-primary btn-sm">Go back</a> and try again.</p>
|
||||||
@ -42,7 +42,7 @@ $siteid = getsiteid();
|
|||||||
$database->insert("messages", [
|
$database->insert("messages", [
|
||||||
"siteid" => $siteid,
|
"siteid" => $siteid,
|
||||||
"name" => htmlspecialchars($_POST['name']),
|
"name" => htmlspecialchars($_POST['name']),
|
||||||
"email" => htmlspecialchars($_POST['email']),
|
"email" => htmlspecialchars($_POST['real_email']),
|
||||||
"message" => htmlspecialchars($_POST['message']),
|
"message" => htmlspecialchars($_POST['message']),
|
||||||
"date" => date("Y-m-d H:i:s")
|
"date" => date("Y-m-d H:i:s")
|
||||||
]);
|
]);
|
||||||
|
@ -17,6 +17,10 @@ include __DIR__ . "/inc/header.inc.php";
|
|||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form action="<?php get_site_url(); ?>contact.php" method="POST">
|
<form action="<?php get_site_url(); ?>contact.php" method="POST">
|
||||||
|
<span style="display: none;">
|
||||||
|
Leave this box empty
|
||||||
|
<input name="email" id="email" placeholder="Email" type="email" style="display: none;" autocomplete="off" />
|
||||||
|
</span>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mb-3">
|
<div class="col-12 col-md-6 mb-3">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
@ -24,7 +28,7 @@ include __DIR__ . "/inc/header.inc.php";
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 mb-3">
|
<div class="col-12 col-md-6 mb-3">
|
||||||
<label for="email">Email</label>
|
<label for="email">Email</label>
|
||||||
<input type="email" class="form-control" name="email" id="email" placeholder="you@example.com" required />
|
<input type="email" class="form-control" name="real_email" id="email" placeholder="you@example.com" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<label for="message">Message</label>
|
<label for="message">Message</label>
|
||||||
|
@ -10,13 +10,17 @@
|
|||||||
<h2 class="major"><?php get_page_clean_title(); ?></h2>
|
<h2 class="major"><?php get_page_clean_title(); ?></h2>
|
||||||
<p class="sw-text" data-component="lead"><?php get_component("lead"); ?></p>
|
<p class="sw-text" data-component="lead"><?php get_component("lead"); ?></p>
|
||||||
<form method="post" action="contact.php">
|
<form method="post" action="contact.php">
|
||||||
|
<span style="display: none;">
|
||||||
|
Leave this box empty
|
||||||
|
<input name="email" id="email" placeholder="Email" type="email" style="display: none;" autocomplete="off" />
|
||||||
|
</span>
|
||||||
<div class="field half first">
|
<div class="field half first">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
<input type="text" name="name" id="name" required />
|
<input type="text" name="name" id="name" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="field half">
|
<div class="field half">
|
||||||
<label for="email">Email</label>
|
<label for="email">Email</label>
|
||||||
<input type="text" name="email" id="email" required />
|
<input type="text" name="real_email" id="email" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="message">Message</label>
|
<label for="message">Message</label>
|
||||||
@ -46,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include __DIR__ . "/inc/bg-edit.inc.php"; ?>
|
<?php include __DIR__ . "/inc/bg-edit.inc.php"; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include __DIR__ . "/inc/footer.inc.php"; ?>
|
<?php include __DIR__ . "/inc/footer.inc.php"; ?>
|
@ -163,13 +163,17 @@ include __DIR__ . "/inc/head.inc.php";
|
|||||||
<div class="split style1">
|
<div class="split style1">
|
||||||
<section>
|
<section>
|
||||||
<form method="post" action="contact.php">
|
<form method="post" action="contact.php">
|
||||||
|
<span style="display: none;">
|
||||||
|
Leave this box empty
|
||||||
|
<input name="email" id="email" placeholder="Email" type="email" style="display: none;" autocomplete="off" />
|
||||||
|
</span>
|
||||||
<div class="field half first">
|
<div class="field half first">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
<input type="text" name="name" id="name" required />
|
<input type="text" name="name" id="name" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="field half">
|
<div class="field half">
|
||||||
<label for="email">Email</label>
|
<label for="email">Email</label>
|
||||||
<input type="email" name="email" id="email" required />
|
<input type="email" name="real_email" id="email" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="message">Message</label>
|
<label for="message">Message</label>
|
||||||
|
@ -6,11 +6,15 @@ include __DIR__ . "/inc/header.inc.php";
|
|||||||
<?php get_component("contact-header"); ?>
|
<?php get_component("contact-header"); ?>
|
||||||
</div></h2>
|
</div></h2>
|
||||||
<form method="post" action="contact.php">
|
<form method="post" action="contact.php">
|
||||||
|
<span style="display: none;">
|
||||||
|
Leave this box empty
|
||||||
|
<input name="email" id="email" placeholder="Email" type="email" style="display: none;" autocomplete="off" />
|
||||||
|
</span>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<input type="text" name="name" id="name" placeholder="Name" />
|
<input type="text" name="name" id="name" placeholder="Name" />
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<input type="email" name="email" id="email" placeholder="Email" />
|
<input type="email" name="real_email" id="email" placeholder="Email" />
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<textarea name="message" id="message" placeholder="Message" rows="4"></textarea>
|
<textarea name="message" id="message" placeholder="Message" rows="4"></textarea>
|
||||||
|
@ -2,13 +2,17 @@
|
|||||||
<footer id="footer">
|
<footer id="footer">
|
||||||
<section>
|
<section>
|
||||||
<form method="post" action="contact.php">
|
<form method="post" action="contact.php">
|
||||||
|
<span style="display: none;">
|
||||||
|
Leave this box empty
|
||||||
|
<input name="email" id="email" placeholder="Email" type="email" style="display: none;" autocomplete="off" />
|
||||||
|
</span>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
<input type="text" name="name" id="name" required />
|
<input type="text" name="name" id="name" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="email">Email</label>
|
<label for="email">Email</label>
|
||||||
<input type="text" name="email" id="email" required />
|
<input type="text" name="real_email" id="email" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="message">Message</label>
|
<label for="message">Message</label>
|
||||||
|
@ -4,11 +4,15 @@
|
|||||||
<section>
|
<section>
|
||||||
<h2>Get in touch</h2>
|
<h2>Get in touch</h2>
|
||||||
<form method="post" action="contact.php">
|
<form method="post" action="contact.php">
|
||||||
|
<span style="display: none;">
|
||||||
|
Leave this box empty
|
||||||
|
<input name="email" id="email" placeholder="Email" type="email" style="display: none;" autocomplete="off" />
|
||||||
|
</span>
|
||||||
<div class="field half first">
|
<div class="field half first">
|
||||||
<input type="text" name="name" id="name" placeholder="Name" required />
|
<input type="text" name="name" id="name" placeholder="Name" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="field half">
|
<div class="field half">
|
||||||
<input type="email" name="email" id="email" placeholder="Email" required />
|
<input type="email" name="real_email" id="email" placeholder="Email" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<textarea name="message" id="message" placeholder="Message" required ></textarea>
|
<textarea name="message" id="message" placeholder="Message" required ></textarea>
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<form action="<?php get_site_url(); ?>contact.php" method="POST">
|
<form action="<?php get_site_url(); ?>contact.php" method="POST">
|
||||||
|
<span style="display: none;">
|
||||||
|
Leave this box empty
|
||||||
|
<input name="email" id="email" placeholder="Email" type="email" style="display: none;" autocomplete="off" />
|
||||||
|
</span>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="6u 12u(medium)">
|
<div class="6u 12u(medium)">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
@ -26,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="6u 12u(medium)">
|
<div class="6u 12u(medium)">
|
||||||
<label for="email">Email</label>
|
<label for="email">Email</label>
|
||||||
<input type="email" name="email" id="email" placeholder="you@example.com" required />
|
<input type="email" name="real_email" id="email" placeholder="you@example.com" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="12u">
|
<div class="12u">
|
||||||
<label for="message">Message</label>
|
<label for="message">Message</label>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user