Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
= BlockChainable
== DESCRIPTION:
BlockChainable is a module to aid in the creation of Domain Specific Languages using block structure. By including BlockChainable into your classes, you will be able to instantiate that class using the class name itself, followed by any parameters to be passed to initialize, followed by a block to be executed within the instantiated class.
BlockChainable also allows methods to search up the chain of classes, meaning that although a block is executed in the scope of the instantiated class, any methods not found in the class but found in a class "up-scope" will be called successfully on the up-scope class. This chaining of method calls allows you to assert values within the blocks as well as calling any other methods from "up-scope" classes.
== FEATURES/PROBLEMS:
== SYNOPSIS:
require 'block_chainable'
class Foo include BlockChainable
def hi_from_foo
puts "hello from foo"
end
end
class Bar include BlockChainable
def hi_from_bar
puts "hello from bar"
end
end
class Boo include BlockChainable
def hi_from_boo
puts "hello from boo"
end
end
Foo do hi_from_foo
Bar do
hi_from_bar
hi_from_foo
Boo do
hi_from_boo
hi_from_bar
hi_from_foo
end
end
end
require 'block_chainable'
class Roster include BlockChainable
def initialize(subject)
@subject = subject
@students = []
end
def add_student_to_roster student
@students << student
end
def print_roster
puts "Roster for #{@subject}:"
@students.each{|s| puts " #{s}"}
end
end
class Student include BlockChainable
def add_to_roster
add_student_to_roster self
end
def to_s
"#{@last_name}, #{@first_name} - age #{@age}"
end
def first_name name
@first_name = name
end
def last_name name
@last_name = name
end
def age years
@age = years
end
end
Roster :Math do Student do first_name "Drew" last_name "Olson" age 25
add_to_roster
end
Student do
first_name "John"
last_name "Doe"
age 17
add_to_roster
end
Student do
first_name "Jane"
last_name "Doe"
age 19
add_to_roster
end
print_roster
end
== REQUIREMENTS:
== INSTALL:
== LICENSE:
(The MIT License)
Copyright (c) 2008 Drew Olson
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 block-chainable 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.