Skip to content

Commit

Permalink
Update rollup-plugin-server.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyasrinivas11 committed Jan 21, 2022
1 parent 80ab1b9 commit 82e1067
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ test("Path Traversal in rollup-plugin-server", (done) => {
const fs = require("fs");
const { exec } = require("child_process");
let hostsFile = fs.readFileSync(pathToFlag).toString();

const a = require("child_process");
try{
a.execSync('fuser -k 9000/tcp',()=>{})
}
catch(e){}
server({
host: "localhost",
port: 9000,
Expand All @@ -20,6 +24,9 @@ test("Path Traversal in rollup-plugin-server", (done) => {

exec(attack_string, (error, stdout) => {
expect(stdout).toBe(hostsFile);
done();
// a.execSync('fuser -k 9000/tcp',()=>{
done();
// })

});
});

0 comments on commit 82e1067

Please sign in to comment.