Friday, 24 June 2016

Magic Sys Rq Key

The Issue


So the other day I was working with Android Studio on my Low Hardware Spec Ubuntu Machine. I decided to build an apk as emulators are simply not an option. But Guess what , my pc used all of the possible RAM and all the possible swap memory and hung(that's pretty rare for Ubuntu!).

I tried opening a terminal Ctrl+Alt+T hoping to kill android studio process. But the PC was unresponsive. This is despite using all the regular optimizations for android Studio that I found on Ubuntu Forums and Stack Overflow.

Any noob would have now headed out towards the power button. If you ever do come across this situation please do not use this approach. This is the last thing you should do, only if everything else fails.

Tuesday, 21 June 2016

Python Based Chat Program

This is a simple client-server Program to chat with other users on the Lan. This program largely similar to a chat using nc, easier to use and with a lot of less functionality.

Tested On:
OS: Fedora 20, Ubuntu 14.04 LTS
Language: Python

 Note

While this script works perfectly fine on loop back ie on the same machine, it may fail on a network since you might need to configure the server to accept incoming connections. You might want to check iptables or disable it completely. 

Video

Monday, 20 June 2016

Email Header Analyser Using Python

Q:Write a program in Python to analyze email header.

This program simply analyzes a email header stored locally on your machine in a text file and shows information like:
  1. Mime Version
  2. Date
  3. Subject
  4. From
  5. Delivered To
  6. To
This is nothing but a simple file handling and string matching problem. And to make it look insanely simpler, I decided to write the code with the minimum number of lines, and guess what I did manage it in just 15 lines. I did have to remove the exit messages though.

Sunday, 12 June 2016

Tasker: Automate Things on Android Phone

Do you wish to make your phone smarter ?
Do you wish to automate your daily tasks on your phone ?


If yes, here is your Answer : Tasker App (Playstore Link)

Tuesday, 31 May 2016

Vison 20-20-20 : A bash Script

 20-20-20 Rule


Anyone who spends more than 3 hours before a computer screen in at the risk of suffering from computer vision syndrome.  Currently an estimated 70 million computer professionals are at the risk of suffering from computer vision syndrome
A programmer spends hours before the computer. To avoid damage to eyes and prevent computer vision syndrome , the 20-20-20 rule is suggested by doctors.
The 20-20-20 rule is as follows:

Look at an object 20 feet away for 20 seconds every 20 minutes.

The Issue

It easier said then done. You simply don't remember when 20 minutes have passed. Thus I have taken efforts to help you with the 20-20-20 minute rule. I have created a bash script vision20 to help with this.

 

Monday, 9 May 2016

Unable to Test Buffer Overflow Attacks with GCC?

Buffer-Overflow
Stack Smashing
Recently I was trying to attempt a buffer overflow attack when I came across Stack Smashing Detected. In case you don't know what this is, don't bother reading further.

Looks like GCC has new cool feature which protects codes from buffer overflow attacks. So to some extent even if a programmer doesn't check for a buffer overflow error GCC still might check it and protect the code.


Wednesday, 20 April 2016

Display Real Time Clock TSR in Dos


TSR:

Terminate but Stay Resident Program is a type of assembly program which stays resident / or occupies memory on ram so that it can be executed upon interrupt.
TSR is actually one of the best ways to ways to write viruses. The best part is that until the computer is restarted the virus can stay in the memory.

It consists of three sections:-
which you are supposed to find out.

Problem Statement in Layman Terms
You have to display the time on screen using a TSR.

Tuesday, 5 April 2016

32 bit ALP To find length of entered string

Q: Write an ALP to find the length of a string entered by the user.

Assembler: NASM
Debugger: GDB
OS: Ubuntu 14.04 LTS

Code

;Author:-Abhishek Vilas Munagekar

32 bit ALP:Reading 32 bit numbers and printing them back

Q: Write an x86 ALP to read 10 32 bit numbers. Store these in an array. And print them back using various system calls.

64 bit ALP to print Hello Word

Q: Write a 64 bit ALP to print Hello word.

Assembler : NASM
Debugger : GDB
OS            : Ubuntu 14.04 LTS