What is Google Hacking ?

Google Hacking

This article is going to be all about Google Hacking. We live in a world where everything and anything that you might need is available on the internet at your disposal. Most people do not know how powerful a search engine Google is. We can do a lot of useful things with the help Google we just have to use it the right way.

Google Hacking is all about taking Google search to the next level. So if some of you are wondering why do I keep saying Google, there are like some other really good search engines out there, well it’s because of the following reasons.

  1. It is one of the most powerful search engine
  2. It is updated frequently.
  3. It has a very innovative page ranking algorithm which takes into consideration a lot of things.

Google Hacking basically means to use Google to get the best of the best search results. It is achieved by using some special operators known as ‘Google Operators.

Google Hacking

 

Continue reading “What is Google Hacking ?”

Data Entry Form using Simple HTML Helper In MVC

HTML Helper in MVC

In this article we will learn how to code for entering data form using simple HTML Helpers.

  • Create New ASP.NET MVC4 Web Application.
  • Select Razor As View Engine.
  • Right click on Model ->Add new Class ->Customer Class.HELPersModel
  • Right click on controller and -> Add new item-> CustomerController

ControllerHelper

Continue reading “Data Entry Form using Simple HTML Helper In MVC”

Render Pdf bytes array within browser in MVC

Render Pdf within browser

There are different ways to render Pdf in a browser. In this I’m explaining to render Pdf by fileContent/byte array. In a below example I’m using Index Action which returns the FileContentResult.

public ActionResult Index()
{
Response.Clear();
Response.AddHeader(“Content-Disposition”,“inline; filename=sample.pdf”);
Response.AddHeader(“Content-Type”,“application/pdf”);
Response.ClearHeaders();
Response.AddHeader(“Content-Length”, byteArray.Length.ToString());
FileContentResult result = new FileContentResult(byteArray, “application/pdf”);
return result;
}

That’s it from controller side. Now you have to call you Action to get it rendered on your HTML. You can use different HTML5 tags like :

<iframe>
<iframe src = @Url.Action(“Index”, “Home”)#zoom=150′ width = “100%” height=”525″ id=”iFramePdf” #zoom=”200″ frameBorder=”1″></iframe>

<embed>
<embed src=’@Url.Action(“Index”, “Home”)#zoom=150′ width = “100%” height=”525″ id=”iFramePdf” #zoom=”200″ frameBorder=”1″ type=”application/pdf”/>

<object>
<object data=’@Url.Action(“Index”, “Home”)#zoom=150′ width = “100%” height=”525″ id=”iFramePdf” #zoom=”200″ frameBorder=”1″ type=”application/pdf”>
</object>

Hope this article will help you.

Implement Jquery Auto Complete

Jquery Auto Complete

In this article we will show you how to use auto complete of jQuery. Auto complete widget provides suggestions while you type into the field. Here we are going to show you an example that how to implement auto complete and how we can customize it as per our requirement.

In the below example, we have 3 different objects in an array:
 
var data = [{
label: "Code",
value: "http://www.codehotfix.com"
},
{
label: "Hotfix",
value: "http://www.codehotfix.com"
},
{
label: "Code Hotfix",
value: "http://www.codehotfix.com"}
];
$(function () {
$("#idOfSearchTextBox").autocomplete({
source: function (request, response) {
var matcher = new RegExp("^" + $.ui.autocomplete.escapeRegex(request.term), "i");
response($.grep(data, function (item) {
return matcher.test(item.label);
}));
},
select: function (event, ui) {
$("#idOfSearchTextBox").val(ui.item.label);
window.location.href = ui.item.value;
}
});
});

hotfix

Continue reading “Implement Jquery Auto Complete”

MVC Simple Model In ASP.NET

In our previous article we have learnt basics of MVC , now in this article we will learn how to make simple model In MVC.

  • Create New ASP.NET MVC 4 Web Application .
  • Select Internet Website as template.
  • Select ASP.NET as  View Engine
  • Right Click on the model -> Add New Item ->Class -> Movies.cs
MovieModel

Continue reading “MVC Simple Model In ASP.NET”

Crack Windows passwords using Ophcrack

Ophcrack

Ophcrack is a special kind of Linux distro that focuses primarily on password cracking, Ophcrack is basically a free open source program that requires a Linux based environment to run. Ophcrack can be used to crack passwords for Windows XP, Vista and Windows 7.

How does Ophcrack Work?

To understand how ophcrack cracks password we must first learn about how Windows stores password.

Any computer system that requires password authentication must contain a database of passwords, either hashed or in plaintext.

Windows uses a thing called MD5 Hashes, so what it basically does is when you type a password and create it, it creates a cryptographic hash.

Now hashes don’t work both ways, what that means is you can create a hash from a password, but you can take a hash and change it back to text because you can’t easily decrypt them.

Ophcrack_screenshot

Continue reading “Crack Windows passwords using Ophcrack”

How to create tunnel to localhost using Ngrok

Ngrok – Secure Tunnel to localhost

Want to host your localhost server to the Internet ? Yes Ngrok is what you are looking for. With Ngrok you can create a secure tunnel to your localhost website.  Ngrok is the lightweight tool which creates a secure tunnel on your local machine along with a public URL so that it can be accessible over web. Ngrok will give you following features :

  • Demo without deploying
  • Simplify mobile device testing
  • Build webhook integrations with ease
  • lightweight alternative to VPN
  • Run personal cloud services from your own private networkNgrok a secure tunnel to localhost

Continue reading “How to create tunnel to localhost using Ngrok”

Avoid multiple call to AuthorizeCore in MVC

AuthorizeCore in MVC

In MVC AuthorizeAttribute Class is another cool feature that makes it easy to add authentication at the Controller level. In AuthorizeAttribute class we have AuthorizeCore function, it specifies that access to a controller or action method is restricted to users who meet the authorization requirement. We can override AuthorizeCore  function as per our authorization logic.

When you place the [Authorize] attribute on a Controller’s action method, a couple of calls get made to the AuthorizeAttribute class at the beginning of each request to your controller to authenticate users. Lately when I was working on a web application I found this multiple calls as an extra overload that even though the user is authorized, AuthorizeCore got executed.

So to avoid this multiple calls, I found one of the property in HttpContext which is  SkipAuthorizationSkipAuthorization is a boolean property, you can set this as true once the user is authorized. The below code snippet will give you the brief idea.

protected override bool AuthorizeCore(HttpContextBase httpContext)
{
if (httpContext.SkipAuthorization) return true; // hack to avoid multiple call to the method
if (!authorized) //if user is not authorize
{
   return false;
}
if (authorized) //if user is authorize
{
   httpContext.SkipAuthorization = true;
   return true;
}
   return false;
}

Git Tutorials for Beginner

Before we start with this article I will suggest you to first have a quick look to these articles.

  1. Understanding GIT and GitHub
  2. Basic commands that are used in GIT

Okay.. Want to start working with Git ? Confused ! where to start..  Alright I have a few suggestions for you that will answer you where to start working and get your hands-on on Git commands.

Git Tutorials Playlist

This Git Tutorials Playlist cover all basic concepts and understanding about Git, Git bash, and all basic git operations.

Git Tutorials for Beginner

Git – Self-paced Learning

This will familiarize you with Git commands with giving you the good Visual  guide. I simply call it as learn with fun. 😉

Git eBooks

These are the free eBooks for git which helps you know more about Git.

Hope you found this useful.. Happy Coding.. !!

How to read JSON data from External File

In this article we will understand how we can read JSON data from a external file.JSON is short for JavaScript Object Notation, and is a way to store information in an organized, easy-to-access manner .One of the easiest ways to load JSON data into our web applications is to use jQuery.getJSON().For this we have to understand the term “jQuery.getJSON()” .

So what is significance of jquery.getJSON?????….

jQuery.getJSON()

It loads JSON data from the  server using GET HTTP request .

Picture1

Continue reading “How to read JSON data from External File”