In one of my recent project requiring a CSV text file import, the data columns had to be in certain predefined positions for the program to work correctly. The import did not depend on field labels, which is obviously a wrong way to process data. It would not have been much of a concern had the CSV files been in the correct format. However, the CSV files I had had the columns in wrong positions, which required me to exchange the columns to their correct positions for the parent program to import them correctly. For a few files I’d have easily used a spreadsheet for the task, but with around 34 files it was going to be tedious. The task entailed me to write a small script which helped in the matter.
One of the main sources spammers harvest emails ids are from websites and Google. An easy way to prevent email harvesting is to not disclose email ids on your website, least not in an obvious way. If your site has a few dozen pages than you can manually scan those to see if any email id is being displayed. However, for large site with hundreds of pages it is not an easy process. One tool that can make the process easier is ‘theHarvester’.
There is nothing worse for a site owner to endure than to have his site hacked with no backup to restore from. Many people rely on the hosting providers backup feature or if unavailable make a copy themselves on a regular basis. Unfortunately, ‘Regular’ can mean weeks or months, depending on how serious the issue of security is for the site owner or webmaster. However people are not to blame; for most people data backup is a chore that needs to be get done with, much like flossing after a good meal.
Transferring files over FTP using PHP is easily done using various PHP functions and cURL. However transferring files over SFTP raises various problems and is not easily supported via PHP and cURL. phpseclib provides a nice library wrapper that enables easy access to the sftp protocol and various cryptography functions. phpseclib is designed to be fully interoperable with OpenSSL and other standardized cryptography programs and protocols.
The Crypto module is one of the important modules available for Node.js, and allows you to use it for encrypting content, creating digests and creating public-key signatures. In this post we will work with creating a simple message digest from some given content. Here we will create a Node.js server that responds with a cryptographic hash for the content provided. e.g if we query with the following url, passing the text
helloworld and the hash function name
md5 the server will return the digest of the text. Note that the crypto module requires OpenSSL to be available on the underlying platform. Although a toy program, this is an exercise in using the ‘crypto’ and ‘querystring’ modules.
I finally got my hands on the Raspberry Pi a few days back. My upcoming plan is to use the Pi as a Node.js server. If you haven’t heard of the open, platform-friendly, inexpensive $35 Linux-powered computing platform known as Raspberry Pi by now, you better do so. Starting with the Auduino, this is surely the start of inexpensive open-source hardware computing. Think of your traditional PC motherboard with integrated graphics, network, sound, HDMI, and keyboard/mouse shrunken down to the size of a deck of playing cards, and you’ll get the idea of what the Raspberry Pi is all about. Driven by an ARM1176JZF 700MHz processor, the Raspberry Pi has 256 megabytes of on-board RAM and hardware-accelerated graphics.
This site is a digital habitat of Sameer, a freelance web developer working in PHP & MySQL.More