Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
cspell-trie
Advanced tools
Trie library for use with cspell
This library allows easily building of a Trie from a word list.
The resulting trie can then be compressed into a DAFSA|DAWG.
cspell-trie is both a tool and a library.
Give a list of words, cspell-trie will turn it into a trie file.
npm install -g cspell-trie
cspell-trie --help
cspell-trie create filename.txt -o filename.trie
cspell-trie reader filename.trie
TrieXv1
base=10
The header has two parts.
The first line of data is always a *
Each line is a node in the Trie.
The format of each line is:
star [char index [, char index]*]
In other words, each line has an optional *
followed by 0 or more (char, index) pairs.
A missing index implies an index of 0, which is the end of word flag.
Example Line: *s1,e
-- The word can stop here, or add an s and continue at node 1, or add an e
Word List:
becomes
Output: (Offsets are added for clarity, but do not exist in output)
Offset Output
------- --------
TrieXv1
base=10
0 *
1 d,r
2 g
3 n2
4 *e1,i3,s
5 k4
6 l5
7 a6
8 t7,w7
The root of the trie is the last offset, 8. It is designed for the entire trie to be in memory, which is why the root is at the end. This allows for efficiently building the trie as the file loads line by line, because each line can only refer to previous lines.
How to walk the data to see if "talks" is in it.
Available as part of the Tidelift Subscription.
The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. Learn more.
Brought to you by Street Side Software
FAQs
Trie Data Structure reader for cspell
We found that cspell-trie demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.