
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
WowDBC is a high-performance Ruby gem for reading and manipulating World of Warcraft DBC (Database Client) files. 🚀
Add this line to your application's Gemfile:
gem 'wow_dbc'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install wow_dbc
Here's a quick example of how to use WowDBC:
require 'wow_dbc'
# Correct field names for the Item.dbc file
field_names = {
id: :uint32,
class: :uint32,
subclass: :uint32,
sound_override_subclass: :int32,
material: :uint32,
displayid: :uint32,
inventory_type: :uint32,
sheath_type: :uint32
}
# Open the Item.dbc file
dbc = WowDBC::DBCFile.new('path/to/your/Item.dbc', field_names)
dbc.read
# Find a specific item (e.g., Warglaive of Azzinoth, ID: 32837)
warglaive = dbc.find_by(:id, 32837).first
puts "Warglaive of Azzinoth: #{warglaive}"
# Update a single field of the Warglaive
dbc.update_record(warglaive[:id], :sheath_type, 3) # Assuming 3 represents a different sheath type
# Update multiple fields of the Warglaive
dbc.update_record_multi(warglaive[:id], { material: 5, inventory_type: 17 }) # Assuming 5 is a different material and 17 is Two-Hand
# Create a new empty item record
new_item_index = dbc.create_record
puts "New empty item index: #{new_item_index}"
# Create a new item record with initial values
initial_values = {
id: 99999,
class: 2, # Weapon
subclass: 7, # Warglaives
sound_override_subclass: -1, # No override
material: warglaive[:material],
displayid: warglaive[:displayid],
inventory_type: 17, # Two-Hand
sheath_type: 3
}
new_item_index = dbc.create_record_with_values(initial_values)
puts "New custom item index: #{new_item_index}"
# Read the newly created item
new_item = dbc.get_record(new_item_index)
puts "Newly created item: #{new_item}"
# Delete an item (be careful with this!)
# dbc.delete_record(new_item_index)
# Write changes back to the same file(update)
dbc.write
# Write to a new file
dbc.write_to('path/to/your/NewItem.dbc')
# Reading header information
header = dbc.header
puts "Total items: #{header[:record_count]}"
puts "Fields per item: #{header[:field_count]}"
# Finding all two-handed weapons
two_handed_weapons = dbc.find_by(:inventory_type, 17) # 17 represents Two-Hand weapons
puts 'Two-handed weapons:'
two_handed_weapons.each do |item|
puts "Item ID: #{item[:id]}, Class: #{item[:class]}, Subclass: #{item[:subclass]}, Display ID: #{item[:displayid]}"
end
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/sebyx07/wow_dbc. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)The gem is available as open source under the terms of the MIT License.
Everyone interacting in the WowDBC project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Happy coding, and may your adventures in Azeroth be bug-free! 🐉✨
FAQs
Unknown package
We found that wow_dbc demonstrated a healthy version release cadence and project activity because the last version was released less than 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.