├── .browserslistrc ├── public ├── favicon.ico └── index.html ├── vue.config.js ├── src ├── assets │ ├── logo.png │ └── logo.svg ├── plugins │ └── vuetify.js ├── main.js ├── fbConfig.js ├── processor.py └── App.vue ├── babel.config.js ├── .gitignore ├── .eslintrc.js ├── README.md ├── package.json └── scryptTool.html /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidacm/bcrCardVerifier/master/public/favicon.ico -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "transpileDependencies": [ 3 | "vuetify" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidacm/bcrCardVerifier/master/src/assets/logo.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/plugins/vuetify.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuetify from 'vuetify/lib'; 3 | 4 | Vue.use(Vuetify); 5 | 6 | export default new Vuetify({ 7 | }); 8 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import vuetify from './plugins/vuetify'; 4 | 5 | 6 | Vue.config.productionTip = true 7 | 8 | new Vue({ 9 | vuetify, 10 | render: h => h(App) 11 | }).$mount('#app') 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | *.code-workspace -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | 'eslint:recommended' 9 | ], 10 | parserOptions: { 11 | parser: 'babel-eslint' 12 | }, 13 | rules: { 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # bcrcards 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | Artboard 46 2 | -------------------------------------------------------------------------------- /src/fbConfig.js: -------------------------------------------------------------------------------- 1 | import firebase from 'firebase/app'; 2 | import 'firebase/database'; // If using Firebase database 3 | var config = { 4 | apiKey: "AIzaSyAC35ubCOotpc9tA0vRshxfTEqMisjONHA", 5 | authDomain: "test2-511fa.firebaseapp.com", 6 | databaseURL: "https://test2-511fa.firebaseio.com", 7 | projectId: "test2-511fa", 8 | storageBucket: "test2-511fa.appspot.com", 9 | messagingSenderId: "731937336766", 10 | appId: "1:731937336766:web:8ef6034f39c316d85cddef" 11 | }; 12 | firebase.initializeApp(config); 13 | var db = firebase.database(); 14 | const hashesCollection = db.ref("hashes"); 15 | 16 | export { db, hashesCollection } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bcrcards", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint", 9 | "deploy": "node ./node_modules/vue-gh-pages/index.js -b gh-pages" 10 | }, 11 | "dependencies": { 12 | "core-js": "^3.6.5", 13 | "firebase": "^7.14.6", 14 | "scrypt-js": "^3.0.1", 15 | "vue": "^2.6.11", 16 | "vuetify": "^2.2.11" 17 | }, 18 | "devDependencies": { 19 | "@vue/cli-plugin-babel": "~4.4.0", 20 | "@vue/cli-plugin-eslint": "~4.4.0", 21 | "@vue/cli-service": "~4.4.0", 22 | "babel-eslint": "^10.1.0", 23 | "eslint": "^6.7.2", 24 | "eslint-plugin-vue": "^6.2.2", 25 | "sass": "^1.19.0", 26 | "sass-loader": "^8.0.0", 27 | "vue-cli-plugin-vuetify": "~2.0.5", 28 | "vue-gh-pages": "^1.19.1", 29 | "vue-template-compiler": "^2.6.11", 30 | "vuetify-loader": "^1.3.0" 31 | }, 32 | "homepage": "https://github.com/davidacm/bcrCardVerifier" 33 | } 34 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Verificador de tarjetas filtradas 9 | 21 | 24 | 25 | 26 | 27 | 28 | 31 |
32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/processor.py: -------------------------------------------------------------------------------- 1 | import base64, hashlib, json, re 2 | 3 | salt = b'c8m.qp+xv3*rhfUz' 4 | hashFunction = lambda x: base64.b64encode(hashlib.scrypt(x.encode('mbcs'), salt=salt, n=128, r=8, p=1)).decode("UTF-8") 5 | 6 | cardExp = re.compile(r",\d{8,23}=") 7 | cards = set() 8 | total = 0 9 | notFound = [] 10 | hashes = set() 11 | fileBufferSize = 5*2**20 12 | 13 | def processData(f): 14 | global cards, total 15 | f= open(f, "r", fileBufferSize, "UTF-8") 16 | for k in f: 17 | r= cardExp.search(k) 18 | if r: 19 | cards.add(r.group(0)[1:-1]) 20 | total+=1 21 | else: notFound.append(k) 22 | f.close() 23 | 24 | def hasher(s): 25 | global hashes 26 | for k in s: 27 | tmp = hashFunction(k) 28 | if tmp in hashes: 29 | print ("error, hash collision, total hashes: ", len(hashes)) 30 | break 31 | hashes.add(tmp) 32 | 33 | def saveHashes(f): 34 | f= open(f, "w", fileBufferSize, "UTF-8") 35 | json.dump(list(hashes), f, indent=0) 36 | f.close() 37 | 38 | 39 | def process(fList, fOut): 40 | for k in fList: 41 | print ("process file", k) 42 | processData(k) 43 | print ("file processed, length set: ", len(cards)) 44 | print("hashing set") 45 | hasher(cards) 46 | print ("saving data") 47 | saveHashes(fOut) 48 | print("finished!") 49 | 50 | # escape characters to enable compatibility with firebase keys. 51 | replacements = {'.': '1', 52 | '$': '2', 53 | '#': '3', 54 | '/': '4', 55 | '[':'5', 56 | ']': '6'} 57 | 58 | def escapeCharacters(s): 59 | s= s.replace("%", "%0") 60 | for k in replacements: s= s.replace(k, "%" +replacements[k]) 61 | return s 62 | 63 | def unescapeCharacters(s): 64 | for k in replacements: s = s.replace("%" +replacements[k], k) 65 | return s.replace("%0", "%") -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 133 | 134 | 218 | 219 | 244 | 245 | -------------------------------------------------------------------------------- /scryptTool.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Scrypt tool 8 | 499 | 505 | 506 | 507 | 508 | 509 |
510 | 511 | 512 | 513 | 514 | 515 |

Parámetros de ajuste para el algoritmo scrypt

516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 |
527 | 528 | 529 | 530 | --------------------------------------------------------------------------------