Skip to content

0x4C4A/lua-pdu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

luapdu

Lua PDU SMS encoder/decoder Currently only barebones functionality and some bugs.

Usage

Decoding

To see the structure of the decoding, check out the SMS Objects section

require("luapdu")
decodedSMSObj = luapdu.decode(pduString)

Encoding

To see the fields available for editing, check out the SMS Objects section

require("luapdu")
smsObj = luapdu.newTx()
smsObj.msg.content = "Some text"
smsObj.sender.num = "Some phone number"
pduString = smsObj:encode()

SMS Objects

SMS objects for RX and TX are basically the same deal, only difference is the "recipient" and "sender" subtables. If required, one can add an "smsc" subtable with a "num" value for the SMS Center number.

TX SMS Object contents

TXsmsobj={ -- This is what luapdu.newTx() returns
  msgReference=0,
  recipient={
    num  = ""
  },
  protocol = 0, -- Currently ignored
  decoding = 0, -- Currently ignored
  msg={
    content = ""
  }
}

RX SMS Object contents

RXsmsobj={ -- This is what luapdu.newRx() returns
  sender={
      num  = ""
  },
  protocol = 0, -- Currently ignored
  decoding = 0, -- Currently ignored
  timestamp = ("00"):rep(7),
  msg={
      content = ""
  }
}

About

Lua PDU SMS encoder/decoder

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages