How to clean malware from website?

Malware, short for malicious software, is a software designed to secretly access a computer system without the owner’s informed consent. The expression is a general term used by computer professionals to mean a variety of forms of hostile, intrusive, or annoying software or program code. Sucuri SiteCheck is a free & remote scanner. SCAN Website … Read more

Recursive Replace in Files Folders

Hello Friends, Some time we want to change branding of web based softwares. Open source web based software have GNU License. We can modify the code and launch versions. We can use PERL (Perl is a highly capable, feature-rich programming language with over 22 years of development.) Here are some basic steps to Recursive Replace … Read more

Open source – Port25

If you have trouble getting the PHP’s mail() function to work on your server. If the function returned true, but never send the emails to target account. Some ISP’s block port 25 (mail port), so you can’t send directly but you can send indirectly using your ISP’s mail server. 😉 Many email providers keep lists … Read more

Install geoip on xampp

Geocoding (finding latitude/longitude for street addresses), Geotagging (tagging media with latitude/longitude coordinates), and Geolocation (finding latitude/longitude of computer with IP X-Forwarded-For). There are some options to install on linux environment: # wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz # gunzip GeoLiteCity.dat.gz # sudo mkdir -v /usr/share/GeoIP # sudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat Install geoip with php5 # sudo apt-get install … Read more

How to run cronjobs per second?

Have you checked my previous article on cronjobs… https://www.svnlabs.com/blogs/tag/crontab-command-line/ To run cronjob per second you have to execute crontab/cronjob per minute and then have to run task in cron file per second using PHP function time_sleep_until(). <?php $start = microtime(true); for($ii=0;$ii<60;$ii++) { //………………………. /// here is the tasks which need to run per second… //………………………. … Read more

Image2text

Image to Text Or Optical Character Recognition (OCR) is used for extracting text from PDF and images (JPG, BMP, TIFF, GIF) and convert into editable Word, Excel and Text output formats. What is OCR? Optical Character Recognition (OCR) is process of converting scanned images of handwritten, typed, or printed text into machine-encoded text. It is … Read more

Create FTP user from SSH

Wow! amazing …… Do you want to create FTP user from linux command line SSH? First you have to install FTP daemon like vsftpd: http://www.cyberciti.biz/tips/linux-creating-ftp-account-with-vsftpds.html proftpd: http://www.cyberciti.biz/tips/linux-installing-configuring-proftpd-ftp-server.html Use below commands to create FTP user in Web accessible location # useradd -c ‘FTP USER svnlabs’ -m svnlabs -d /var/www/html/svnlabs # chmod -R 775 /var/www/html/svnlabs

Run Shell Commands from CGI-BIN

Hey, here are some simple steps to run shell commands under cgi-bin using Apache web server (/var/www/cgi-bin), which is configured with cgi access. Apache CGI allows files with executable permission in cgi-bin directory treated as application and run on web browsers. We have to send the MIME type before outputting data to the web from … Read more

Create WebThumb using LAMP

We have to install opera/firefox  first on server. Then install Xvfb for Xvfb virtual framebuffer html2image.sh ………………………. #! /bin/sh /etc/init.d/xvfb start export DISPLAY=:7 DISPLAY=:7 opera –remote ‘openURL(‘$1′)’ & sleep 20 DISPLAY=:7  import -window root $2 /etc/init.d/xvfb stop Uses: # ./html2image.sh  https://www.svnlabs.com   webthumb/svnlabs.png Open FireFox in Xvfb: firefox.sh #!/bin/sh mozilla-firefox -a firefox -remote ‘openURL(‘$1′, new-tab)’ || … Read more

How can we use PHP to access shared library functions?

PHP function dl() – Loads a PHP extension at runtime <?php // Example loading an extension based on OS if (!extension_loaded(‘svnlabs’)) { if (strtoupper(substr(PHP_OS, 0, 3)) === ‘WIN’) { dl(‘php_svnlabs.dll’); } else { dl(‘svnlabs.so’); } } // Or, the PHP_SHLIB_SUFFIX constant is available as of PHP 4.3.0 if (!extension_loaded(‘svnlabs’)) { $prefix = (PHP_SHLIB_SUFFIX === ‘dll’) ? ‘php_’ : ”; dl($prefix . ‘svnlabs.’ . PHP_SHLIB_SUFFIX); } ?> We can use linux “nm” or “objdump” command to list symbols in object files… # nm -C … Read more