Merhaba,
BAS fingerprint api ile api isteği atıyorum ama boş dönüyor,
https://fingerprints.bablosoft.com/p...ome&os=android url adresine istek atıyor ama ssl hatası veriyor ilgili sayfa veri çekemiyorum
const axios = require('axios');
const https = require('https');
// Gerçek Bablosoft API ayarları
const BABLOSOFT_CONFIG = {
apiUrl: 'https://fingerprints.bablosoft.com/prepare', // HTTPS kullanıyoruz
apiKey: 'apikey',
enabled: true
};
// SSL sertifikasını doğrulamayan https agent
const httpsAgent = new https.Agent({
rejectUnauthorized: false // SSL sertifika doğrulamasını devre dışı bırak
});
console.log('Bablosoft Fingerprint API Gerçek Test (SSL Fix)\n');
async function testRealAPI() {
console.log('API URL:', BABLOSOFT_CONFIG.apiUrl);
console.log('API Key:', BABLOSOFT_CONFIG.apiKey.substring(0, 10) + '...'); // Güvenlik için kısmi gösterim
console.log('Test başlıyor...\n');
try {
// Test 1: Mobil Android Chrome fingerprint
console.log('1. Mobil Android Chrome fingerprint testi...');
const mobileParams = new URLSearchParams({
'tags': 'mobile,android,chrome',
'key': BABLOSOFT_CONFIG.apiKey
});
const mobileUrl = `${BABLOSOFT_CONFIG.apiUrl}?${mobileParams.toString()}`;
console.log('Request URL:', mobileUrl);
const mobileResponse = await axios.get(mobileUrl, {
httpsAgent: httpsAgent, // SSL fix ekleniyor
headers: {
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Mobile Safari/537.36',
'Accept': 'application/json,text/plain,*/*',
'Accept-Language': 'tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7',
'Accept-Encoding': 'gzip, deflate, br'
},
timeout: 30000 // Timeout süresini artır
});
console.log('✅ Mobil fingerprint başarılı!');
console.log('Status:', mobileResponse.status);
console.log('Content-Type:', mobileResponse.headers['content-type']);
// Response verisi kontrolü
if (typeof mobileResponse.data === 'string') {
console.log('Response (string):', mobileResponse.data.substring(0, 200) + '...');
} else if (typeof mobileResponse.data === 'object') {
console.log('Response (object):', JSON.stringify(mobileResponse.data).substring(0, 300) + '...');
// Detaylı bilgiler
if (mobileResponse.data.userAgent) {
console.log('UserAgent:', mobileResponse.data.userAgent);
}
if (mobileResponse.data.screen) {
console.log('Screen:', mobileResponse.data.screen);
}
if (mobileResponse.data.language) {
console.log('Language:', mobileResponse.data.language);
}
}
console.log('\n' + '='.repeat(50));
// Test 2: Farklı parametrelerle test
console.log('\n2. Farklı parametre kombinasyonları testi...');
const testCases = [
{ name: 'Sadece key', params: { key: BABLOSOFT_CONFIG.apiKey } },
{ name: 'Mobile', params: { key: BABLOSOFT_CONFIG.apiKey, tags: 'mobile' } },
{ name: 'Desktop Chrome', params: { key: BABLOSOFT_CONFIG.apiKey, tags: 'desktop,chrome' } },
{ name: 'iOS Safari', params: { key: BABLOSOFT_CONFIG.apiKey, tags: 'ios,safari' } }
];
for (const testCase of testCases) {
try {
console.log(`\n🔹 ${testCase.name} testi...`);
const params = new URLSearchParams(testCase.params);
const testUrl = `${BABLOSOFT_CONFIG.apiUrl}?${params.toString()}`;
const response = await axios.get(testUrl, {
httpsAgent: httpsAgent,
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
'Accept': 'application/json,text/plain,*/*'
},
timeout: 15000
});
console.log(` ✅ Başarılı (${response.status})`);
if (response.data && response.data.userAgent) {
console.log(` 📱 UserAgent: ${response.data.userAgent.substring(0, 80)}...`);
}
} catch (error) {
console.log(` ❌ Hata: ${error.message}`);
}
// API'yi aşırı yüklememek için bekleme
await new Promise(resolve => setTimeout(resolve, 1000));
}
return { success: true, data: mobileResponse.data };
} catch (error) {
console.log('❌ API Hatası:', error.message);
if (error.code) {
console.log('Error Code:', error.code);
}
if (error.response) {
console.log('Status Code:', error.response.status);
console.log('Status Text:', error.response.statusText);
console.log('Response Data:', error.response.data);
} else if (error.request) {
console.log('Request yapıldı ama yanıt alınamadı');
console.log('Request URL:', error.config?.url);
}
return { success: false, error: error.message };
}
}
// Alternatif URL testi
async function testAlternativeURLs() {
console.log('\n' + '='.repeat(60));
console.log('ALTERNATİF URL TESTLERİ');
console.log('='.repeat(60));
const alternativeUrls = [
'https://fingerprints.bablosoft.com/prepare',
'http://fingerprints.bablosoft.com/prepare' // HTTP fallback
];
for (const url of alternativeUrls) {
try {
console.log(`\n🔹 Testing: ${url}`);
const params = new URLSearchParams({
key: BABLOSOFT_CONFIG.apiKey,
tags: 'mobile,chrome'
});
const testUrl = `${url}?${params.toString()}`;
const response = await axios.get(testUrl, {
httpsAgent: url.startsWith('https://') ? httpsAgent : undefined,
headers: {
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36'
},
timeout: 10000
});
console.log(` ✅ Başarılı: ${response.status}`);
console.log(` 📊 Veri Tipi: ${typeof response.data}`);
if (response.data) {
const dataStr = typeof response.data === 'object'
? JSON.stringify(response.data).substring(0, 150)
: String(response.data).substring(0, 150);
console.log(` 📋 Veri: ${dataStr}...`);
}
} catch (error) {
console.log(` ❌ Hata: ${error.message}`);
}
}
}
// Ana test fonksiyonu
async function runAllTests() {
console.log('🚀 BABLOSOFT API SSL FIX TEST BAŞLIYOR...\n');
// Önce ana test
const mainTestResult = await testRealAPI();
if (mainTestResult.success) {
console.log('\n🎉 ANA TEST BAŞARILI!');
console.log('SSL sorunu çözüldü ve fingerprint alınabiliyor.');
// Alternatif URL'leri test et
await testAlternativeURLs();
console.log('\n📋 ÖZET:');
console.log('✅ SSL sorunu çözüldü');
console.log('✅ API bağlantısı: BAŞARILI');
console.log('✅ Fingerprint alma: BAŞARILI');
console.log('🚀 Ana koda entegre edilebilir!');
} else {
console.log('\n❌ TEST BAŞARISIZ');
console.log('Alternatif çözümler deneniyor...');
// Alternatif URL testi
await testAlternativeURLs();
console.log('\n🔧 ÇÖZÜM ÖNERİLERİ:');
console.log('1. Node.js sürümünü güncelleyin');
console.log('2. axios paketini güncelleyin: npm install axios@latest');
console.log('3. API key\'i kontrol edin');
console.log('4. Firewall/antivirus ayarlarını kontrol edin');
}
}
// Paket kontrolü
try {
require('axios');
require('https');
runAllTests();
} catch (error) {
console.log('❌ Gerekli paketler yüklenmemiş:');
console.log('npm install axios https');
}Yardımcı olabilecek varsa çok minnetar olurum.