WordPress admin login

After reading on the SANS website about a dirty process of using distributed wordpress as from here. One of the ways to make sure that the user cannot keep on trying to use brute force to access your site is to set the password randomly, I use this website pctools which comes up with a very nice password for you.

Also within the brute force attach they are using the username of admin to try and login so you could change the admin username.

UPDATE wp_users SET user_login = '<insert name here>' WHERE user_login = 'admin';

Of course if you have setup the pre table name of wp_ instead it would be users table name.


Whilst I was understanding the bits structure of binary values I did come across the page from here about how to do multiplication with binary values and thought that I might as well do it in c++ to understand abit more about the process.

The main part from that page above is

Rules of Binary Multiplication

  • 0 x 0 = 0
  • 0 x 1 = 0
  • 1 x 0 = 0
  • 1 x 1 = 1, and no carry or borrow bits

For example,


Call a function

Lets just say that you are writing a template program and you want to add into a array of function calls, which you can add to as well on-the-fly. Within PHP you can use a function called call_user_func which allows you to call a function using a stringed parameter in the first parameter and the next parameter(s) (if you wish to pass more than one parameter) is next. Hopefully the below will demonstrate better.

  function test($var)
    echo "test : " . $var;
  function example($var)
    echo "example : " . $var;
  $funarr = array(array("test", "codingfriends"), array("example", "was here"));
  foreach ($funarr as $funarr_call)
    call_user_func($funarr_call[0], $funarr_call[1]);
    echo "<br/>";

and the output would be

test : codingfriends
example : was here

Conditions – true or false

When you want to do a test against true or false with a integer value. Basically 0 is false and anything else is true, as demonstrated below.

#include <stdlib.h>
#include <iostream>
using namespace std;
int main()
  for (int i = -10; i < 10; i++)
      if (i) 
	  cout << "true " << i << endl;
	  cout << "false " << i << endl;

and the output of this is, the true/false values is after the if statement.

true -10
true -9
true -8
true -7
true -6
true -5
true -4
true -3
true -2
true -1
false 0
true 1
true 2
true 3
true 4
true 5
true 6
true 7
true 8
true 9