!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/OTapi/   drwxr-xr-x
Free 13.05 GB of 57.97 GB (22.52%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     server_old.js (4.5 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
// index.js
const express = require('express');
const cors = require('cors');
const { callOTAPI } = require('./lib/otapiClient');
const dotenv = require('dotenv');
const qs = require('qs');
const path = require('path');
const https = require('https');
const agent = new https.Agent({ rejectUnauthorized: false });
dotenv.config();
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
const axios = require('axios');
const OTAPI_INSTANCE_KEY = process.env.OTAPI_INSTANCE_KEY;

const app = express();
app.use(cors());
app.use(express.json());
app.get('/', async (req, res, next) => {
    res.json({ message: 'Hello from OTAPI proxy!' });
});
// 1. Search by keyword
app.get('/search', async (req, res, next) => {

    const xmlParameters = `<SearchItemsParameters>
      <ItemTitle>adidas</ItemTitle>
      <Provider>Alibaba1688</Provider>
      <Order>TotalVolumeDesc</Order>
    </SearchItemsParameters>`;
    const params = {
        instanceKey: OT_Key,
        language: '',
        framePosition: 0,
        frameSize: 50,
        xmlParameters: xmlParameters,
        // timestamp: timestamp,  // <-- Add this line
        blockList: '',
        sessionId: '',

    };
    axios.get('http://otapi.net/service-json/GetRootCategoryInfoList?instanceKey=c4e85fb9-7f86-4091-8d38-73a7b4db3d79&language=en&signature=ded76a2bb903b192aded0891e510ea32dfe7613267bd1be2182362008a1117b0&timestamp=20250515142902', null, { })
    .then(res => {
        console.log('✅ Response:', res.data.CategoryInfoList.Content);
    })
    .catch(err => {
        console.error('❌ Axios Error:', err.message);
    });
//   try {
//     const { q, page = 1, pageSize = 20 } = req.query;
//     const result = await callOTAPI('GetRootCategoryInfoList', {
//         Keyword: 'laptop',
//         Page: 1,
//         PageSize: 10,
//         Language: 'en',       // some methods need this
//         Blocks: ['Item']
//     });
//     res.json(result);
//   } catch (err) {
//     next(err);
//   }
});

app.get('/item', async (req, res, next) => { 
// const result = await callOTAPI('GetCategoryList', {});
  try {
    
    const result = await axios.get(`http://otapi.net/service-json/BatchSearchItemsFrame?instanceKey=c4e85fb9-7f86-4091-8d38-73a7b4db3d79&language=&signature=a2ee99e0a0fc25057f08173c0c3906ff6e265179bdb8a27cc7e80127ddcef94f&timestamp=20250518073832&sessionId=&xmlParameters=%3CSearchItemsParameters%3E%0D%0A++%3CItemTitle%3E${req.params.keyword}%3C%2FItemTitle%3E%0D%0A++%3CProvider%3EAlibaba1688%3C%2FProvider%3E%0D%0A++%3COrder%3ETotalVolumeDesc%3C%2FOrder%3E%0D%0A%3C%2FSearchItemsParameters%3E%0D%0A&framePosition=0&frameSize=50&blockList=`, null, { })
    .then(res => {
        console.log('✅ Response:', result.data.CategoryInfoList.Content);
    })
    .catch(err => {
        console.error('❌ Axios Error:', err.message);
    });
    res.json(result);
  } catch (err) {
    next(err);
  }
    

});
// 2. Browse categories & subcategories
app.get('/categories', async (req, res, next) => {
  try {
    // const result = await callOTAPI('GetCategoryList', {});
    const result = await axios.get('http://otapi.net/service-json/GetRootCategoryInfoList?instanceKey=c4e85fb9-7f86-4091-8d38-73a7b4db3d79&language=en&signature=ded76a2bb903b192aded0891e510ea32dfe7613267bd1be2182362008a1117b0&timestamp=20250515142902', null, { })
    .then(result => {
        console.log('✅ Response:', result.data.CategoryInfoList);
            res.json(result);

    })
    .catch(err => {
        console.error('❌ Axios Error:', err.message);
    });
    res.json(result);
  } catch (err) {
    next(err);
  }
});

// 3. Shop details
app.get('/shops/:shopId', async (req, res, next) => {
  try {
    const result = await callOTAPI('GetVendorInfo', {
      Filter: { VendorId: req.params.shopId }
    });
    res.json(result);
  } catch (err) {
    next(err);
  }
});

// 4. Product details (with variants, colors, inventory, rating)
app.get('/products/:itemId', async (req, res, next) => {
  try {
    const result = await callOTAPI('GetItemFullInfo', {
      ItemId: +req.params.itemId,
      Blocks: ['Item', 'Picture', 'ParamList', 'Stock', 'Price', 'Rating']
    });
    res.json(result);
  } catch (err) {
    next(err);
  }
});

// Error handler
app.use((err, req, res, next) => {
  console.error(err);
  res.status(500).json({ error: err.message });
});

const port = process.env.PORT || 4000;
app.listen(port, '0.0.0.0', () => console.log(`OTAPI proxy running on ${port}`));

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0048 ]--