Recently one of my sites was hacked , It was a closed source web application. I came to know next day when i saw changes made to some settings for my web - application. Anyhow here is how i tracked down what was wrong , might help some one in the same mess i was in.
The first thing i noticed was that Administrator account passwords were changed, So i instantly knew something was wrong.
Since i usually store main settings in a file for faster access , i just opened FTP to look at the time stamp associated with the file. This showed me the last modifed date of the file and an approximate idea when the hacker changed the details.
Next step was to dig up the raw access logs from CPanel , After downloading the access logs for that specific file i opened them in PSPad ( My fav editor ) . Logs are not small of busy sites so you will be looking at a very large amount of data.
But i knew specific url which can be used to change the settings so i just did a Ctrl-F and put in the url with a POST prefix , as a form has to be submitted to change settings . This gave me a few instances of that URL with POST request.
Now looking at the time stamp i was able to find out when the hacker did the settings change. Means I had the IP.Doing another another CTRL-F on the IP and pressing list put all the hacker logs in another window , which makes its easy for us to go step by step at his efforts to crack the system.
After going from the start i noticed after certain URL he suddenly had got access to the admin section , And once i put in the url myself, i knew what the problem was.
And so it was fixed.
This is a pure php implementation of a php backup script. So it should work fine on windows and linux. But its not suited for takeing very large backups.
I just wrote it cause most of the script i saw offered file or database backup and broke down to usage of exec and unix commands , for which i had to contact hosting.
Some basic features -
- File and Directory backup
- Multiple database/table sql backup
- Backup email
Downloads: 2,543 File Size: 11.8 KiB
The script is supposed to be called using automatically using CRON , and the backup folder in which backup it taken should be writable.All you have to do is run backup.php .
Edit config.php before use. Released under GNU GPL license.
I was searching for a simple script which would allow me to download videos from youtube using php. I did find some implementation but only one of them worked and it used Pear. So here is a simple script to help you download videos from youtube. Allows you to download restricted videos too by logging into youtube.
The script is a simple youtube class which uses CURL.
Sample usage of the youtube class -
include(’curl.php’);
include(’youtube.php’);
$tube = new youtube();
// Only required for restricted videos
// $tube->username = “userid”;
// $tube->password = “password”;
$download_link = $tube->get($_POST['url']);
Downloads: 3,851 File Size: 9.7 KiB
PQuery is a set of helper classes for JQuery JavaScript library.This library allows you to easily integrate AJAX , Effects and other JQuery functionality into your PHP scripts.IT has a small foot print and is compatible with PHP4 and PHP5.
Downloads: 1,698 File Size: 54.7 KiB
Downloads: 1,265 File Size: 3.4 KiB
PQuery Demos : PQuery Demos.
Documentation : PQuery Documentation .
License : MIT or GPL ( what ever you wish to use )