
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
A Ruby interface to the PSWinCom SMS Gateway.
gem install pswincom
To use this gem, you will need sign up for a Gateway account with PSWinCom. Demo account are available.
This piece of code demonstrates how to send a simple SMS message:
require 'rubygems'
require 'pswincom'
api = PSWinCom::API.new 'username', 'password'
api.send_sms 4712345678, 'This is a test SMS'
You can also send multiple messages in a single request, like this:
api = PSWinCom::API.new 'username', 'password'
api.add_sms 4712345678, 'This is a test SMS'
api.add_sms 4712345679, 'This is another test SMS'
api.send_sms
Receiver and message text are the two mandatory properties when sending a message. You may specify additional properties by using a hash as the last argument to send_sms
.
For instance this is how you would specify a sender:
api.send_sms 4712345678, 'This is a test', :sender => 'Ruby'
Properties currently supported are:
The gem is set to use a particular PSWinCom SMS Gateway by default. The host can be changed globaly by setting api_host:
PSWinCom::API.api_host = 'http://some.server/sms'
For testing purposes the API provides a couple of modes you can set globally to control how the gem works.
PSWinCom::API.test_mode = true
.. will make you use the API without actually sending any messages.
PSWinCom::API.debug_mode = true
.. will make the API output debug information to standard out.
The PSWinCom gem also comes with a command-line tool that will allow you to send an SMS directly from the command-line.
To simplify the usage of the tool you may create a YAML configuration file in your home directory, in a file called .pswincom that resembles the following:
username: your_username
password: your_password
from: your_nick_or_something
host: optionally_override_api_host
If you don't provide these options in the .pswincom file, you can specify them directly at the command-line.And only username and password are required. Run 'sms' without any arguments for a full list of options.
You can then use the sms tool to send a message:
sms 4712345678 "Message from PSWinCom"
This code is free to use under the terms of the MIT license.
FAQs
Unknown package
We found that pswincom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.