Metadata extractor

We will be designing a Perl program to extract metadata in which we will be using a new Perl module, Image::ExifTool. We will also be using the LWP::UserAgent Perl module to convert GPS coordinates into detailed location information using Google's GPS API. Let's jump right in and analyze the code in sections. After this, we will run the code listed next using a few files found on our client target's web server:

#!/usr/bin/perl -w use strict; use Image::ExifTool qw(:Public); use LWP::UserAgent; my $usage = "Usage: ./mdextract <file name>"; my $file = shift or die $usage; my $exifTool = new Image::ExifTool; my $info = $exifTool->ImageInfo($file); my $group = ""; # which group to get data from my $gpsCheck = ""; # should we resolve ...

Get Penetration Testing with Perl now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.