
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
seek-and-replace
Advanced tools
Find and replace string occurrences in directories, files and fileContent.
Find and replace string occurrences in directories, files and fileContent.
We create a SeekAndReplace instance by providing two paramters:
{ key, replacement }
objects defining what key to search for and with which value to replace it withconst namespace = 'OLLIE';
const replacePath = './src';
const keyDefinitions = [
{
key: 'NAME',
replacement: 'naampie',
}, {
key: 'AUTHOR',
replacement: 'Jimmy',
},
];
const replacer = new SeekAndReplace(namespace, replacePath, keyDefinitions);
A SeekAndReplace instance has 1 key functionality: replace! When calling instance.replace()
all directories, files and file contents starting at the replacePath will be scanned and replaced with all key definitions.
SeekAndReplace exposes a static method smartReplace
which is used by the SeekAndReplace instance but can also be used outside separately.
SeekAndReplace.smartReplace(namespace, string, key, replacement)
Key definitions can have smart transformations applied to it. The format is _OLLIE_NAME_TRANSFORMATION_
.
The following transformations are supported:
Definition | Example |
---|---|
none | Point of Sale |
_AS_DOMAIN_ | pointofsale |
_WITHOUT_SPACES_ | PointofSale |
_LOWER_CASE_ | point of sale |
_UPPER_CASE_ | POINT OF SALE |
_SNAKE_CASE_ | point_of_sale |
_CAMEL_CASE_ | pointOfSale |
_KEBAB_CASE_ | point-of-sale |
_START_CASE_ | Point Of Sale |
FAQs
Find and replace string occurrences in directories, files and fileContent.
The npm package seek-and-replace receives a total of 5 weekly downloads. As such, seek-and-replace popularity was classified as not popular.
We found that seek-and-replace 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
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.