
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Welcome everyone to your Ruby Gem CocRb. By using this gem you can easily interact with the Game API of Clash of Clans without using any external gems to call this service.
Add this line to your application's Gemfile:
gem 'cocRb'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install cocRb
status: This is default set to false on every method except verify_PlayerByToken method. The method Parameter takes any String as an arguement. Returns => Status Code for a method
_limit: This is also set to false. You can limit any request where limit parameter is available for a method. Paramter Data Type => Integer
CocRb Gem is categorized with Classes and Methods as below down you can see but before accessing any of those we have to set Configuration in order to setup the Authorization for accessing the Clash of Clans API so to do that we have set Configure block and inside that block we have configured our TOKEN and the URL.
token = <Your_Token>
requestUrl = <Your_Url>
CocRb.configure do |config|
config.token = token
config.url = requestUrl
end
After done setting up the Authorization we now need to call the API as you can see down below we called the API using call_API method now just before that line we have set the class ClashApi by name_spacing with CocRb Module.
Note: All the data that we will get from the API response was in JSON but since you are using this gem all of the responses has been parsed to Ruby Hashes so that its get easy for you to access the data.
set_Class = CocRb::ClashApi
response = set_Class.call_API
puts response
# data from the API in Ruby Hashes...
The API can also be called without using the URL in the Configuration block the way you can do is shown down below. As you can we have almost followed the same procedure like we did before just changed few things those are we have removed the config.url line, We now have called a new class and a method. This method now takes two parameters one is your Player Tag and another thing is your Player API Token which you will find In-Game Settings.
CocRb.configure do |config|
config.token = token
end
set_var = CocRb::Player
response = set_var.verify_PlayerByToken(tag: "#PG8RLGQ2", playertoken: "7jeagw4c")
# Response => {"tag"=>"#PG8RLGQ2", "token"=>"7jeagw4c", "status"=>"ok"}
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that cocRb 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.