vantuz 3.5.1 → 3.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli.js CHANGED
@@ -152,8 +152,11 @@ async function runTUI() {
152
152
  console.log(c('red', `\n🛑 ERİŞİM ENGELLENDİ: ${license.message}`));
153
153
  console.log(c('yellow', 'Lütfen geçerli bir lisans anahtarı girin.'));
154
154
 
155
- const key = await promptInput(c('cyan', 'Lisans Anahtarı (VTZ-XXXX): '));
155
+ const key = await promptInput(c('cyan', 'Lisans Anahtarı: '));
156
+ console.log('[CLI] Key length:', key.length);
157
+ console.log('[CLI] Key prefix:', key.substring(0, 50));
156
158
  const result = licenseManager.activate(key);
159
+ console.log('[CLI] Result:', JSON.stringify(result));
157
160
 
158
161
  if (!result.success) {
159
162
  console.log(c('red', `Hata: ${result.message}`));
package/core/license.js CHANGED
@@ -48,18 +48,44 @@ export class LicenseManager {
48
48
  return { success: false, message: 'Geçersiz lisans formatı.' };
49
49
  }
50
50
 
51
+ console.log('[DEBUG] Payload length:', payloadB64.length);
52
+ console.log('[DEBUG] Signature length:', signatureB64.length);
53
+
51
54
  // 1. İmzayı Doğrula
52
55
  const verify = crypto.createVerify('SHA256');
53
56
  verify.update(payloadB64);
54
57
  verify.end();
55
- const isValid = verify.verify(PUBLIC_KEY, signatureB64, 'base64');
58
+
59
+ // Debug: Try both RSA methods
60
+ let isValid = false;
61
+ try {
62
+ isValid = verify.verify(PUBLIC_KEY, signatureB64, 'base64');
63
+ } catch(e) {
64
+ console.log('[DEBUG] Verify error:', e.message);
65
+ }
66
+
67
+ console.log('[DEBUG] Verification result:', isValid);
56
68
 
57
69
  if (!isValid) {
58
- return { success: false, message: '❌ SAHTE LİSANS! İmza doğrulanamadı.' };
70
+ // Debug: Try with different approach
71
+ try {
72
+ const verify2 = crypto.createVerify('RSA-SHA256');
73
+ verify2.update(payloadB64);
74
+ verify2.end();
75
+ isValid = verify2.verify(PUBLIC_KEY, signatureB64, 'base64');
76
+ console.log('[DEBUG] RSA-SHA256 result:', isValid);
77
+ } catch(e) {
78
+ console.log('[DEBUG] RSA-SHA256 error:', e.message);
79
+ }
80
+
81
+ if (!isValid) {
82
+ return { success: false, message: '❌ SAHTE LİSANS! İmza doğrulanamadı.' };
83
+ }
59
84
  }
60
85
 
61
86
  // 2. İçeriği Çöz
62
87
  const payload = JSON.parse(Buffer.from(payloadB64, 'base64').toString('utf-8'));
88
+ console.log('[DEBUG] Payload:', payload);
63
89
 
64
90
  // 3. Son Kullanma Tarihini Kontrol Et (Payload içinden gelir)
65
91
  // Payload: { type: 'ANNUAL', expires: '2027-01-01', user: '...' }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vantuz",
3
- "version": "3.5.1",
3
+ "version": "3.5.3",
4
4
  "description": "Yapay Zeka Destekli Yeni Nesil E-Ticaret Yönetim Platformu (CLI)",
5
5
  "main": "index.js",
6
6
  "bin": {