Pages

Wednesday, 24 December 2014

Building Custom Snippets in Sublime Text 3!!

Friends, In this post i am gonna show to build and use your own Snippets in sublime text 3!!
First you must have Sublime text 3 installed in your system!! You can download sublime text 3 from here ... LINK

Snippets basically makes your programming life easy in sublime text 3!!
here is your sublime text 3 ...


So for building a Snippet you have to go to Tools option in sublime text 3 ... and select the New Snippet Option!!



a default file opens with bunch of lines of code as shown in the picture below




So lets understand the code written in the default files ...

1.) There is a CONTENT tag in which we have to write contents or code which we wanna use many and many times in our programming languages .. like JAVA, PHP and all other languages!!
2.)${1:this} means when we supply our small snippets and hit tab 1st time then it will stop at "this"same as ${2:snippet} for 2nd time of tabtriggering 
3.)So now i'm gonna make build a Snippet for JAVA Programming language.. as shown in the picture below!!


save the file as p.sublime-snippet as your snippet name as shown in the picture below ...

now whenever during coding you press p and hit enter the following code will appear on the screen and with

With the item selected which we supplied in the ${1:/*ClassSwap*/} and when you will hit tab
it will select the next item which you supplied in ${2:/*CodeSwap*/} as shown in the picture below


and this will surely save a lot of your time during coding :) This was just a example!! You can build as big as big snippet for your requirement ... Thanks for giving your valueable time on reading this post .. Happy Coding :) 

Saturday, 6 December 2014

phpsh by Facebook Developers on Backtrack5 R3

Hey guys today i'm gonna show you how to install and use phpsh on BackTrack 5 R3!!

First of all what actually is phpsh ?

phpsh is an interactive shell for php that features readline history, tab completion, quick access to documentation. It was developed at Facebook and ironically, is written mostly in python. It is open source and released under a modified BSD license.

The source code of phpsh is available at GITHUB

You can download the zip file of the source from here

The main problem is that its not available for windows platform so you can virtually run operating systems like BT5R3 or kali linux or ubuntu .. totally depends on your flavor!!

So basically you have to first download the zip file of the source code and then place it on desktop like this ..

Then you have to extract it using the following command in terminal!!


After unzipping it you have to install it so that you can use it!!
use the following commands to do this!!
run the above given commands one by one in the terminal of bt5r3 in the unzipped directory of the phpsh-master and then you will get it installed on the linux!!

somescreen shots of phpsh in bt5r3 terminal!!
Also for ease of access after starting the terminal in Vmware you can enable the unity mode in VMware so that so will get some thing like in the pic posted below .. && its awesome

Thats it!! Thanks for giving your valueable time on reading this post!! :)

Wednesday, 3 December 2014

Install Vmware Player in Kali Linux(Host)!!

hey guys, in my views pentesting is lot easy if we can use kali as main or host operating system and other victim operating system as guest via Vmware player.. So I am writing this blog on how to install Vmware player kali linux ..

1.) Go to this LINK and download VMware player 64 bit for linux .

2.) Your vmware player something look like this --> VMware-Player-6.0.3-1895310.x86_64.bundle

3.) Now first of all you have to change the permission of this downloaded file
so use the following command as shown in the pic below
  
4.) Now use the following command as shown in the picture below to install linux headers

5.) last command to install the Vmware Player 


and after this magic happens :p and the graphical user interface of vmware pop-ups and after that vmware can be easily installed ...

finally you will get vmware looking something like this ...

Thanks for giving your valueable time on reading this post .. happy hackin :p 


Thursday, 20 November 2014

WAMP server!! MSVCR110.dll Error!! WINDOWS 8.1!! Solved :)

In this post i will explain you why MSVCR110.DLL error occurs in windows while installing wamp server

Mistake that n00bs make while downloading wamp server 

while we click to download wamp server in their official website a pop-up appears!! basically this pop-up has two downloading links 



1.) Link to download wamp server
2.) Link to microsoft official website from where we have to download microsoft redistributable file !! n00bs forget to complete this step and thats why they face a simple problem i.e. MSVCR110.dll

I have made a video for this tutorial and uploaded it on YouTube....



 Thank you!! 

Create Aliases in Windows!!

Hey!! guys i like to share this pretty cool knowledge with you that we can also create aliases in windows as we create in linux .... in windows we call it DOS key!!

DOSKEY  (Wikipedia crap :p)

               
DOSKEY is a utility for DOS and Microsoft Windows that adds command history, macro functionality, and improved editing features to the command line interpreters COMMAND.COM and CMD.EXE. It was included as a TSR program with MS-DOS and PC DOS versions 5 and later, Windows 9x and Windows XP or later.
In early 1989 functionality similar to DOSKEY was introduced with DR-DOS 3.40 with its HISTORY CONFIG.SYS directive. This enabled a user-configurable console input history buffer and recall as well as pattern search functionality on console driver level, that is, fully integrated into the operating system and transparent to running applications. In summer 1991 DOSKEY was introduced in MS-DOS/PC DOS 5.0 in order to provide some of the same functionality. DOSKEY also added a macro expansion facility, which, however, required special support to be implemented in applications like command line processors before they can take advantage of it. Starting with Novell DOS 7 in 1993 the macro capabilities were provided by an external DOSKEY command as well. In order to also emulate DOSKEY's history buffer functionality under DR-DOS, the DR-DOS DOSKEY works as a frontend to the resident history buffer functionality, which remained part of the kernel in DR-DOS.
In current Windows NT-based operating systems DOSKEY's functionality is built into CMD.EXE, although the DOSKEY command is still used to change its operation.

Practical Work 

In this pic i wanna make a short and simple alias for sublime text as you can see i made it using the following command

doskey s1 = sublime_text.exe $* 

and thats it ... remember i have sublime_text.exe file in my environment path variable 
so now instead of typing the whole bullshit(i.e sublime_text) i just have to enter the alias that i have setted in the particular command prompt

Problem 

The main problem is that if the close the session or can say when you close the cmd you doskey setup is lost :( :(  and it will not work in other command prompt

Dont be sad i have a solution for it

Solution 

 1.) Create a new folder in the c:\windows directory called bin.
 2.) Run notepad as Administrator.
 3.) Enter the following command in it

 @echo off
@doskey sl = sublime_text $*

4.) Now save the file as doskey.bat in the c:\windows\bin folder that we actually created
5.) press control + r and run box will open
6.) type regedit in the run box and hit enter
7.) search for HKEY_CURRENT_USER\Software\Microsoft\Command Processor
8.) Add a new String Value called AutoRun and set the absolute path in the value of c:\windows\bin\doskey.bat.



The doskey.bat file will now be executed before opening a new cmd session which will set all of your alias ready for you to use.

Now i have alias for windows same that i used in linux environment

Thanks for giving your valueable time in reading this post
Thank you !!

Thursday, 24 July 2014

Compile C, C++ Directly from command prompt

Today i'm gonna compile C and C++ codes directly through command prompt of windows operating system !! lets start :) 

First of all download  CODEBLOCKS IDE from here -- www.codeblocks.org  
Basically codeblocks is an Integrated Development Environment aka IDE
just install it on your system !!
then press the windows button and search for "Environment variable" and go for the second option that says "Edit the system environment variable" hit on that option !!
following window will pop-up on your screen --

now next thing you have to do is click on the environment variable :)
following window will pop-up --

Now under the system variable section scroll for variable "PATH" like this --
now double click on the path following edit system variable window will pop-up --
Click at the end of address bar in Variable value. now put there a semicolon (;)
here u have to add a address follow this following steps to paste the address

1.) Open your C drive where the files of your operating system are placed.
2.) Go into your program files look for "codeblocks" folder which we have earlier installed.
3.) Go into the codeblocks folder and then search for "MinGW" folder go into it.
4.) Go into the "BIN" folder thats it
5.)  See at the top at address bar and right click on the address bar and copy the address like this ..

Again come to the Edit variable system and paste the address after semicolon like this --
click ok and save the settings :)

Now open your text editor .. like Notepad(It Sucks, Please dont use it) , Notepad++(Awesome) or Sublime text(Awesome, recommended)

Type your C++ code Like this
Save it wherever u want(in this explanation i will save it on the desktop) and then open the command prompt
And then navigate to the directory with "cd" and "dir"
like this

now we have found our C++ code then we have to compile it to produce a executable file
for compilation of a C++ code use the following Commands
"g++ -o helloworld helloworld.cpp"
In case of C programming Use "gcc -o helloworld helloworld.c"
lets see what happens ..

 


You Can see in command prompt that a helloworld.exe file is created just type the name of the executable file i.e helloworld in command prompt and the file will be executed :) and your C++ or C source code is compiled as well as executed like this

Thanks for giving your valuable time on reading this post :)  Happy Programming!!

Sunday, 22 June 2014

Recover Missing Unallocated Space On USB Drive Using Windows DiskPart !!

Many of you guys faced a problem with a bootable usb .. first you made a bootable usb of linux to dual boot your pc !! but when you tried to format your pendrive a space of about 4 gb(depending on the size of your linux .iso file ) gets invisible .. Now i will show you how to recover that missing unallocated space on usb drive ..

Follow this simple steps : --

1.) Open Command Prompt.
2.) Type diskpart
3.) Now type list disk

you will see the following picture


4.) Now type a simple command :- select disk 2 
     As here Disk 2 is my pendrive it can be seen by the size 
5.) Now type command :-  clean
6.) Then finally type the command:- Create Partition Primary

you will see the following picture


7.) Now search for disk managment and a window will appear like this ..


8.)If your disk is unallocated make it allocated and format it ..  

Your Problem is solved !! Thanks for reading