Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
دریافت نام سرویس دهنده
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Apr 24, 2023
1 parent c0dbc0c commit a481e65
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 107 deletions.
205 changes: 99 additions & 106 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,116 +350,109 @@ function getIpInfo(entry) {
ipInfo['isProxy'] = false;
try {
//$('#providerName').html('<img src="../scanner/assets/img/loader.gif" alt="loader" />');
$.ajax({
//url: "https://ipinfo.io/"+entry+"/org?token=86b604fe21f759",
url: "https://geo.ipify.org/api/v2/country?apiKey=at_VLfGVVvN310RgvR9guBL17sPrSLPS&ipAddress="+entry,
type: 'GET',
dataType: 'json',
async:true,
success: function (data){
if ( data !== '' ) {
// https://bgp.he.net/country/IR
ipInfo['ip'] = data['ip'];
ipInfo['countryCode'] = data['location']['country\n'];
ipInfo['isProxy'] = false;
if ( data['isp'].includes('Hetzner Online GMBH') ) {
ipInfo['providerCode'] = 'unk';
ipInfo['providerName'] = '';
ipInfo['isProxy'] = true;
}
else if ( data['isp'].includes('Mobin Net Communication Company') ) {
ipInfo['providerCode'] = 'mbn';
ipInfo['providerName'] = 'مبین‌نت';
}
else if ( data['isp'].includes('Andishe SABZ Khazar Co P.j.s') ) {
ipInfo['providerCode'] = 'ask';
ipInfo['providerName'] = 'اندیشه‌سبز';
}
else if ( data['isp'].includes('Mobile Communication Company of Iran PLC') ) {
ipInfo['providerCode'] = 'mci';
ipInfo['providerName'] = 'همراه‌اول';
}
else if ( data['isp'].includes('Iran Cell Service and Communication Company') ) {
ipInfo['providerCode'] = 'mtn';
ipInfo['providerName'] = 'ایرانسل';
}
else if ( data['isp'].includes('Iran Telecommunication Company PJS') ) {
ipInfo['providerCode'] = 'mkh';
ipInfo['providerName'] = 'مخابرات';
}
else if ( data['isp'].includes('Rightel Communication Service Company PJS') ) {
ipInfo['providerCode'] = 'rtl';
ipInfo['providerName'] = 'رایتل';
}
else if ( data['isp'].includes('Aria Shatel Company Ltd') ) {
ipInfo['providerCode'] = 'sht';
ipInfo['providerName'] = 'شاتل';
}
else if ( data['isp'].includes('Pardis Fanvari Partak Ltd') ) {
ipInfo['providerCode'] = 'sht';
ipInfo['providerName'] = 'شاتل‌موبایل';
}
else if ( data['isp'].includes('Pars Online PJS') ) {
ipInfo['providerCode'] = 'prs';
ipInfo['providerName'] = 'پارس‌آنلاین';
}
else if ( data['isp'].includes('Asiatech Data Transfer Inc PLC') ) {
ipInfo['providerCode'] = 'ast';
ipInfo['providerName'] = 'آسیاتک';
}
else if ( data['isp'].includes('Afranet') ) {
ipInfo['providerCode'] = 'aft';
ipInfo['providerName'] = 'افرانت';
}
else if ( data['isp'].includes('Respina Networks & Beyond PJSC') ) {
ipInfo['providerCode'] = 'rsp';
ipInfo['providerName'] = 'رسپینا';
}
else if ( data['isp'].includes('Rayaneh Danesh Golestan Complex P.J.S. Co.') ) {
ipInfo['providerCode'] = 'hwb';
ipInfo['providerName'] = 'های‌وب';
}
else if ( data['isp'].includes('Pishgaman Toseeh Ertebatat Company') ) {
ipInfo['providerCode'] = 'psm';
ipInfo['providerName'] = 'پیشگامان';
}
else if ( data['isp'].includes('Farabord Dadeh Haye Iranian Co.') ) {
ipInfo['providerCode'] = 'ztl';
ipInfo['providerName'] = 'زیتل';
}
else if ( data['isp'].includes('Tose\'h Fanavari Ertebabat Pasargad Arian Co PJS') ) {
ipInfo['providerCode'] = 'arx';
ipInfo['providerName'] = 'آراکس';
}
else if ( data['isp'].includes('Fanava Group') ) {
ipInfo['providerCode'] = 'fnv';
ipInfo['providerName'] = 'فن‌آوا';
}
else if ( data['isp'].includes('Negin Ertebatate Ava Company PJS') ) {
ipInfo['providerCode'] = 'apt';
ipInfo['providerName'] = 'آپتل';
}
else if ( data['isp'].includes('Didehban Net Company PJS') ) {
ipInfo['providerCode'] = 'dbn';
ipInfo['providerName'] = 'دیده‌بان‌نت';
}
else if ( data['isp'].includes('Pardazeshgar Ray AZMA Co Ltd') ) {
ipInfo['providerCode'] = 'ryn';
ipInfo['providerName'] = 'رای‌نت';
}
$.get("https://ipinfo.io/"+entry+"/org?token=86b604fe21f759", function(data, status) {
if ( data !== '' ) {
// https://bgp.he.net/country/IR
ipInfo['ip'] = data['ip'];
//ipInfo['countryCode'] = data['location']['country\n'];
//ipInfo['isProxy'] = false;
if ( data.includes('Hetzner Online GMBH') ) {
ipInfo['providerCode'] = 'unk';
ipInfo['providerName'] = '';
ipInfo['isProxy'] = true;
}
provider = ipInfo['providerCode'];
$('#providerName').html(ipInfo['providerName'].toUpperCase());
$('#proxyChecker').html('علاوه‌براین، '+(ipInfo['isProxy'] ? 'درحال‌حاضر قندشکن شما روشن است؛ باید ‌آن‌را خاموش کنید' : 'باید قندشکن شما خاموش باشد')+'.');
if ( ipInfo['isProxy'] ) {
$('#alert').removeClass('alert-warning').addClass('alert-danger');
else if ( data.includes('Mobin Net Communication Company') ) {
ipInfo['providerCode'] = 'mbn';
ipInfo['providerName'] = 'مبین‌نت';
}
else {
$('#alert').removeClass('alert-danger').addClass('alert-warning');
else if ( data.includes('Andishe SABZ Khazar Co P.j.s') ) {
ipInfo['providerCode'] = 'ask';
ipInfo['providerName'] = 'اندیشه‌سبز';
}
else if ( data.includes('Mobile Communication Company of Iran PLC') ) {
ipInfo['providerCode'] = 'mci';
ipInfo['providerName'] = 'همراه‌اول';
}
else if ( data.includes('Iran Cell Service and Communication Company') ) {
ipInfo['providerCode'] = 'mtn';
ipInfo['providerName'] = 'ایرانسل';
}
else if ( data.includes('Iran Telecommunication Company PJS') ) {
ipInfo['providerCode'] = 'mkh';
ipInfo['providerName'] = 'مخابرات';
}
else if ( data.includes('Rightel Communication Service Company PJS') ) {
ipInfo['providerCode'] = 'rtl';
ipInfo['providerName'] = 'رایتل';
}
else if ( data.includes('Aria Shatel Company Ltd') ) {
ipInfo['providerCode'] = 'sht';
ipInfo['providerName'] = 'شاتل';
}
else if ( data.includes('Pardis Fanvari Partak Ltd') ) {
ipInfo['providerCode'] = 'sht';
ipInfo['providerName'] = 'شاتل‌موبایل';
}
else if ( data.includes('Pars Online PJS') ) {
ipInfo['providerCode'] = 'prs';
ipInfo['providerName'] = 'پارس‌آنلاین';
}
else if ( data.includes('Asiatech Data Transfer Inc PLC') ) {
ipInfo['providerCode'] = 'ast';
ipInfo['providerName'] = 'آسیاتک';
}
else if ( data.includes('Afranet') ) {
ipInfo['providerCode'] = 'aft';
ipInfo['providerName'] = 'افرانت';
}
else if ( data.includes('Respina Networks & Beyond PJSC') ) {
ipInfo['providerCode'] = 'rsp';
ipInfo['providerName'] = 'رسپینا';
}
return ipInfo;
else if ( data.includes('Rayaneh Danesh Golestan Complex P.J.S. Co.') ) {
ipInfo['providerCode'] = 'hwb';
ipInfo['providerName'] = 'های‌وب';
}
else if ( data.includes('Pishgaman Toseeh Ertebatat Company') ) {
ipInfo['providerCode'] = 'psm';
ipInfo['providerName'] = 'پیشگامان';
}
else if ( data.includes('Farabord Dadeh Haye Iranian Co.') ) {
ipInfo['providerCode'] = 'ztl';
ipInfo['providerName'] = 'زیتل';
}
else if ( data.includes('Tose\'h Fanavari Ertebabat Pasargad Arian Co PJS') ) {
ipInfo['providerCode'] = 'arx';
ipInfo['providerName'] = 'آراکس';
}
else if ( data.includes('Fanava Group') ) {
ipInfo['providerCode'] = 'fnv';
ipInfo['providerName'] = 'فن‌آوا';
}
else if ( data.includes('Negin Ertebatate Ava Company PJS') ) {
ipInfo['providerCode'] = 'apt';
ipInfo['providerName'] = 'آپتل';
}
else if ( data.includes('Didehban Net Company PJS') ) {
ipInfo['providerCode'] = 'dbn';
ipInfo['providerName'] = 'دیده‌بان‌نت';
}
else if ( data.includes('Pardazeshgar Ray AZMA Co Ltd') ) {
ipInfo['providerCode'] = 'ryn';
ipInfo['providerName'] = 'رای‌نت';
}
}
provider = ipInfo['providerCode'];
$('#providerName').html(ipInfo['providerName'].toUpperCase());
$('#proxyChecker').html('علاوه‌براین، '+(ipInfo['isProxy'] ? 'درحال‌حاضر قندشکن شما روشن است؛ باید ‌آن‌را خاموش کنید' : 'باید قندشکن شما خاموش باشد')+'.');
if ( ipInfo['isProxy'] ) {
$('#alert').removeClass('alert-warning').addClass('alert-danger');
}
})
else {
$('#alert').removeClass('alert-danger').addClass('alert-warning');
}
return ipInfo;
});
}
catch(err) {
console.log(err.message)
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h4 class="modal-title">دونیت</h4>
</div>
<script src="./assets/js/jquery.min.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
<script src="./assets/js/script.js?v1.12"></script>
<script src="./assets/js/script.js?v1.13"></script>
</footer>
</div>
</div>
Expand Down

0 comments on commit a481e65

Please sign in to comment.