
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
liamloads-reverse-endianness
Advanced tools
Reverse hexadecimal string endianness with JavaScript.
This is a fast algorithm for reversing byte order endianness of hexadecimal numbers without regular expressions.
It's written in JavaScript and outputs a case-insensitive, even-number hexadecimal string
in reverse byte order.
A complete line-by-line algorithm code explanation is coming soon.
git clone https://github.com/liamloads/javascript-reverse-endianness.git
<script src="liamloads-reverse-endianness.js" type="text/javascript"></script>
npm install liamloads-reverse-endianness
const liamloadsReverseEndianness = require('liamloads-reverse-endianness');
The return value is a string
of the argument in reverse byte order.
If the argument isn't a hexadecimal number or if the UTF-16 code unit length exceeds 999999999
, the return value is false
.
console.log(liamloadsReverseEndianness('123456789'));
// '8967452301'
console.log(liamloadsReverseEndianness('0123456789'));
// '8967452301'
console.log(liamloadsReverseEndianness('abcdef'));
// 'efcdab'
console.log(liamloadsReverseEndianness('ABCDEF'));
// 'EFCDAB'
console.log(liamloadsReverseEndianness('abcdef '));
// false
console.log(liamloadsReverseEndianness('abcdefg'));
// false
FAQs
Reverse hexadecimal string endianness with JavaScript.
The npm package liamloads-reverse-endianness receives a total of 0 weekly downloads. As such, liamloads-reverse-endianness popularity was classified as not popular.
We found that liamloads-reverse-endianness 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 RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.