Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6544287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:26:50+00:00 2026-05-25T11:26:50+00:00

After having my Paypal account compromised I got a bit paranoid and wanted to

  • 0

After having my Paypal account compromised I got a bit paranoid and wanted to secure everything in my sites. One of them includes renaming the admin/ page to something else, then I will put something like a honeypot to see which IP’s they are coming from:

    <?
// honeypot 

if($_POST['username']) { 
sleep(10);

$filename = "intruders.txt"; 
$date = date('l jS \of F Y h:i:s A');
$handle = fopen($filename,"a+");
$content = "Username: $_POST[username] , Password: $_POST[password]  $date ... from $_SERVER[REMOTE_ADDR] \n";
fwrite($handle,$content);
fclose($handle);

echo "<br/><b>Wrong username or password. Please try again</b><br/><br/>"; 

} 

?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WHMCS - Admin alt</title>
</head>
<body>
<form id='login' action='index.php' method='post' accept-charset='UTF-8'>
<fieldset>
<legend>WHMCS Secure alt Login</legend> 
<label for='username' >Username*:</label>
<input type='text' name='username' id='username'  maxlength="50" />
<label for='password' >Password*:</label>
<input type='password' name='password' id='password' maxlength="50" />
<input type='submit' name='Submit' value='Submit' />
</fieldset>
</form>
<div id="footer">Copyright &copy; <a href="http://www.whmcs.com/" target="_blank">WHMCompleteSolution</a>.  All Rights Reserved.</div>
</body>
</html>

My only concern right now is, can this form be attacked to gain access to the site? I don’t think sql injection can work here since we never used sql, nor injecting js to the output since it only outputs some fake text. After that I can’t think of anything else an attacker might get wise on…

What do you think? could there be a better way to track them down?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:26:51+00:00Added an answer on May 25, 2026 at 11:26 am

    Now that you’ve posted the code here, you’ve spoiled the surprise. If you are going to use this code in production, change the code so it won’t be that easy to google.

    Notes:

    • sleep(10) – this makes your server vulnerable to a denial of service attack
    • writing to a file in the current directory – if you’re going to log to a file, do not log it just in a public area. You should not expose details like IP addresses to the public unless your visitors don’t care about it.
    • denial of service (2) due to unlimited logging – there is not flood protection nor is the input restricted
    • logging of passwords – not really effective in my opinion unless you want to know where an attacker comes from (cracked email accounts, compromised database, …)

    I would avoid using a honey pot like this. Besides that not all form submissions are cracking attempts (I’ve seen bots submitting my forms which were “protected” with a simple text question), it may be challenging visitors with bad intentions. Do proper logging of requests and actions and let someone review your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After having this issue on our websites over secure SSL connections for Office file
I encountered a problem after having more than one texture in my engine. My
I'm getting this error after having installed Magento 1.6.1 and wampserver 2.2 (64 bit)
After having to register at one more website, and hitting stupid restrictions on the
After having spend 1 year working on Android I'm a bit rusty in Traditional
After having accumulated enough tests that running them all takes some real time, I
After having got through the two Schemer books, I'm about to embark on HtDP
So after having squeezed the last bit of performance out of some Haskell I
After having found the answer to my question about the 64-bit version of MSBuild
I am having trouble with Paypal IPN About one thing, As I understood, paypal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.