Dump all PHP variables

<?php
$everything = get_defined_vars();
ksort($everything);
echo '<pre>';
print_r($everything);
echo '</pre>';
?>

sec_error_ca_cert_invalid - Firefox and SSL certificates

Seems that Firefox v31 and later has decided to remove access to sites encrypted with self signed certificates by default!

Anyway to resume some form of normality modify your “about:config” in the firefox address bar
Search for “security.use_mozillapkix_verification” and set it to “false”

That should do it.

SSH Forced commands from Web Page

Are you a paranoid nerd, who’s business requirements are very strict about IT security? No, well you may as well stop reading here.

Perhaps you have a business requirement to perform some random function on a server that only allows SSH access, but the rest of the business requires simple press button access to perform those functions?

Well with SSH force command wrappers, SSH keys and PHP you too can have simple click button access for the rest of the business!

Basically with a Linux apache server with PHP use the following code:
[Read More…]

Script to remove all versions of Java

Save the following as a batch script. I’ll let you work out the rest.

Eventcreate /L Application /T information /ID 69 /SO Remove-java.bat /D "Running J2SE Uninstall"
wmic product where "name like 'J2SE Runtime%%'" call uninstall /nointeractive
Eventcreate /L Application /T information /ID 69 /SO Remove-java.bat /D "Running Java(TM) Uninstall"
wmic product where "name like 'Java(TM)%%'" call uninstall /nointeractive
Eventcreate /L Application /T information /ID 70 /SO Remove-java.bat /D "Remove-Java.bat Completed"

Generate Entropy for Linux under VMware

Often with virtualised servers you can have a slow time generating entropy for virtualised systems and you get stuck with this message:

 We need to generate a lot of random bytes. It is a good idea to perform some other action (type on
 the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the 
random number generator a better chance to gain  enough entropy.
 

The quickest way in my opinion is the following command. Just make sure you have a dvd / cdrom iso mounted and connected with vmware.

 until [ 1 = 0 ]; do dd if=/dev/sr0 of=/tmp/dvd.iso; rm /tmp/dvd.iso -f; done 

and ^C when your done!