Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Via rubygems.org:
$ gem install livechat_client
To build and install the development branch yourself from the latest source:
$ git clone git@github.com:cxz/livechat_client.git
$ cd livechat_client
$ git checkout -b develop
$ rake gem
$ gem install pkg/livechat_client-{version}
Basic Auth over HTTPS is used to authenticate API requests.
require "livechat"
@livechat = LiveChat::REST::Client.new do |config|
config[:login] = "joe@example.com"
config[:api_key] = ""
end
List all agents
@livechat.agents.list # all agents
@livechat.agents.each {|a| ..code.. } # iterate over requested agents
Get a single agent details
@livechat.agents('john.doe@mycompany.com')
Create a new agent
@livechat.agents.create do |a|
a[:login] = @alice_id
a[:name] = 'Alice'
end
Update an agent
@livechat.agents(@jane_id).update do |a|
a[:job_title] = 'Tester'
a[:status] = 'not accepting chats'
end
Reset an API key
@livechat.agents('john.doe@mycompany.com').reset_api_key
Remove an agent
@livechat.agents('john.doe@mycompany.com').delete
List all canned responses
@livechat.canned_responses.list
Get a single canned response
@livechat.canned_responses(3151)
Create a new canned response
@livechat.canned_responses.create do |r|
r[:text] = 'Have a great day, goodbye.'
r[:tags] = ['cu', 'bye']
end
Update a canned response
@livechat.canned_responses(3151).update do |r|
r[:tags] = ['bye']
end
Remove a canned response
@livechat.canned_responses(3151).delete
Get list of chats
@livechat.chats.list
Get single chat
@livechat.chats('MH022RD0K5')
Send chat transcript to e-mail
@livechat.chats('MH022RD0K5').send_transcript(:to => 'john.doe@mycompany.com')
List all goals
@livechat.goals.list
Get a single goal details
@livechat.goals(1181)
Mark goal as successful
@livechat.goals(1181).mark_as_successful(:visitor_id => 1)
Add a new goal
@livechat.goals.create do |goal|
goal[:name] = 'new goal'
goal[:type] = 'url'
end
Update a goal
@livechat.goals(2231).update do |goal|
goal[:name] = 'updated goal'
end
Remove a goal
@livechat.goals(2231).delete
List all groups
@livechat.groups.list
Get a single group details
@livechat.groups(2)
Create a new group
@livechat.groups.create do |goal|
group[:name] = 'Human Resources'
group[:agents] = ['jenny.doe@mycompany.com', 'john.doe@mycompany.com']
end
Update a group
@livechat.groups(3).update do |goal|
group[:name] = 'Quality Assurance'
group[:agents] = ['jane.doe@mycompany.com']
end
Remove a group
@livechat.groups(4).delete
Get dashboard data
@livechat.reports.dashboard
Get dashboard data for agent
@livechat.reports.dashboard(:agent => 'john.doe@mycompany.com')
Get dashboard data for group
@livechat.reports.dashboard(:group => 1)
Get chats report
@livechat.reports.chats(:date_from => '2013-01-01')
Get ratings report
@livechat.reports.ratings(:group => 1)
Get ratings ranking
@livechat.reports.ratings_ranking(:group => 1)
Get queued visitors report
@livechat.reports.queued_visitors(:date_from => '2013-01-01')
Get queue waiting times report
@livechat.reports.queued_visitors_waiting_times(:date_from => '2013-01-01')
Get availability report
@livechat.reports.availability
Get chatting time report
@livechat.reports.chatting_time
Get goals report
@livechat.reports.goals
Get status
@livechat.status(:group => 0)
List all visitors
@livechat.visitors.list
List only chatting visitors
@livechat.visitors.chatting
Add custom visitor details
@livechat.visitors('S1352647457.ac951bfe2e').add_details do |detail|
detail[:license_id] = '12345'
detail[:token] = '26132406c42c96ba61ed42689b70f719'
detail[:id] = 'my-app'
detail[:fields] = [{:name => 'Age', :value => 36}]
end
Ways you can help:
Copyright (c) 2013 Alexandre Maia
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Unknown package
We found that livechat_client 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.