What is the difference between JWT and OAuth Authentication?

Comparing JWT and OAuth is like we are comparing apple and apple cart. JWT is an authentication protocol whereas OAuth is an authentication framework. It is possible to have an OAuth implementation that issues JWT as an authentication mechanism. Before getting into more details let’s first understand individually, what is JWT and OAuth.

 

What is OAuth?

OAuth is an open standard for access delegation, commonly used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords. This means it is a strict protocol for the issuing and validating of signed access tokens by providing limited access to a web service. Just remember OAuth only works using HTTPS.

How OAuth works

Let’s assume a user has already signed into one website or service. The user then initiates a feature that needs to access another site or service. The following happens

  1. The first website connects to the second website on behalf of the user, using OAuth, providing the user’s verified identity like client id, secret key etc.
  2. The second site generates a one-time token and a one-time secret unique to the transaction and parties involved.
  3. The first site gives this token and secret to the initiating user’s client software.
  4. The client’s software presents the request token and secret to their authorization provider (which may or may not be the second site).
  5. If not already authenticated to the authorization provider, the client may be asked to authenticate. After authentication, the client is asked to approve the authorization transaction to the second website.
  6. The user approves a particular transaction type at the first website.
  7. The user is given an approved access token.
  8. The user gives the approved access token to the first website.
  9. The first website gives the access token to the second website as proof of authentication on behalf of the user.
  10. The second website lets the first website access their site on behalf of the user.

Continue reading “What is the difference between JWT and OAuth Authentication?”

What is Machine Learning?

Machine Learning

Hello everyone, this article will be a part of a series of articles on Machine Learning. In this
series, we will take you from the basics of Machine Learning and teach you a few of the famous
algorithms used in Machine Learning. This article will be a soft introduction for those of you
who are not at all familiar with this particular field. So let’s dive in.

What is Machine Learning?

There isn’t a well-accepted definition for Machine Learning but one definition for the term
given by Arthur Samuel in 1959 is “Field of study that gives computers to learn without
explicitly being programmed”. An example of such a task would be automatic spam detection.
Another well-known definition of Machine Learning is “A computer program is said to learn
from experience ‘E’ with respect to some task ‘T’ and some performance measure ‘P’, if its
performance on ‘T’, as measured by ‘P’, improves with experience ‘E’.”

Continue reading “What is Machine Learning?”

Automating tasks with Cron jobs

Hello, everyone we are back again and this time with a handy tutorial on how to schedule tasks with Cron jobs

What are Cron jobs?

Cron is utility software used for automating tasks on a server system.  “Cron” stands for chronological, jobs which are supposed to run at a particular time. So using a Cron job you could specify to run a script or a command at a specific time on a specific day, week and month.

Syntax to specify a Cron job:

To specify a Cron job, you have to specify the exact time at which you want the command to run. Here is the syntax you need to use to specify a job.

  1. The number of minutes after the hour (0 – 59)
  2. The hour in military time (0 – 23)
  3. The day of the month (1 – 31)
  4. The month (1 – 12)
  5. The day of the week (0 – 7)

Cron

The Asterisk (*) Symbol:

As can be seen in the image above each asterisk symbol is a field and has a meaning, like the first “asterisk” is for the time in minutes. If you don’t want to specify a value for a field you can leave the Asterisk symbol there (*).

Example: If you want to specify a job that needs to run every month, then leave * in the fourth position that is the month field.

Here are a few examples with description to specify a job:

  1. 00  16  *  *  5  date

        The “date” command will run at 4:00 PM in the afternoon every “Friday” of every “Month”

     2. 30  16  *  12  5  date

        The “date” command will run at 4:30 PM in the afternoon every “Friday” in December

     3. 00  16  10  12  *  date

        The “date” command will run at 4:00 PM in the afternoon on the 10th of December.

     4. 00  16  10  12  5  date

         The “date” command will run at 4:00 PM in the afternoon if the 10th day was a Friday in       December.

With that cleared out, we can move on to the next segment of the article.

Continue reading “Automating tasks with Cron jobs”

Linux – Change the password of any Ubuntu user account including root

Have you forgotten your administrator password or the password of any user account on your Linux installation?  Well, worry not, because we are going to show you how to change it without needing a live installation of Linux.

Things you will need:

  • Know your way around a Linux terminal.

You can change the password of any user account in these easy steps:

  1. Enter recovery mode: To enter recovery mode press and hold down the shift key as the computer starts to boot.
    This is what recovery mode looks like:Linux
  2. Select the one that says (recovery mode) from the list. 
  3. Now you will see a recovery menu on your screen, Scroll down that list and select the option that says “root”. 
  4. Now the filesystem is in read only state, you have to remount it to get write permissions, to do that type: mount –o rw, remount / 
  5. Now you can set any user’s password using this simple command: passwd USERNAME (replace USERNAME with the name of the account whose password you want to change) 
  6. After entering this command you will be asked to type and retype the password, once you have done that, your password will be changed.

That is all you need to do to change the password of any user account on your Linux installation.

Stay tuned for our next article…

Basic Git Hub Usage Manual

Git Hub Usage Manual

GitHub Account Creation And Setup Configuration:

  1. Need to create an account on https://github.com with official email id. And also activate two factor authentication and set profile picture over there. Once done with these inform Jaco about it, so he can add you in the CeX organization account.
  2. Now create the Personal Access Token from the Settings, it will be useful when we want to push the changes to the remote through Git Bash.
  3. Download GitHub Desktop from https://desktop.github.com/ and Git from http://git-scm.com/download/ and install these two applications.
  4. When you start GitHub desktop, you have to login over there. To login on GitHub Desktop goto Tools And Options and then in Options you will find the add account option.
  5. For Git open Git Bash and run $ git config –global user.email “<EmailID>” command, this will configure your account in Git.

Git vs GitHub

Continue reading “Basic Git Hub Usage Manual”

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 ?”

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”

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.. !!

DLL Hell Problem and Solution

DLL Hell Problem

DLL Hell is a problem in which two different Application share a common assembly and If one Application changes the common assembly, the changes which are not backward compatible will cause another Application to crash. Let us understand this with an example.

Let say you have two Applications, we can call it as Application1 and Application2  and both Applications shares a common Assembly we can call it as Shared. Both Application consumes GetOperation().

Dll hell problem

Continue reading “DLL Hell Problem and Solution”