mirror of
https://github.com/sumx86/AbuseIPDB.git
synced 2024-09-30 06:01:31 +02:00
-updated-
This commit is contained in:
parent
a7afbd31ea
commit
0d365ea915
@ -327,8 +327,7 @@ function main( int $argc, array $argv ) : void
|
|||||||
$resp = check_cidr( $url, $opts->api_key, $network, $days );
|
$resp = check_cidr( $url, $opts->api_key, $network, $days );
|
||||||
|
|
||||||
if( is_array( $resp ) && ($resp[0])->id ){
|
if( is_array( $resp ) && ($resp[0])->id ){
|
||||||
foreach( ($resp[0]) as $errKey => $errVal )
|
foreach( ($resp[0]) as $errKey => $errVal ){
|
||||||
{
|
|
||||||
$tab = ( $errKey == "id" ) ? "\t\t" : "\t" ;
|
$tab = ( $errKey == "id" ) ? "\t\t" : "\t" ;
|
||||||
|
|
||||||
if ( $errKey == "links" ) echo "\n" . GREEN . "[".RED."*".NONE.GREEN."] ".NONE. strtoupper( $errKey ) ."$tab- ".RED. $errVal->about;
|
if ( $errKey == "links" ) echo "\n" . GREEN . "[".RED."*".NONE.GREEN."] ".NONE. strtoupper( $errKey ) ."$tab- ".RED. $errVal->about;
|
||||||
@ -339,14 +338,12 @@ function main( int $argc, array $argv ) : void
|
|||||||
if( !go_back() ) { exit; }
|
if( !go_back() ) { exit; }
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
foreach( $resp as $succKey => $succVal )
|
foreach( $resp as $succKey => $succVal ){
|
||||||
{
|
|
||||||
if( is_array( $succVal ) ){
|
if( is_array( $succVal ) ){
|
||||||
for( $i = 0 ; $i < sizeof( $succVal ) ; $i++ )
|
for( $i = 0 ; $i < sizeof( $succVal ) ; $i++ )
|
||||||
{
|
{
|
||||||
echo "\n";
|
echo "\n";
|
||||||
foreach( $succVal[ $i ] as $key => $val )
|
foreach( $succVal[ $i ] as $key => $val ){
|
||||||
{
|
|
||||||
echo "\n" . GREEN . "[".RED."*".NONE.GREEN."] ".NONE. strtoupper( $key ) ." - ".RED. $val;
|
echo "\n" . GREEN . "[".RED."*".NONE.GREEN."] ".NONE. strtoupper( $key ) ." - ".RED. $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user