Author Archives: Silver Moon

About Silver Moon

A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected].

Install Postgresql, phpPgAdmin and pgadmin on Ubuntu

By | March 25, 2009

Install Postgresql , phpPGAdmin and pgadmin 3 can be installed from synaptic. $ sudo apt-get install postgresql phppgadmin pgadmin3 After installation some configuration needs to be done. First of all setup the password of the user ‘postgres’ which is the default user of postgresql. Type the following in the terminal $ sudo -u postgres psql… Read More »

Run php scripts from cron

By | March 22, 2009

Automatic Running In a web application there are many cases, when a certain piece of code or script needs to run automatically in the background to perform certain tasks, without the need of any user to start it. Like scraping, extracting or crawling data from web or perform some regular tasks like sending emails, system… Read More »

How to Install Apache Mod Rewrite on Ubuntu / Linux

By | August 8, 2020

Apache Mod Rewrite mod_rewrite is an apache module which enables rewriting of urls requested by client before the pages are fetched by apache. For example www.site.com/products.php?code=459 can be written as www.site.com/products/459 or www.site.com/products/459.html. The second url is re-written into the first one by mod_rewrite using rewrite rules specified in the .htaccess file. Enable Mod Rewrite… Read More »

Get real IP address of user in php

By | December 4, 2008

Client IP address Php applications are mostly web based and often need to get the ip address of the user who is connecting to the application. Ip address is required for various logging purpose, geolocation service etc. The most common way to get the ip address of a remote user is by using the superglobal… Read More »

Execute an sql script in jdbc

By | April 4, 2008

The SQL Script should have comments starting with – or — only on new lines and each command should end with a ; . Reading a sql file and putting all of it in a string variable and feeding to the execute command would result in an exception. All instructions must be executed individually. A… Read More »

Read write and save configurations to a file in java

By | April 2, 2008

Configuration files are used in applications to store settings, user preferences and other configuration parameters of an application so that. When configurations are changed from within the application these need to be saved so that next time the application starts with these new settings. In Java reading and writing to a configuration is pretty simple… Read More »

How to Code a Tcp Syn Port Scanner in C with Linux Sockets

By | August 5, 2020

Port Scanning Port Scanning searches for open ports on a remote system. The basic logic for a portscanner would be to connect to the port we want to check. If the socket gives a valid connection without any error then the port is open , closed otherwise (or inaccessible, or filtered). TCP Port Scanning Drawbacks… Read More »

Hack Bsnl Broadband Accounts

By | July 31, 2020

Hack bsnl broadband username and passwords Bsnl Broadband continues to grow as one the most popular broadband services in India with high speed facilities of upto 2 mpbs. But a large number of users of this service are vulnerable to hacker attacks because discovering and hacking the vulnerable victims of this network is shockingly simple…. Read More »