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/server/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var smpp = require('smpp');
var server = smpp.createServer({
debug: true
}, function(session) {
session.on('error', function (err) {
// Something ocurred, not listening for this event will terminate the program
});
session.on('bind_transceiver', function(pdu) {
// we pause the session to prevent further incoming pdu events,
// untill we authorize the session with some async operation.
console.log('pdu');
session.pause();
// checkAsyncUserPass(pdu.system_id, pdu.password, function(err) {
// if (err) {
// console.log('error');
// session.send(pdu.response({
// command_status: smpp.ESME_RBINDFAIL
// }));
// session.close();
// return;
// }
console.log('connected');
session.send(pdu.response());
session.resume();
// });
});
session.on("submit_sm", async pdu => {
// console.log(pdu);
console.log('hello');
session.send(pdu.response({command_status: 0, message_id: 'message_id'}));
});
// Respond to an enquire link
session.on('enquire_link', function (pdu) {
console.log('enquire_link');
session.send(pdu.response());
});
// Response to an enquire link
session.on('enquire_link_resp', function (pdu) {
counter = 0;
console.log('enquire_link_resp');
});
// Listen to the unbind event and kill the process
session.on('unbind', function(pdu) {
session.send(pdu.response());
console.log('unbind');
session.close();
// process.exit();
});
// Kill the process on an SMPP connection error
session.on('error', function (error) {
console.log('error');
session.close();
// process.exit(1);
});
// Kill the process when an SMPP connection is closed
session.on('close', function () {
console.log('close');
// process.exit();
});
});
//check user valid or not
const checkAsyncUserPass = (systemId, password, is_valid) => {
console.log("checking");
var user = smpp_servers.filter((ser) => {
return ser.port === port && ser.systemId === systemId && ser.password === password
});
is_valid(user.length);
}
server.listen(2779, () => {
console.log('Server started on 2779');
}); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0058 ]-- |