Skip to content

Instantly share code, notes, and snippets.

@v4p0r
Last active September 29, 2017 23:03
Show Gist options
  • Save v4p0r/e6dd534dd5641df8e940727dafdb37f1 to your computer and use it in GitHub Desktop.
Save v4p0r/e6dd534dd5641df8e940727dafdb37f1 to your computer and use it in GitHub Desktop.
Simple Bin Checker
#!/usr/bin/perl
# Obrigado kodozin por me ajudar com a parte das regex ;p
# Simple Bin Checker by v4p0r
# Date 29/SET/2017
# Gretz: YC / BRLZ PoC / EOF Club / All Friends
use strict;
use WWW::Mechanize;
#Da aquela limpada
my $distro;
my $usr = $^O;
if ( $usr eq "MSWin32") {
system ("cls");
} else {
system ("clear");
}
#Bannerzinho
print "================================\n" .
" Simple Bin Checker\n" .
"================================\n\n" .
"[!] usage: perl $0 [bin] [split]\n" ;
#Começando a festa
if ($ARGV[0] and $ARGV[1]) {
#Define o card e verifica se tem >= a 6 digitos para definir a bin
my $cardfull = $ARGV[0];
$cardfull =~ /(\d{6})/g or die "[!] Define a bin ae amigo, min 6 digitos";
#Define o split
my $split = $ARGV[1];
#Split
my ($card,$ignore) = split/[$split]/,$cardfull;
my @bin1 = ($card =~ /(\d{6})/g);
#Parte de coletar as infos
my $mech = new WWW::Mechanize();
$mech->get("https://www.cardbinlist.com/search.html?bin=".$bin1[0]."");
my @get = $mech->content =~ /text.xs.left(.*)col.half.left/smi;
my @get1 = $get[0] =~ /<td><a href=".*">(.*?)<\/a><\/td>/;
my @get2 = $get[0] =~ /<\/th>.*?<td>(.*?)<\/td>/gsm;
my @get3 = $get2[5] =~ />(.*)</;
#Infos Coletadas
print "\n";
print "CARD: " . $card . " | "
. "BIN: " . $bin1[0] . " | "
. "PAIS: " . $get1[0] . " | "
. "CODE: " . $get2[1] . " | "
. "BAN: " . $get2[2] . " | "
. "URL: " . $get2[3] . " | "
. "TEL: " . $get2[4] . " | "
. "BANDEIRA: " . $get3[0] . " | "
. "TIPO: " . $get2[6] . " | "
. "SUB: " . $get2[7] . "\n";
#Aquela despedida
print "\nBin checada com sucesso, volte sempre que precisar!\n";
} else {
print "[!] Preciso dos meus dois argumentos amigo\n";
}
#EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment