-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.php
120 lines (104 loc) · 3.44 KB
/
cli.php
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
<?php
date_default_timezone_set("Asia/Jakarta");
system("clear");
echo banner();
echo "[+] Enter contract address >> ";
$token = trim(fgets(STDIN));
chain:
echo "
=======[Network]=======
[1] Binance smart chain
[2] Etherium network
[+] Chose number >> ";
$chain = trim(fgets(STDIN));
if(!preg_match("/^[0-9]*$/", $chain)){
echo "\n\n[!] INPUT NUMBER ONLY [!]\n\n";
goto chain;
}
if($chain == '1'){
$net = 'bsc';
}elseif($chain == '2'){
$net = 'eth';
}else{
echo "\n\n[!] NOT FOUND [!]\n\n";
goto chain;
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.banditcoding.xyz/honeypot/?chain=$net&address=$token");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$res = curl_exec($ch);
$json = json_decode($res, TRUE);
$net = strtoupper($net);
$symbol = $json['data']['symbol'];
$nameC = $json['data']['name'];
$decimal = $json['data']['decimals'];
$webC = $json['data']['officialwebsite'];
$icon = $json['data']['icon'];
$ex = explode("?",$icon);
$link = $ex[0];
$pot = $json['data']['info']['honeypot'];
$err = $json['data']['info']['error'];
$maxtx = $json['data']['info']['MaxTaxAmount'];
$maxtxBNB = $json['data']['info']['MaxTxAmountBNB'];
$buytx = $json['data']['info']['BuyTax'];
$selltx = $json['data']['info']['SellTax'];
$buygas = $json['data']['info']['BuyGas'];
$sellgas = $json['data']['info']['SellGas'];
if(strpos($res, '"msg":"Token not compatible with Chain!"')){
exit("\n\n[!] Token not compatible with network! [!]\n\n");
}
if(strpos($res, '"honeypot":"No"')){
$cek = '✅ This contract address is not a honeypot ✅ ';
system("clear");
echo "
================[Result]================
NAME : $nameC
SYMBOL : $symbol
DECIMALS : $decimal
WEBSITE : $webC
HONEYPOT : $pot
MESSAGE : $cek
NETWORK : $net
CONTRACT ADDRESS : $token
MAX TAX AMOUNT : $maxtx
MAX TAX BNB : $maxtxBNB
BUY TAX : $buytx
SELL TAX : $selltx
BUY GAS : $buygas
SELL GAS : $sellgas
========================================
";
}else{
$cek = '❌ Yes, this is a honeypot! ❌ ';
system("clear");
echo "
================[Result]================
NAME : $nameC
SYMBOL : $symbol
DECIMALS : $decimal
WEBSITE : $webC
HONEYPOT : $pot
MESSAGE : $cek
ERROR : $err
NETWORK : $net
CONTRACT ADDRESS : $token
========================================
";
}
function banner(){
$banner = "
CLI VERSION
_ _ ___ _ _ _____ _____ ___ _____ ___ ___ _____ ___ ___ _____ ___ ___
| || |/ _ \| \| | __\ \ / / _ \/ _ \_ _| | \| __|_ _| __/ __|_ _/ _ \| _ \
| __ | (_) | .` | _| \ V /| _/ (_) || | | |) | _| | | | _| (__ | || (_) | /
|_||_|\___/|_|\_|___| |_| |_| \___/ |_| |___/|___| |_| |___\___| |_| \___/|_|_\
CODE BY ZLAXTERT
-----------------------------------------------------------------------------------
Honeypot detector simulates a buy and a sell transaction
to determine if a token is a honeypot.
-----------------------------------------------------------------------------------
";
return $banner;
}
?>