Saturday, July 31, 2010

How to install Matlab on ubuntu server 10.04 via command line

So I did not have x-server install on the server and it was not allowing me to do the GUI install. So instead I tried:

./install -t


for the text install but I got an error after the license agreement:
update/bin/glnxa64/xsetup: error while loading shared libraries: libXp.so.6 cannot open shared object file: No such file or directory

I did this:

apt-get install libxp6

and then it worked just fine using ./install -t
Hopefully this saves somebody some time, and stops them from doing a ubuntu-desktop install on a server just to install Matlab

Thursday, July 8, 2010

True multithreading in PHP! Spawn new threads in webpage

Ok, so I searched around for this and I was disappointed, I could not find true multithreading in PHP. Well here is my solution. You know how you can call php from the command line in linux/unix? Well you can do a system call to a php function, hide the output and break off of it and come back to the website and your php script will continue executing in the background.

Here is an example:

So from the command line I can do:

php -r 'PUT_YOUR_PHP_CODE_HERE_WITHOUT_ESCAPES;'

well there is no reason you can't call the a system call from your website, so I am doing something like this:

$exec_string="php -r 'PUT_YOUR_PHP_CODE_HERE_WITHOUT_ESCAPES' > /dev/null 2>&1 &";
exec($exec_string,$output);


The command: 2>&1 & at the end is what I am using the escape the string rather than waiting for it to finish.

$exec_string="php -r 'mail(\"".$_POST['user']."\",\"".$string1."\",\"".$bericht."\",\"".$string2."\");' > /dev/null 2>&1 &";
exec($exec_string,$output);

Monday, January 11, 2010

How to install SAPPHIRE HD5770 on ubuntu 9.10 and get it working

First go to ATI's website and download:
ati-driver-installer-9-12-x86.x86_64.run

Now run:
ati-driver-installer-9-12-x86.x86_64.run

Then:
sudo aticonfig --initial -f

Then reboot and settings worked just fine allowing me to configure advanced desktop settings

Wednesday, January 6, 2010

IP addresses you should hack and not feel bad about

Here is a list of banned IP addresses you can try hacking and not feel bad. These IPs spammed one of my websites so I was able to grab them.

Edit Delete 1 213.79.93.188
Edit Delete 2 193.63.181.11
Edit Delete 3 69.32.139.171
Edit Delete 4 72.3.139.247
Edit Delete 5 85.140.185.219
Edit Delete 6 157.138.204.166
Edit Delete 7 128.243.21.224
Edit Delete 8 129.194.8.73
Edit Delete 9 68.68.104.34
Edit Delete 10 85.140.65.67
Edit Delete 11 147.156.98.148
Edit Delete 12 66.147.136.40
Edit Delete 13 194.82.16.252

Let me help you get started:
Using the UNIX command NMAP you can do:

nmap -A -T4 147.156.98.148 to find out what services are running. The ouput for this IP is:

SCRIPT ENGINE: Aborting script scan.
Interesting ports on open9.irobot.uv.es (147.156.98.148):
Not shown: 1708 filtered ports
PORT STATE SERVICE VERSION
22/tcp open ssh (protocol 2.0)
80/tcp open http Apache httpd 2.2.11 ((Ubuntu) PHP/5.2.6-3ubuntu4.2 with Suhosin-Patch)
443/tcp closed https
5900/tcp closed vnc
5901/tcp closed vnc-1
5902/tcp closed vnc-2
5903/tcp closed vnc-3
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at http://www.insecure.org/cgi-bin/servicefp-submit.cgi :
SF-Port22-TCP:V=4.62%I=7%D=1/6%Time=4B44D19C%P=i686-pc-linux-gnu%r(NULL,27
SF:,"SSH-2\.0-OpenSSH_5\.1p1\x20Debian-5ubuntu1\r\n");

Some areas to start would be trying to do a brute force on the SSH server, or VNC server incase the password was simple, or find vulnerabilities in the webserver, the kernel may have a security hole since it is older... etc.. etc..

Friday, January 1, 2010

You have not chosen to trust "Thawte Premium Server CA", the issuer of the server's security certificate (SSL error 61) ubuntu citrix ICA client FIX

You have not chosen to trust "Thawte Premium Server CA", the issuer of the server's security certificate (SSL error 61) ubuntu citrix ICA client FIX.

I use a citrix ICA client to remote into work and I began to get the error:
You have not chosen to trust "Thawte Premium Server CA", the issuer of the server's security certificate (SSL error 61)

To fix this I downloaded the new root certificates:
wget https://www.verisign.com/support/thawte-roots.zip
unzip thawte-roots.zip


Now we need to find were we need to put the new cert file, I found this by searching doing this:
find -name *cacert*

I copied the new file using this command:
sudo cp -v Thawte\ Roots/Thawte\ SSLWeb\ Server\ Roots/Thawte\ Premium\ Server\ CA.cer ~/./ICAClient/linuxx86/keystore/cacerts/ThawtePremiumServerCA.crt

Then I retried the citrix ICA client, did not even need to restart my browser, and it worked!

Thursday, December 24, 2009

How to remove Security Tool virus using ubuntu live CD

I got a computer with the Security tool virus infection. I could not access my task manager, or run antivirus software since the program would keep shutting it down.

I booted a ubuntu live cd and opened up the terminal command line

sudo fdisk -l
mkdir disk1/
sudo mount /dev/sda3/ disk1/

Then I went to disk1/ProgramData/ and I saw a random number folder:
15567630 and inside was 15567630.exe which after reading around online I suspected to be the executable. So I deleted it.

rm 15567630/ -R
Then I rebooted the computer into windows (NOT RESUME, new reboot). This allowed me to install mbam-setup.exe (walwareby Anti Malware) to scan and do a complete removal). I did not see any signs of the virus before hand and I may have been good but I wanted to do a full scan anyway.

I also noticed that a desktop shortcut to security tools was broken (cause I deleted it :) ).

Post questions and I'll do my best to answer

Saturday, June 6, 2009

how to install octave with image package in windows XP without Cygwin

Install octave 3.0.5 using the windows installer.

Then go to:

http://www.tatsuromatsuoka.com/octave/Eng/Win/

Download the zip file, follow the read me on where to put the files. Then open octave and type:

> pkg rebuild image
> pkg load image

Then use

> pkg list

To confirm that it is installed. Now you can use imread and all of those other great functions like you do in Matlab!

I had a heck of a time finding this out, tried compiling with Cygwin on windows but found this out using google and it was much easier.