{"id":21816236,"url":"https://github.com/badlee/scriptbox","last_synced_at":"2025-07-15T05:33:28.143Z","repository":{"id":16649146,"uuid":"19404540","full_name":"badlee/scriptbox","owner":"badlee","description":"Script box is a full VAS application for demonstrate kannel.js, shorty and smpp usage","archived":false,"fork":false,"pushed_at":"2022-12-07T07:21:28.000Z","size":7879,"stargazers_count":21,"open_issues_count":16,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-15T02:38:07.080Z","etag":null,"topics":["gateway","kannel","nodejs-server","scriptbox","smpp-client","sms","sms-service"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badlee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-03T14:18:03.000Z","updated_at":"2024-09-14T13:42:49.000Z","dependencies_parsed_at":"2023-01-11T20:00:40.007Z","dependency_job_id":null,"html_url":"https://github.com/badlee/scriptbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/badlee/scriptbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badlee%2Fscriptbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badlee%2Fscriptbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badlee%2Fscriptbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badlee%2Fscriptbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badlee","download_url":"https://codeload.github.com/badlee/scriptbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badlee%2Fscriptbox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261990350,"owners_count":23241187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gateway","kannel","nodejs-server","scriptbox","smpp-client","sms","sms-service"],"created_at":"2024-11-27T15:32:45.730Z","updated_at":"2025-07-15T05:33:28.046Z","avatar_url":"https://github.com/badlee.png","language":"HTML","readme":"----------\n\n# ScriptBox SMS gateway\n\n----------\n#### Instalation \n\n```sh\n npm install -g scriptbox\n```\n\n*[For contributors see detailed instructions here](https://github.com/badlee/scriptbox/wiki/Install-Instructions)*\n\n#### How use\n\n\u003e In first you need configure the scriptbox\n\n\u003e `scriptbox config`\n\n\u003e After config, run scriptBox\n\u003e `scriptbox start`\n\n\u003e By default scriptBox listen the port 13014\n\n\u003e Goto to http://127.0.0.1:13014 for the dashboard\n\n\u003e Goto to http://127.0.0.1:13014/admin for administrate\n\n\u003e Default user\n\n\u003e the administrator : login: **oshimin**, password: **secret**\n\n\u003e the active user : login: **bob**, password: **secret** \n\n\u003e the unactive user : login: **joe**, password: **secret** \n\n#### Explain SMS service philosophy\n\u003e Each SMS service is a 'Mot Cle' (keyword in english)\n\n\u003e Each Mot Cle must be link to a script\n\n\u003e Each Mot Cle must be have a validtor expression(RegEx)\n\n\u003e Each Mot Cle must be have a reject expression(RegEx)\n\n\u003e A service can rewrite SMS, with Rewriter script.\n\n\u003e The Rewriter script it's only for modify sms value, it run in an isolate js context and the runing time cannot exced  25ms.\n\n#### Add a script\n\u003e Click on \"Main Menu\" \u003e \"Script\" \u003e \"Ajouter\"\nFill nom(name), description and script (javascript programme), set Module \"off\".\n\n###### Sample script\n```javascript\n//Nom: echo\n//Description : Echo SMS\n//Module : OFF\nvar message = new MSG(sms); // build a new sms\nmessage.sendSMS(); // send message to the sender\n```\nthis script resend the recieved message .\n\n#### Add a module\n\u003e Click on \"Main Menu\" \u003e \"Script\" \u003e \"Ajouter\"\nFill nom(name), description and script (javascript programme), set Module \"on\".\n\n###### Sample module\n```javascript\n//Nom: gabonNumber\n//Description : Validate gaboneese numbers\n//Module : ON\n/*Your script Here*/\nexports.airtel = /^((\\+|00)?241)?0(4|7)\\d{6}$/;\nexports.libertis = /^((\\+|00)?241)?0(2|6)\\d{6}$/;\nexports.moov = /^((\\+|00)?241)?05\\d{6}$/;\nexports.GT = /^((\\+|00)?241)?(01)?\\d{6}$/;\n```\nthis module can be used in script  `numeros = require('gabonNumber');`\n\n###### Sample script who use module\n```javascript\n//Nom: hello\n//Description : Send Hello SMS and get information network\n//Module : OFF\nvar num = require(\"gabonNumber\");\nlogger.log(sms.sender); // logger is like `console` in nodejs \n// sms contain the SMS object \nvar m = new MSG(sms);\nm.msgdata = \"Hello SMS!\";\nif(num.airtel.test(sms.sender))\n\tm.msgdata += \" - Airtel\";\nelse if(num.libertis.test(sms.sender))\n\tm.msgdata += \" - Libertis\";\nelse if(num.moov.test(sms.sender))\n\tm.msgdata += \" - MOOV\";\nelse if(num.GT.test(sms.sender))\n\tm.msgdata += \" - GT\";\nelse \n\tm.msgdata += \" - Unknow\";\n\nm.sendSMS();\n```\n\u003e You can juste create a Mot Cle (keyword) , and send sms for test it;\n```javascript\n    Nom : test\n    Script : hello\n    Validateur SMS : Oui\n    Reject Sender : Non\n```\n\n\n#### Add an expression\n\u003e Click on \"Main Menu\" \u003e \"Expression\" \u003e \"Ajouter\"\n\u003e Fill nom(name), Validateur(RegExp), Choose Option\n\n###### Sample expression\n```javascript\n    Nom : Oui\n    Validateur (?:) =\u003e /(?:)/ =\u003e allways true\n    \n    Nom : Non\n    Validateur ^[^\\w\\W]$ =\u003e /^[^\\w\\W]$/ =\u003e allways false\n\n    Nom : Gaboneese number\n    Validateur ^((00|\\+)?241)0[1234567]\\d{6} =\u003e /^((00|\\+)?241)0[1234567]\\d{6}/ =\u003e allways start by 241,+241 or 00241\n```\n\n#### Add a connector\n\u003e Click on \"Main Menu\" \u003e \"Connecteor\" \u003e \"Ajouter\"\n\u003e Fill Identifiant(name), Choose Type\n\n###### Sample connector\n```javascript\n    Nom : KANNEL\n    Type : KANNEL\n```\n\n###### Sample Connfig connector\n```javascript\n    host : 127.0.0.1\n    Port : 13013\n    id : LoveIsMyReligion\n    tls : false\n```\n###### Start a connector\n\u003e Click on \"Main Menu\" \u003e \"Connecteor\" \u003e \"List\" \u003e Start Server\n\n###### Stop a connector\n\u003e Click on \"Main Menu\" \u003e \"Connecteor\" \u003e \"List\" \u003e Stop Server\n\n#### Add an Mot cle(keyword)\n\u003e Click on \"Main Menu\" \u003e \"Mot cle\" \u003e \"Ajouter\"\n\n\u003e Fill nom(name), choose Script, Validateur SMS(Check SMS format),Reject Sender(check sender), \"Numeros Courts(short Code allowed, no select for all short Codes)\n\n###### Sample Mot Cle\n```javascript\n    Nom : hello\n    Script : hello\n    Validateur SMS : Oui\n    Reject Sender : Non\n    Rewriter Script : /*Empty*/\n```\n\n#### Test Script\nConfigue and start the connector (SMPP or kannel) and send \"hello\" to the connector, scriptbox willl reply \"Hello SMS\"\n\n#### TODO\n\n - More documentation\n - More samples (Ex. voting system)\n - Routing system\n - Script installer for production instance \n \n#### Screen Capture\n![Capture 9][9]\n\n![Capture 2][2]\n\n![Capture 1][1]\n\n![Capture 3][3]\n\n![Capture 4][4]\n\n![Capture 5][5]\n\n![Capture 6][6]\n\n![Capture 7][7]\n\n![Capture 8][8]\n\n#### LICENCE\n\n\u003e(The MIT License)\n\n\u003eCopyright (c) 2007-2009 Ulrich Badinga \u0026lt;badinga.ulrich@gmail.com\u0026gt;\n\n\u003ePermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\n\u003eThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\n\u003eTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n  [1]: https://raw.githubusercontent.com/badlee/scriptbox/master/media/Capture-1.png\n  [2]: https://raw.githubusercontent.com/badlee/scriptbox/master/media/Capture-2.png\n  [3]: https://raw.githubusercontent.com/badlee/scriptbox/master/media/Capture-3.png\n  [4]: https://raw.githubusercontent.com/badlee/scriptbox/master/media/Capture-4.png\n  [5]: https://raw.githubusercontent.com/badlee/scriptbox/master/media/Capture-5.png\n  [6]: https://raw.githubusercontent.com/badlee/scriptbox/master/media/Capture-6.png\n  [7]: https://raw.githubusercontent.com/badlee/scriptbox/master/media/Capture-7.png\n  [8]: https://raw.githubusercontent.com/badlee/scriptbox/master/media/Capture-8.png\n  [9]: https://raw.githubusercontent.com/badlee/scriptbox/master/media/Capture-9.png\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadlee%2Fscriptbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadlee%2Fscriptbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadlee%2Fscriptbox/lists"}