Si quieren el programa les redirige a google maps con las coordenadas encontradas.
El codigo :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | #!usr/bin/perl # DH Image Locate 0.3 #(C) pr0xXx0r use Image::ExifTool; use Getopt::Long; use Color::Output; Color::Output::Init; GetOptions( "dump_all=s" => \$dump_all, "dump_gps_tags=s" => \$dump_gps_tags, "locate=s" => \$locate ); head(); if ($dump_all) { if ( -f $dump_all ) { printear_titulo("<ul class="bbc_list"><li type="square"> Finding information in : ");[/li][/list] print $dump_all. "\n\n"; dump_all($dump_all); } else { printear("[-] File not found\n"); } } elsif ($dump_gps_tags) { if ( -f $dump_gps_tags ) { printear_titulo("</li><li type="square"> Finding GPS tags in : ");[/li][/list] print $dump_gps_tags. "\n\n"; dump_gps_tags_and_locate($dump_gps_tags,"0"); } else { printear("[-] File not found\n"); } } elsif ($locate) { if ( -f $locate ) { printear_titulo("</li><li type="square"> Scanning photo : ");[/li][/list] print $locate. "\n\n"; dump_gps_tags_and_locate($locate,"1"); } else { printear("[-] File not found\n"); } } else { sintax(); } copyright(); # Functions sub dump_all { my $imagen_target = $_[0]; my $datos_imagen = new Image::ExifTool; my $informacion_imagen = $datos_imagen->ImageInfo($imagen_target); for my $abriendo_imagen ( $datos_imagen->GetFoundTags("Group0") ) { my $valor = $informacion_imagen->{$abriendo_imagen}; printear("</li><li type="square"> $abriendo_imagen : ");[/li][/list] print $valor. "\n"; } } sub dump_gps_tags_and_locate { my $imagen_target = shift; my $locate = shift; my $datos_imagen = new Image::ExifTool; my $informacion_imagen = $datos_imagen->ImageInfo($imagen_target); my $latitud = $informacion_imagen->{GPSLatitude}; my $longitud = $informacion_imagen->{GPSLongitude}; my $altitud = $informacion_imagen->{GPSAltitude}; my $fecha = $informacion_imagen->{GPSDateTime}; my $posicion_real = $informacion_imagen->{GPSPosition}; my $finder_ready = 0; if($latitud ne "") { printear("</li><li type="square"> Latitude : ");[/li][/list] print $latitud. "\n"; } else { printear("[-] Latitude : "); print "Not Found". "\n"; } if($longitud ne "") { printear("</li><li type="square"> Longitude : ");[/li][/list] print $longitud. "\n"; } else { printear("[-] Longitude : "); print "Not Found". "\n"; } if($latitud ne "") { printear("</li><li type="square"> Altitude : ");[/li][/list] print $altitud. "\n"; } else { printear("[-] Altitude : "); print "Not Found". "\n"; } if($fecha ne "") { printear("</li><li type="square"> DateTime : ");[/li][/list] print $fecha. "\n"; } else { printear("[-] DateTime : "); print "Not Found". "\n"; } if($posicion_real ne "") { printear("</li><li type="square"> Position : ");[/li][/list] print $posicion_real. "\n"; $finder_ready = 1; } else { printear("[-] Position : "); print "Not Found". "\n"; $finder_ready = 0; } if($locate eq "1") { if($finder_ready eq "1") { my $gps_split = $posicion_real; $gps_split =~ s/deg//g; $gps_split =~ s/'//g; $gps_split =~ s/"//g; $gps_split =~ s/W//g; $gps_split =~ s/N,/-/g; $gps_split =~ s/ / /g; my $url = "https://www.google.com.ar/maps/search/".$gps_split."/"; printear_titulo("\n[!] Position Located\n\n"); printear("</li><li type="square"> GPS : ");[/li][/list] print $gps_split."\n"; printear("\n[?] Open in browser [y,n] : "); chomp(my $rta = <STDIN>); if($rta=~/y/ig) { printear_titulo("\n</li><li type="square"> Enjoy the program !\n");[/li][/list] system("start firefox \"" . $url."\""); } else { printear("\n</li><li type="square"> GoogleMaps : ");[/li][/list] print $url. "\n"; } } else { printear_titulo("\n[-] Position GPS not available"); } } } # More Functions sub printear { cprint( "\x036" . $_[0] . "\x030" ); } sub printear_logo { cprint( "\x037" . $_[0] . "\x030" ); } sub printear_titulo { cprint( "\x0310" . $_[0] . "\x030" ); } sub sintax { printear("</li><li type="square"> Sintax : ");[/li][/list] print "perl $0 <option> <value>\n"; printear("\n</li><li type="square"> Options : \n\n");[/li][/list] print "-dump_all <image> : Get all information of a image\n"; print "-dump_gps <image> : Get all tags GPS of a image\n"; print "-locate <image> : Locate Image in GoogleMaps\n"; printear("\n</li><li type="square"> Example : ");[/li][/list] print "perl dh_image_locate.pl -dump_all test.jpg\n"; copyright(); } sub head { printear_logo("\n-- == DH Image Locate 0.3 == --\n\n\n"); } sub copyright { printear_logo("\n\n-- == (C) Doddy Hackman 2016 == --\n\n"); exit(1); } #The End ? |
0 comentarios: sobre [Perl] DH Image Locate 0.3
Publicar un comentario para [Perl] DH Image Locate 0.3