T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/lavocat.ca/public_html/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.ca/public_html/scripts/test-business-profiles.js
const https = require('https');
const http = require('http');

async function testBusinessProfiles() {
  try {
    console.log('๐Ÿงช Testing Business Profiles API...\n');

    const options = {
      hostname: 'localhost',
      port: 3000,
      path: '/api/public/business-profiles',
      method: 'GET',
      headers: {
        'Content-Type': 'application/json'
      }
    };

    const req = http.request(options, (res) => {
      let data = '';
      
      res.on('data', (chunk) => {
        data += chunk;
      });
      
      res.on('end', () => {
        try {
          const businessProfiles = JSON.parse(data);
          
          console.log(`๐Ÿ“Š API Response Status: ${res.statusCode}`);
          console.log(`๐Ÿ“Š Number of Business Profiles: ${businessProfiles.length}\n`);

          if (businessProfiles.length > 0) {
            console.log('๐Ÿข Business Profiles Found:');
            businessProfiles.forEach((business, index) => {
              console.log(`\n${index + 1}. ${business.businessName}`);
              console.log(`   Type: ${business.businessType}`);
              console.log(`   Industry: ${business.industry || 'N/A'}`);
              console.log(`   Public: ${business.isPublic}`);
              console.log(`   Verified: ${business.isVerified}`);
              console.log(`   Owner: ${business.owner.name} (${business.owner.email})`);
              console.log(`   Members: ${business.members.length}`);
              console.log(`   Total Lawyers: ${business.firmStats.totalLawyers}`);
              console.log(`   Win Rate: ${business.firmStats.averageWinRate.toFixed(1)}%`);
              console.log(`   Total Cases: ${business.firmStats.totalCases}`);
              
              if (business.members.length > 0) {
                console.log('   Team Members:');
                business.members.forEach((member, memberIndex) => {
                  console.log(`     ${memberIndex + 1}. ${member.name} (${member.specialization || member.role})`);
                });
              }
            });
          } else {
            console.log('โŒ No business profiles found');
          }
        } catch (error) {
          console.error('Error parsing response:', error);
          console.log('Raw response:', data);
        }
      });
    });

    req.on('error', (error) => {
      console.error('Error making request:', error);
    });

    req.end();

  } catch (error) {
    console.error('Error testing business profiles:', error);
  }
}

testBusinessProfiles(); 

CasperSecurity Mini