Showing posts with label Programs. Show all posts
Showing posts with label Programs. Show all posts

Sep 13, 2010

Mobile phone images lets strangers know exactly where you are.

The geotagging data contained in many mobile phone images lets strangers know exactly where you are.
What Your Digital Photos Reveal About You

The moment is special: Your kid just learned how to ride a bike without training wheels. So you fire up your iPhone's camera, snap a photograph, upload the image to TwitPic, and share the evidence of your child's triumph via Twitter.

When you post the picture, a subset of the 75 million Twitter users will know the exact location of you and your child. Digital photos automatically store a wealth of information--known as EXIF data--produced by the camera. Most of the data is harmless, but as Mayhemic Labs' Ben Jackson noted at the Next HOPE security conference in New York last July, about 3 percent of all photos posted on Twitter contain location data, and that figure is growing. Anyone on the Web who can read the data knows where the photographer was standing. And arguably this is a gross invasion of personal privacy.

EXIF Data and Geotagging
Created by the Japan Electronic Industries Development Association (JEIDA), the Exchangeable Image File format (EXIF) specification adds metadata to common JPG and TIFF image files. Along with a thumbnail image of the photo, EXIF data stores details about aperture, shutter speed, focal length, metering mode, and ISO settings, some of which can help a printer do a better job of color-matching the final printed image. There's also room for other information, such as the camera's make, model, and registration number, and in some cases, location data.

Geotagging is the process of storing latitude and longitude data inside an image's EXIF data. This information mates the image with a photographer's specific geographic location, which mapping services such as Google Earth can then chart.

For older digital cameras, adding location data to an image requires complicated peripherals: You must attach a cable to the camera to communicate with a GPS receiver, such as a stand-alone navigation device or a mobile phone. But many newer digital cameras and mobile phone cameras have built-in GPS receivers. The geotagging features in these newer devices are integrated and seamless, and your EXIF files may store latitude, longitude, time (in the form of Coordinated Universal Time or UTC readings), and and even altitude data (which can be helpful for reconstructing a family vacation on a map). With the explosion of smartphones today, Jackson is seeing an increasing number of geotagged images posted to the Web.

ICanStalkU.com
To highlight geotagging-related privacy issues, Jackson and Larry Pesce, a colleague, adopted the Twitter username ICanStalkU to respond to tweeters who posted geotagged images. Twitter shut down the account but let Jackson back in after he argued for the need to educate users. He has also started a Web site called ICanStalkU.com to get his message out.

ICanStalkU uses a Perl script to scrape some 20,000 images each day off of MobyPicture, SexyPeek, Twitter, and Yfrog. The site then reposts the pictures with messages like "I am currently nearby..." and supplies the street address, latitude and longitude data, city, and state (if these are known). Each ICanStalkU entry also shows the location mapped on Google, the original tweet, and the original photo.

Another site, PleaseRobMe.com (now shut down), used data from Foursquare and Twitter to emphasize the abundance of personal data being posted online. The researchers behind the project--Frank Groeneveld, Barry Borsboom, and Boy van Amstel--say that they're reviewing feedback they've already received be­­fore continuing with the project.

In his New HOPE security conference presentation, Jackson detailed how he found personal details about a man in a photo. Using accompanying geotagging data, Jackson located the man's house on Google Earth. Then he found a name associated with the house where the photo was taken, leading him to a Facebook account that yielded a birth date, marriage status, and friends. A second username listed on the Facebook page led to a second Twitter account, and so forth. The point here is that once you start pulling on the thread of information contained in a geotagged image, a single photo can reveal a whole trove of personal data--far more than you might think.

Some people say they don't mind sharing their real-time location data with total strangers. But others dislike the idea that strangers can know where they are at any given time. Fortunately, smartphones and cameras let you turn off the photo geotagging feature.

Phone-Specific Remedies
On an iPhone, you can block geotagging by disabling all geolocation apps, such as Foursquare. To do so, go to Settings, General, and toggle the Location Services settings to Off. In iOS 4, you can disable location services for specific apps (off for the Camera app, but on for Yelp, for instance). If you don't use iOS 4, instead of turning off Location Services for the entire phone, you can reset the Location Warnings. Go to Settings, tap Reset, and select Reset Location Warnings. Start the camera, and answer No to the ‘Ask on first use...' question. You can then allow or disallow individual apps the next time you open them.

On Android phones, turning off GPS will break all location-based apps on the phone. Instead, start the Camera application, and under Location and Security in the menu on the left side, disable GPS. To check your work, open the Camera app and pull out the left side menu. ‘Store Location' should be disabled.

For the RIM Blackberry, disabling the feature within the camera is easy. Press the Menu key, select Disable GPS, and select Yes to confirm the change

Feb 1, 2009

Lock and Ulock Folder or files in windows XP

Lock and Ulock Folder or files in windows XP


u can try some soft like folder lock, folder guard
or
u can try this
==================



By holding down alt, then typing numbers on the number pad (right of the keyboard) you can create special characters. If you hold down alt, then press 1, then let go, you got the ascii character 1. You try some randomn numbers. This goes all the way up to 255. Open a dos prompt, and type md (alt+1+9+4)someword. md is the dos command to make a directoy, now try and open the directory in Windows, you can't. To open it, type ren (alt+1+9+4)someword someword (ren is the dos command to rename)



lock ur personal files
========================
to secure ur folders u dont need any s/w in windows Xp and win 2000.Just follow the trick.

1) create a folder in any drive (here D:/)

abc --> (ur files)

2)here in "D:/" create two batch files "lock.bat", "unlock.bat". write the following code in it.

In lock.bat
ren abc abc.{0000031D-0000-0000-C000-000000000046}

In unlock.bat
ren abc.{0000031D-0000-0000-C000-000000000046} abc


4) place ur personal files inside it. And now press lock.bat in D:, now try opening it. Bingo i think u got it. To unlock click unlock.bat.

** u can change abc to ur folder name.
u can other keys to rename like,

{48F45200-91E6-11CE-8A4F-0080C81A28D4},
{0B6DC6EE-C4FD-11d1-819A-00C04FB69B4D}

[this method was posted in some other forum]

OpenGL programs

1. Extract the zip file glut-3.7.6-bin.zip to obtain the following files

glut32.lib

glut.h

glut32.dll

2. Copy the above files to the following directories

c:\program files\microsoft visual studio\vc++\lib\glut32.lib

c:\program files\microsoft visual studio\vc++\\include\GL\glut.h

c:\program files\microsoft visual studio\vc++\\windows\system\glut32.dll
[ in NT machines at ..\winnt\system32\ ]

3. Steps to follow while opening a new project.

1. Fire up Visual Studio

2. Create a new project as Win32 Console application.
File -> New -> Project -> Win32 Console Application -> An Empty Application

3. Create a new c++ file.(write the code)

4. project à settingsà use MFC as a shared dll

5. Ready to build . Go F5 ...

List of Programs

  1. A simple Introductory OpenGL program
  2. An OpenGL program to display a cube.
  3. A program to explain double buffering concept.
  4. A program to perform smooth shading.
  5. A planet program to demonstrate translation and rotation.

1. A simple introductory program on OpenGL

Expected output:


Source code:

#include 
#include 
 
void display(void)
{
/* clear all pixels  */
   glClear (GL_COLOR_BUFFER_BIT);
 
/* draw white polygon (rectangle) with corners at
 * (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0)  
 */
   glColor3f (1.0, 1.0, 1.0);
   glBegin(GL_POLYGON);
      glVertex3f (0.25, 0.25, 0.0);
      glVertex3f (0.75, 0.25, 0.0);
      glVertex3f (0.75, 0.75, 0.0);
      glVertex3f (0.25, 0.75, 0.0);
   glEnd();
 
/* don't wait!  
 * start processing buffered OpenGL routines 
 */
   glFlush ();
}
 
void init (void) 
{
/* select clearing color       */
   glClearColor (0.0, 0.0, 0.0, 0.0);
 
/* initialize viewing values  */
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
   glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
}
 
/* 
 * Declare initial window size, position, and display mode
 
 * (single buffer and RGBA).  Open window with "hello"
 * in its title bar.  Call initialization routines.
 * Register callback function to display graphics.
 * Enter main loop and process events.
 */
int main(int argc, char** argv)
{
   glutInit(&argc, argv);
   glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
   glutInitWindowSize (250, 250); 
   glutInitWindowPosition (100, 100);
   glutCreateWindow ("hello");
   init ();
   glutDisplayFunc(display); 
   glutMainLoop();
   return 0;   /* ANSI C requires main to return int. */
}

2. An OpenGL program to display a cube

Expected output:


Source code:

#include 
#include 
 
void init(void) 
{
   glClearColor (0.0, 0.0, 0.0, 0.0);
   glShadeModel (GL_FLAT);
}
 
void display(void)
{
   glClear (GL_COLOR_BUFFER_BIT);
   glColor3f (1.0, 1.0, 1.0);
   glLoadIdentity ();             /* clear the matrix */
           /* viewing transformation  */
   gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
   glScalef (1.0, 2.0, 1.0);      /* modeling transformation */ 
   glutWireCube (1.0);
   glFlush ();
}
 
void reshape (int w, int h)
{
   glViewport (0, 0, (GLsizei) w, (GLsizei) h); 
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
   glFrustum (-1.0, 1.0, -1.0, 1.0, 1.5, 20.0);
   glMatrixMode (GL_MODELVIEW);
}
 
void keyboard(unsigned char key, int x, int y)
{
   switch (key) {
      case 27:
         exit(0);
         break;
   }
}
 
int main(int argc, char** argv)
{
   glutInit(&argc, argv);
   glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
   glutInitWindowSize (500, 500); 
   glutInitWindowPosition (100, 100);
   glutCreateWindow (argv[0]);
   init ();
   glutDisplayFunc(display); 
   glutReshapeFunc(reshape);
   glutKeyboardFunc(keyboard);
   glutMainLoop();
   return 0;
}

3. A program on Double Buffering concept

Expected output:


This is a simple double buffered program. Pressing the left mouse button rotates the rectangle. Pressing the middle mouse button stops the rotation.

Source code:

#include 
#include 
 
static GLfloat spin = 0.0;
 
void display(void)
{
   glClear(GL_COLOR_BUFFER_BIT);
   glPushMatrix();
   glRotatef(spin, 0.0, 0.0, 1.0);
   glColor3f(1.0, 1.0, 1.0);
   glRectf(-25.0, -25.0, 25.0, 25.0);
   glPopMatrix();
 
   glutSwapBuffers();
}
 
void spinDisplay(void)
{
   spin = spin + 2.0;
   if (spin > 360.0)
      spin = spin - 360.0;
   glutPostRedisplay();
}
 
void init(void) 
{
   glClearColor (0.0, 0.0, 0.0, 0.0);
   glShadeModel (GL_FLAT);
}
 
void reshape(int w, int h)
{
   glViewport (0, 0, (GLsizei) w, (GLsizei) h);
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
   glOrtho(-50.0, 50.0, -50.0, 50.0, -1.0, 1.0);
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
}
 
void mouse(int button, int state, int x, int y) 
{
   switch (button) {
      case GLUT_LEFT_BUTTON:
         if (state == GLUT_DOWN)
            glutIdleFunc(spinDisplay);
         break;
      case GLUT_MIDDLE_BUTTON:
      case GLUT_RIGHT_BUTTON:
         if (state == GLUT_DOWN)
            glutIdleFunc(NULL);
         break;
      default:
         break;
   }
}
   
/* 
 *  Request double buffer display mode.
 *  Register mouse input callback functions
 */
int main(int argc, char** argv)
{
   glutInit(&argc, argv);
   glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
   glutInitWindowSize (250, 250); 
   glutInitWindowPosition (100, 100);
   glutCreateWindow (argv[0]);
   init ();
   glutDisplayFunc(display); 
   glutReshapeFunc(reshape); 
   glutMouseFunc(mouse);
   glutMainLoop();
   return 0;   /* ANSI C requires main to return int. */
}

4. A program to perform smooth shading.

Expected output:

Source code:

#include 
#include 
 
void init(void) 
{
   glClearColor (0.0, 0.0, 0.0, 0.0);
   glShadeModel (GL_SMOOTH);
}
 
void triangle(void)
{
   glBegin (GL_TRIANGLES);
   glColor3f (1.0, 0.0, 0.0);
   glVertex2f (5.0, 5.0);
   glColor3f (0.0, 1.0, 0.0);
   glVertex2f (25.0, 5.0);
   glColor3f (0.0, 0.0, 1.0);
   glVertex2f (5.0, 25.0);
   glEnd();
}
 
void display(void)
{
   glClear (GL_COLOR_BUFFER_BIT);
   triangle ();
   glFlush ();
}
 
void reshape (int w, int h)
{
   glViewport (0, 0, (GLsizei) w, (GLsizei) h);
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
   if (w <= h)
      gluOrtho2D (0.0, 30.0, 0.0, 30.0 * (GLfloat) h/(GLfloat) w);
   else
      gluOrtho2D (0.0, 30.0 * (GLfloat) w/(GLfloat) h, 0.0, 30.0);
   glMatrixMode(GL_MODELVIEW);
}
 
void keyboard(unsigned char key, int x, int y)
{
   switch (key) {
      case 27:
         exit(0);
         break;
   }
}
 
int main(int argc, char** argv)
{
   glutInit(&argc, argv);
   glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
   glutInitWindowSize (500, 500); 
   glutInitWindowPosition (100, 100);
   glutCreateWindow (argv[0]);
   init ();
   glutDisplayFunc(display); 
   glutReshapeFunc(reshape);
   glutKeyboardFunc (keyboard);
   glutMainLoop();
   return 0;
}

5. A planet program to demonstrate translation and rotation.

Expected output:


Interaction: pressing the d and y keys (day and year) alters the rotation of the planet around the sun.

Source code:

#include 
#include 
 
static int year = 0, day = 0;
 
void init(void) 
{
   glClearColor (0.0, 0.0, 0.0, 0.0);
   glShadeModel (GL_FLAT);
}
 
void display(void)
{
   glClear (GL_COLOR_BUFFER_BIT);
   glColor3f (1.0, 1.0, 1.0);
 
   glPushMatrix();
   glutWireSphere(1.0, 20, 16);   /* draw sun */
   glRotatef ((GLfloat) year, 0.0, 1.0, 0.0);
   glTranslatef (2.0, 0.0, 0.0);
   glRotatef ((GLfloat) day, 0.0, 1.0, 0.0);
   glutWireSphere(0.2, 10, 8);    /* draw smaller planet */
   glPopMatrix();
   glutSwapBuffers();
}
 
void reshape (int w, int h)
{
   glViewport (0, 0, (GLsizei) w, (GLsizei) h); 
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
   gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0);
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
   gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
}
 
void keyboard (unsigned char key, int x, int y)
{
   switch (key) {
      case 'd':
         day = (day + 10) % 360;
         glutPostRedisplay();
         break;
      case 'D':
         day = (day - 10) % 360;
         glutPostRedisplay();
         break;
      case 'y':
         year = (year + 5) % 360;
         glutPostRedisplay();
         break;
      case 'Y':
         year = (year - 5) % 360;
         glutPostRedisplay();
         break;
      case 27:
         exit(0);
         break;
      default:
         break;
   }
}
 
int main(int argc, char** argv)
{
   glutInit(&argc, argv);
   glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
   glutInitWindowSize (500, 500); 
   glutInitWindowPosition (100, 100);
   glutCreateWindow (argv[0]);
   init ();
   glutDisplayFunc(display); 
   glutReshapeFunc(reshape);
   glutKeyboardFunc(keyboard);
   glutMainLoop();
   return 0;
}
 


Popular Posts