
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
github.com/mcustiel/go-graph
Implements a general graph ADT in Go
This project is part of my "learn go" projects
graph.New(*Node) *Graph
- Creates a new graph using the given node as start point for traversing methods.graph.NewNode(interface{}) *Node
- Creates a new node contained a given value.(*Node) AddAdyacent(*Node)
- Makes the given node adyacent to the current one(*Node) RemoveAdyacent(*Node)
- Removes the given node from the current one. (TODO: return the removed node)(*Node) GetIterator() func() *Node
- Returns an iterator function that will return the next adyacent node each time is called until nil.(*Node) Value() interface{}
- Returns the value stored in the current node. You should convert it to the expected type.(*Node) Adyacents() *list.List
- Returns the adyacents node as a Go's double linked list.(*Graph) Walk(func(*Node))
- Walks all the graph nodes without specific order and executes the given function for each of them.(*Graph) Bfs(func(*Node))
- Traverses the graph using BFS algorithm and executes the given function for each node.(*Graph) Dfs(func(*Node))
- Traverses the graph using DFS algorithm and executes the given function for each node.// GetDirectoryContentents(dirName) should be implemented returning []os.FileInfo
func ScanDirToTree(dirName string) *graph.Graph {
var function func(string) *graph.Node
function = func(curDir string) *graph.Node {
node := graph.NewNode(curDir)
for _, file := range GetDirectoryContents(curDir) {
if file.IsDir() {
node.AddAdyacent(function(curDir + string(os.PathSeparator) + file.Name()))
}
}
return node
}
return graph.New(function(dirName))
}
graphInstance := ScanDirToTree("some/directory/path")
graphInstance.Bfs(func(node *graph.Node) {
fmt.Println(node.Value().(string))
})
FAQs
Unknown package
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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.