weltan / cloudbleed-1password

export your 1Password URLS, and see which of them are affected by cloudbleed! (https://bugs.chromium.org/p/project-zero/issues/detail?id=1139)
MIT License
31 stars 7 forks source link

Unclear instructions on where to place csv #5

Closed betogess506 closed 7 years ago

betogess506 commented 7 years ago

In step 5.move affectedItems.csv to this repo. are you talking about >cloudbleed-1password ? I added the file there but I continuously get

npm WARN package.json cloudbleed@0.0.1 No repository field.

weltan commented 7 years ago

Hi, I think this is a problem with a typo in the ReadMe, which has affectedItems rather than affectedSites.csv. When you rename it, does it work?

betogess506 commented 7 years ago

I just tried and unfortunately it doesn't:

Andres-MacBook-Pro:cloudbleed-1password Andre$ npm install npm WARN package.json cloudbleed@0.0.1 No repository field. Andres-MacBook-Pro:cloudbleed-1password Andre$ node index.js /Users/Andre/Desktop/Check urls/cloudbleed-1password/index.js:15 urls.forEach((originalUrl) => { ^^ SyntaxError: Unexpected token => at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3 Andres-MacBook-Pro:cloudbleed-1password Andre$

weltan commented 7 years ago

Hi Andres,

Your file is in the right place. I think you're getting that error because the arrow-function (originalUrl) => {} syntax is new in ECMA6 Javascript, and you probably have an old version of node installed.

Try typing node -v and see what version you have. You are probably on 4.X (needed version is v6.7.0+)

malcolmaking commented 7 years ago

Hi,

I am trying to run index.js but its failing with errror cloudbleed-1password/nodemodules/csv-parse/lib/index.js:389 throw Error("Invalid closing quote at line " + (this.lines + 1) + "; found " + (JSON.stringify(this..nextChar)) + " instead of delimiter " + (JSON.stringify(this.options.delimiter))); ^

Error: Invalid closing quote at line 350; found "s" instead of delimiter "," at Error (native) at Parser.__write (/Users/malcolmking/Desktop/cloudbleed-1password/node_modules/csv-parse/lib/index.js:389:19) at module.exports (/Users/malcolmking/Desktop/cloudbleed-1password/node_modules/csv-parse/lib/sync.js:26:10) at parseUrlsFromCsv (/Users/malcolmking/Desktop/cloudbleed-1password/index.js:26:13) at Object. (/Users/malcolmking/Desktop/cloudbleed-1password/index.js:10:8) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

I tried to look for the error in the index.js file but it did not fix the issue. Can anybody help here?

weltan commented 7 years ago

Ah interesting - looks like the script is having trouble parsing the CSV file you're giving it - it seems the input file may be malformed. Any small chance you exported as a .1pif instead of a CSV? If not that, it may be that one of the URLs that you exported has a comma, quote, or escape character in it.

Hope that helps.

weltan commented 7 years ago

Hey, any updates here?

malcolmaking commented 7 years ago

Sorry for the delay. It was not the filetype. For some reason, the exported list contained a few entries that had extra commas and extra spaces. Not sure why this was the case, but must have been a user error when manually logging password entries. This is now resolved. Thank you!