
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
bougyman-freeswitcher
Advanced tools
A ruby library for interacting with the "FreeSWITCH" (http://www.freeswitch.org) opensource telephony platform
Simply just create a subclass of FSR::Listner::Outbound and all new calls/sessions will invoke the "session_initiated" callback method.
NOTE: FSR uses blocks within the 'session_inititated' method to ensure that the next "freeswich command" is not executed until the previous "Freeswitch command" has finished. This is kicked off by "answer do"
#!/usr/bin/ruby require 'fsr' require 'fsr/listener/outbound'
class OutboundDemo < FSR::Listener::Outbound
def session_initiated
exten = @session.headers[:caller_caller_id_number]
FSR::Log.info "*** Answering incoming call from #{exten}"
answer do
FSR::Log.info "***Reading DTMF from #{exten}"
read("/home/freeswitch/freeswitch/sounds/music/8000/sweet.wav", 4, 10, "input", 7000) do |read_var|
FSR::Log.info "***Success, grabbed #{read_var.strip} from #{exten}"
# Tell the caller what they entered
speak("Got the DTMF of: #{read_var}") do
#Hangup the call
hangup
end
end
end
end
end
FSR.start_oes! OutboundDemo, :port => 8084, :host => "127.0.0.1"
#!/usr/bin/ruby require 'pp' require 'fsr' require "fsr/listener/inbound"
FSL::Inbound.add_event_hook(:CHANNEL_CREATE) {|event| FSR::Log.info "*** [#{event.content[:unique_id]}] Channel created - greetings from the hook!" }
def custom_channel_hangup_handler(event) FSR::Log.info "*** [#{event.content[:unique_id]}] Channel hangup. The event:" pp event end
FSL::Inbound.add_event_hook(:CHANNEL_HANGUP) {|event| custom_channel_hangup_handler(event) }
FSR.start_ies!(FSL::Inbound, :host => "localhost", :port => 8021)
#!/usr/bin/ruby require 'pp' require 'fsr' require "fsr/listener/inbound"
class IesDemo < FSR::Listener::Inbound
def on_event(event)
pp event.headers
pp event.content[:event_name]
end
end
FSR.start_ies!(IesDemo, :host => "localhost", :port => 8021, :auth => "ClueCon")
irb(main):001:0> require 'fsr' => true
irb(main):002:0> FSR.load_all_commands => [:sofia, :originate]
irb(main):003:0> sock = FSR::CommandSocket.new => #<FSR::CommandSocket:0xb7a89104 @server="127.0.0.1", @socket=#TCPSocket:0xb7a8908c, @port="8021", @auth="ClueCon">
irb(main):007:0> sock.originate(:target => 'sofia/gateway/carlos/8179395222', :endpoint => FSR::App::Bridge.new("user/bougyman")).run => {"Job-UUID"=>"732075a4-7dd5-4258-b124-6284a82a5ae7", "body"=>"", "Content-Type"=>"command/reply", "Reply-Text"=>"+OK Job-UUID: 732075a4-7dd5-4258-b124-6284a82a5ae7"}
Home page at http://code.rubyists.com/projects/fs #rubyists on FreeNode
FAQs
Unknown package
We found that bougyman-freeswitcher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.