Monday, 9 December 2013

Best Programming Quotations

Best Programming Quotations :


 

 A good programmer is someone who looks both ways before crossing a one-way street.   -- Doug Linder, systems administrator

A most important, but also most elusive, aspect of any tool is its influence on the habits of those who train themselves in its use. If the tool is a programming language this influence is, whether we like it or not, an influence on our thinking habits.   -- Edsger Dijkstra, computer scientist

Being abstract is something profoundly different from being vague... The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.   -- Edsger Dijkstra

Besides a mathematical inclination, an exceptionally good mastery of one's native tongue is the most vital asset of a competent programmer.   -- Edsger Dijkstra

C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.   -- Bjarne Stroustrup, developer of the C++ programming language

Commentary: most debugging problems are fixed easily; identifying the location of the problem is hard.   -- unknown

Considering the current sad state of our computer programs, software development is clearly still a black art, and cannot yet be called an engineering discipline.   -- Bill Clinton, former President of the United States

Given enough eyeballs, all bugs are shallow (e.g., given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone).   -- Eric S. Raymond, programmer and advocate of open source software, from The Cathedral and the Bazaar

Good code is its own best documentation. As you're about to add a comment, ask yourself, 'How can I improve the code so that this comment isn't needed?' Improve the code and then document it to make it even clearer.   -- Steve McConnell, software engineer and author, from Code Complete

Hey! It compiles! Ship it!   -- unknown

Inside every well-written large program is a well-written small program.   -- Charles Antony Richard Hoare, computer scientist

It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter.   -- Nathaniel S. Borenstein, computer scientist

Managing programmers is like herding cats.   -- unknown

Real programmers don't comment their code. If it was hard to write, it should be hard to understand.   -- unknown

Simplicity is prerequisite for reliability.   -- Edsger Dijkstra

The sooner you start to code, the longer the program will take.   -- Roy Carlson, University of Wisconsin

Weeks of programming can save you hours of planning.   -- unknown

There are only two kinds of programming languages: those people always bitch about and those nobody uses.   -- Bjarne Stroustrup

Saturday, 7 December 2013

Hidden Messages in Your Web Browser

Hidden Messages in Your Web Browser :

  
     There is a hidden message in the Web browser you're using right now. Assuming it's Mozilla Firefox. If it isn't, then kindly open Firefox and read that sentence again. We will wait.

Every Mozilla browser includes a special "about" feature that allows you to configure certain sections just by typing "about:whatever" into the address bar. For example, if you type "about:about," you'll see a list of all the menus they offer. Some of the menus are actually cute Easter eggs, like "about:robots," which takes you to a page referencing things like Blade Runner, Futurama, and the eventual annihilation of all mankind.

However, if you type "about:mozilla," perhaps looking to learn a bit more about the browser, you'll come across a red screen with ominous Bible-like text written on it.

What the complete hell? What you've just read is an excerpt from the Book of Mozilla, an ongoing text of apocalyptic literature secretly inserted by Mozilla into each of its Web browsers dating back to when the company worked on AOL's Netscape in 1995. So if you typed "about:mozilla" 17 years ago, you'd see that.

Apparently, each verse is a metaphor for one of the updates Mozilla has released. Hidden developer commentary in the code of the 1998 page confirms that the beast "Mammon" is actually Mozilla's main competitor, Microsoft Internet Explorer. The first verse we showed you says that Mammon has become "naught but a follower," a reference to the fact that the latest editions of Internet Explorer straight up ripped off several features from Mozilla. Among them was the "about:mozilla" page -- if you type that in some versions of Explorer, it takes you to a blank blue screen.

Saturday, 30 November 2013

Top Open Source Hacking Tools


 

Nmap : 

Nmap (“Network Mapper”) is a free and open source (license) utility for network discovery and security auditing. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. Nmap homepage.  


Wireshark :

Wireshark is a network protocol analyzer. It lets you capture and interactively browse the traffic running on a computer network. Wireshark homepage.

Nikto2 :

Nikto is an Open Source (GPL) web server scanner which performs comprehensive tests against web servers for multiple items, including over 6400 potentially dangerous files/CGIs, checks for outdated versions of over 1200 servers, and version specific problems on over 270 servers. It also checks for server configuration items such as the presence of multiple index files, HTTP server options, and will attempt to identify installed web servers and software. Nikto2 homepage.

Ettercap :

Ettercap is a comprehensive suite for man in the middle attacks. It features sniffing of live connections, content filtering on the fly and many other interesting tricks. It supports active and passive dissection of many protocols and includes many features for network and host analysis. ettercap homepage.
NexPose Community edition :

The Nexpose Community Edition is a free, single-user vulnerability management solution. Nexpose Community Edition is powered by the same scan engine as Nexpose Enterprise and offers many of the same features. Nexpose homepage.
Ncat :

Ncat is a feature-packed networking utility which reads and writes data across networks from the command line. Ncat was written for the Nmap Project as a much-improved reimplementation of the venerable Netcat. It uses both TCP and UDP for communication and is designed to be a reliable back-end tool to instantly provide network connectivity to other applications and users. Ncat will not only work with IPv4 and IPv6 but provides the user with a virtually limitless number of potential uses. ncat homepage.

 Kismet :

Kismet is an 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. Kismet will work with any wireless card which supports raw monitoring (rfmon) mode, and (with appropriate hardware) can sniff 802.11b, 802.11a, 802.11g, and 802.11n traffic. Kismet also supports plugins which allow sniffing other media such as DECT. kismet homepage.
w3af :

w3af is a Web Application Attack and Audit Framework. The project’s goal is to create a framework to find and exploit web application vulnerabilities that is easy to use and extend. w3af homepage.

Thursday, 28 November 2013

Linux shell commands tips and tricks


Linux shell commands tips and tricks:

 
     Keep in mind that for some commands you will need to install additional software on your Linux distribution.

SSH debug mode:
    $ ssh -vvv user@ip_address   

SSH with pem key:

     $ ssh user@ip_address -i key.pem    

Create war file:

     $ jar -cvf name.war file    

Test disk read speed:

     $ hdparm -Tt /dev/sda    

Get md5 hash from text:

     $ echo -n "text" | md5sum    

Check xml syntax:

     $ xmllint --noout file.xml    

Extract tar.gz in new directory:

     $ tar zxvf package.tar.gz -C new_dir    

Get HTTP headers with curl:

     $ curl -I http://www.example.com      

Modify timestamp of some file or directory (YYMMDDhhmm):

     $ touch -t 0712250000 file    


Download from ftp using wget:

     $ wget -m ftp://username:password@hostname    

Generate random password (16 char long in this case):

     $ LANG=c < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;    

Quickly create a backup of a file:

     $ cp some_file_name{,.bkp}    

Access Windows share:

     $ smbclient -U "DOMAIN\user" //dc.domain.com/share/test/dir    

Run command from history (here at line 200):

     $ !200    

Unzip to directory:

     $ unzip package_name.zip -d dir_name    

Show free RAM in MB:

     $ free -m | grep cache | awk '/[0-9]/{ print $4" MB" }'    

Git clone specific branch (master):

     $ git clone git@github.com:name/app.git -b master    

Git switch to another branch (develop):

     $ git checkout develop    

Git delete branch (mybranch):

     $ git branch -d mybranch    

Git delete remote branch:

     $ git push origin :branchName    

Git push new branch to remote:

     $ git push -u origin mynewfeature    

List all supported kill signals:

     $ kill -l    

Installing Lua and Luarocks in CentOS

Installing Lua and Luarocks in CentOS:

     There seems to be something wrong with CentOS' lua package (version 5.1.4). After installing lua via yum, compiling luarocks in /usr/local/src/ and running the luarocks command, you will end up with the following error:

The issue seems to persist even in CentOS 6. So we suggest building lua and luarocks directly from the source after some OS library dependencies are met:

     # yum install gcc gcc-c++ kernel-devel    
     # yum install readline-dev                         
     # yum install ncurses-devel.i386               


Proceed to download and compile lua:

     # wget http://www.lua.org/ftp/lua-5.1.4.tar.gz     
     # tar zxvf lua-5.1.4.tar.gz                                     
     # cd lua-5.1.4                                                       
     # make linux                                                        
 

Download and install luarocks:

     # wget http://luarocks.org/releases/luarocks-2.0.6.tar.gz    
     # tar zxvf luarocks-2.0.6.tar.gz                                             
     # cd luarocks-2.0.6                                                               
     # ./configure                                                                          
     # make                                                                                  
     # make install                                                                        


This should help you have luarocks properly installed and ready to fetch lua modules from the repo. Have fun!

Sunday, 17 November 2013

FireFox users can Hack Rapidshare NOW

FireFox users can Hack Rapidshare NOW:

 

       The hot new Firefox plug-in takes browser customization to a whole new level by letting users filter site content or change page behaviors. The glory of open-source software is that it allows anyone with the inclination and the scripting knowledge to get under the hood and hot-rod their computing environment. But most of the time, that advantage is available only to people with the programming skills to make the changes they want.

That's where Greasemonkey, a free plug-in for Firefox, comes in -- it simplifies hacking the browser.

Released at the end 2004, Greasemonkey is the latest in a growing arsenal of Firefox customization tools. It changes how Web pages look and act by altering the rendering process.

Steps :

1) Install the Greasemonkey extension>>
http://downloads.mozdev.org/greasemonkey/greasemonkey_0.2.6.xpi
2) Restart Firefox
3) Go to http://rapidshare.de/files/1034529/rapidshare.user.js.html
4) Right click on rapidshare.user.js and choose "Install User Script".
5) Run FireFox.
6) From 'File' Menu click on Open File then browse to whereever you saved the 'greasemonkey.xpi' plug-in.
Open it, wait a couple seconds for the install button becomes active.
7) Click on it to install this plug-in then CLOSE FIREFOX.
8) Run FireFox again.
From the File Menu click on Open File then browse to whereever you saved the 'rapidshare.user.js'.
9) Open it.
10) Click the Tools Menu then click on Install User Script then click OK.
11) Close FireFox.

that's it now enjoy multiple file downloads......!!

Tuesday, 12 November 2013

How To Hide Files in JPEG Images

This post will help you to hide files in JPEG images :


In this example we will hide a text message inside a picture. We have choose for this tutorial a text file named foobar.txt and a picture linux.jpg.

1. Move your files you want to combine in a new folder, in our case C:\secret.

2. Add the file you want to hide into a new RAR archive like.Secret.txt .

3. WinRar created the archive in the folder where our files are located.

4. Open Command Prompt (Start -> Run..., type cmd and press Enter)

5. Go to the folder where your files are located, in this case C:\secret by using the cmd command.

6. Now type copy /b linux.jpg + foobar.txt.rar dummy.jpg where linux.jpg is the original picture, foobar.txt.rar is the file that will be hidden, and dummy.jpg is the file which contains both.

7. If you open dummy.jpg you will see the linux.jpg image.

8. Try opening the file with WinRar (select All files).

9. Now you can see the text file that is hidden in the picture.

Wednesday, 6 November 2013

4 Information gathering commands for linux

DIG :

      dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than dig.


     # dig google.com    

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38479
;; flags: qr rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com.            IN    A

;; ANSWER SECTION:
google.com.        62    IN    A    74.125.236.73
google.com.        62    IN    A    74.125.236.65
google.com.        62    IN    A    74.125.236.68
google.com.        62    IN    A    74.125.236.78
google.com.        62    IN    A    74.125.236.67
google.com.        62    IN    A    74.125.236.66
google.com.        62    IN    A    74.125.236.72
google.com.        62    IN    A    74.125.236.70
google.com.        62    IN    A    74.125.236.71
google.com.        62    IN    A    74.125.236.69
google.com.        62    IN    A    74.125.236.64

;; Query time: 53 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Thu Nov  7 10:40:52 2013
;; MSG SIZE  rcvd: 204

 

NSLOOKUP :

      Nslookup is a program to query Internet domain name servers. Examples of issueing a simple query: nslookup name nslookup IP_address nslookup name server nslookup IP_address server 


     # nslookup google.com    

Server:        192.168.30.50
Address:    192.168.30.50#53

Non-authoritative answer:
Name:    google.com Address: 74.125.236.70
Name:    google.com Address: 74.125.236.65
Name:    google.com Address: 74.125.236.73
Name:    google.com Address: 74.125.236.69
 

HOST :

     host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. 
When no arguments or options are given,host prints a short summary of its command line arguments and options.

     # host google.com    

google.com has address 74.125.236.35
google.com has address 74.125.236.46
google.com has address 74.125.236.38
google.com has address 74.125.236.39
google.com has address 74.125.236.33
google.com has address 74.125.236.37
google.com has address 74.125.236.32
google.com has address 74.125.236.34
google.com has address 74.125.236.41
google.com has address 74.125.236.36
google.com has address 74.125.236.40
google.com has IPv6 address 2404:6800:4007:800::1004
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.

 

PING :

    ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams (``pings'') have an IP and ICMP header, followed by a struct timeval and then an arbitrary number of ``pad'' bytes used to fill out the packet.

     # ping -c 5 google.com    

PING google.com (74.125.236.67) 56(84) bytes of data.
64 bytes from maa03s05-in-f3.1e100.net (74.125.236.67): icmp_seq=1 ttl=54 time=29.4 ms
64 bytes from maa03s05-in-f3.1e100.net (74.125.236.67): icmp_seq=2 ttl=54 time=28.7 ms
64 bytes from maa03s05-in-f3.1e100.net (74.125.236.67): icmp_seq=3 ttl=54 time=29.3 ms
64 bytes from maa03s05-in-f3.1e100.net (74.125.236.67): icmp_seq=4 ttl=54 time=29.2 ms
64 bytes from maa03s05-in-f3.1e100.net (74.125.236.67): icmp_seq=5 ttl=54 time=28.8 ms

--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4030ms
rtt min/avg/max/mdev = 28.757/29.136/29.442/0.348 ms

Start or stop Network manager in CentOS

Start or stop Network Manager in Cent OS :

Login with root access

To Stop Network Manager Service

     # service NetworkManager stop      

Configure chkconfig so that the Network Manager Service cannot start at Startup

     # chkconfig NetworkManager off    

Now Add default Net Manager

     # chkconfig network on    

Start default Manager

     # service network start    


or You try with nm-applet command aslo


     # login as root     

The following command will force start Network manager

     #nm-applet    

Sunday, 27 October 2013

Install or Upgrade Firefox 24 on CentOS

Install or Update Firefox 24 on CentOS :

 

   Mozilla Firefox 24 is released and this is guide, howto install or upgrade Firefox 24 on CentOS 6.4/6.3/6.2/6.1/6 using YUM. Firefox 17 ESR (Extended Support Release) is currently available on CentOS 6.4/5.9 and Red Hat (RHEL) 6.4/5.9 own repos, so with this guide you can also install Firefox 17 ESR on CentOS 5.9.

What’s new in Firefox 24 :

  • Mixed content blocking enabled to protects users from man-in-the-middle attacks and eavesdroppers on HTTPS pages
  • Implemented Close tabs to the right
  • Social: Ability to tear-off chat windows to view separately by simply dragging them out
  • Performance improvements on New Tab Page loads
  • Improved and unified Browser console for enhanced debugging experience, replacing existing Error console
  • Security fixes   

1. Backup your current Firefox old profiles:  

     tar -cvzf $HOME/mozilla-firefox-profiles-backup.tar.gz $HOME/.mozilla/firefox/

 

2. Change root user :     

     su                
 
     password ******* 
 

3. Install Remi repository :   

     rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm 

     rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 


5. Update or Install Mozilla Firefox :  

     yum --enablerepo=remi update firefox

     yum --enablerepo=remi install firefox
 
 

Happy Browsing ...... 

IP address for your daily websites

IP address for your daily websites :

wikipedia.org   -------- 208.80.152.201
bbc.co.uk          -------- 212.58.241.131
google.com       -------- 74.125.157.99
youtube.com     -------- 74.125.65.91

yahoo.com        -------- 98.137.149.56
hotmail.com      -------- 65.55.72.135
github.com        -------- 207.97.227.239
facebook.com   -------- 69.171.224.11

twitter.com       --------- 199.59.149.230
amazon.com     --------- 72.21.211.176
mediafire.com  --------- 205.196.120.13
megaupload.com ------ 174.140.154.20

fileshare.com    --------- 208.87.33.151
multiupload.com ------- 95.211.149.7
uploading.com ---------- 195.191.207.40

   Once you have the IP for a website, all you really need to do is enter it like you would a normal URL and hit enter/press go. Typing in “208.85.240.231” should bring you to the front page of AO3. Since we’re obviously bracing for the worst case scenario which would involve you not being able to access the internet regularly.

Happy browsing ...

Powerful VIM commands

About Vim text editor :

    Vim is initially as standard GUI text editors like Gedit or word processors like OpenOffice.org's Writer, over a longer term you can become more productive using Vim. If you're a touch-typist, you'll find that your speed will improve even more with Vim because your hands rarely need to leave the ^home^ keys, and you'll only need to use the mouse if you choose to do so.

If you're a programmer or working with structured markup languages like HTML, LaTeX, etc., Vim is the bee's knees. It offers a number of features that make working with programming and markup languages much easier.




Some of the useful VIM commands :  

:e filename ---------------------------- OPen finename for edition
:w               ---------------------------- Save file
:q                ---------------------------- Exit Vim
:w!              ---------------------------- Write fine and quit
/word         ----------------------------- Search word from top to bottom

?word        ----------------------------- Search word from bottom to top
Ctrl+a        ---------------------------- Increment number under the cursor
Ctrl+x        ---------------------------- Decrement number under cursor
Vu              ----------------------------- Lowercase line
VU             ------------------------------ Uppercase line

:e .             ------------------------------ Open integrated file explorer
:Sex           ------------------------------ Split window and open integrated file explorer
:browse e  ------------------------------ Graphical file explorer
:ls              ------------------------------- List buffers
:cd ..          ------------------------------- Move to parent directory

:set autoindent -------------------------Turn on auto-indent
:args          ------------------------------- List files
:tabnew     ------------------------------- Creates a new tab

>>             ------------------------------- Indent
<<             ------------------------------- Un-indent




Happy coding..

Friday, 25 October 2013

Anonymous OS version 0.1 released and detailed

Anonymous OS version 0.1 released and detailed :

     its been quietly announced that members of the hacker group known as Anonymous are releasing their very own desktop operating system. This system is known at the moment as Anonymous-OS and is currently in as infant a stage as it possibly could be at version 0.1. That’s pre-pre-Alpha, for those of you counting, and we’re not even going to tell you to download it or do a search for it – keep your eyes off of it! 



What this operating system represents is a full toolkit for those of you looking to join the dangerous and illicit world of hacking. Inside the operating system you can actually download today is a relatively vast list of applications that will allow you to crack, spoof, and rip your way into the mainframe just like your heroes from the 1990′s movie Hackers, just like you’ve always wanted to! Have a peek at the list here, and forever hold your keyboards in glee:
Pre-installed apps on Anonymous-OS:
- ParolaPass Password Generator
- Find Host IP
- Anonymous HOIC
- Ddosim
- Pyloris
- Slowloris
- TorsHammer
- Sqlmap
- Havij
- Sql Poison
- Admin Finder
- John the Ripper
- Hash Identifier
- Tor
- XChat IRC
- Pidgin
- Vidalia
- Polipo
- JonDo
- i2p
- Wireshark
- Zenmap
…and more
This OS runs under Ubunti 11.10 and uses Mate desktop – also you’ve got the ability to create the LiveUSB with Unetbootin – also just like you should expect. If you want to move forward with this OS for your soon-to-be-destroyed computer, head over to The Hacker News and have a look-see. Don’t say we didnt warn you though, especially since that source also notes the following: “Warning : It is not developed by any Genuine Source, can be backdoored OS by any Law enforcement Company or Hacker. You at your own Risk.” Strong words.




thanks to  The Hacker News

Installing RecordMyDesktop on CentOS

 Installing RecordMyDesktop on CentOS

   recordMyDesktop is a desktop session recorder for Linux
that attemps to be easy to use, yet also effective at it’s primary task.
As such, the program is separated in two parts; a simple command line tool that performs the basic tasks of capturing and encoding and an interface that exposes the program functionality in a usable way.

Link for Downloading the source code:

http://sourceforge.net/projects/recordmydesktop/files/recordmydesktop/

Steps to install :

step 1 : install the dependencies

yum install gcc make libXext-devel libSM-devel libICE-devel zlib-devel            libXfixes-devel libXdamage-devel libvorbis-devel libtheora-devel                           

 Step 2:


wget http://downloads.sourceforge.net/project/recordmydesktop/recordmydesktop/0.3.8.1/recordmydesktop-0.3.8.1.tar.gz


 Step 3:


         tar xf recordmydesktop-0.3.8.1.tar.gz


        
          cd recordmydesktop-0.3.8.1


         ./configure


          make


          make install


 thats it.. You have done it..


start it by giving the command

         recordmydesktop


for more options how to use and help. type,

         recordmydesktop –help