1 parent 2b3987f commit 0bd3ccfCopy full SHA for 0bd3ccf
1 file changed
db_lookup_v1.5.py
@@ -0,0 +1,23 @@
1
+#!/usr/bin/env python
2
+#|---------------------------------------------------------------|#
3
+#| Usage: python db_lookup.py <database.sql> <string_to_search> |#
4
+#| Simple database lookup | by Chris Poole |#
5
6
+
7
+import sys
8
9
+if len(sys.argv) < 2:
10
+ sys.exit("\033[37mUsage: python "+sys.argv[0]+" <database.sql> <string_to_search>")
11
12
+print '''\033[32m
13
+| --: Please enter username/email/password or any :-- |
14
+| --: string you want to look for. :-- |
15
+\033[37m'''
16
+print("\033[31m| --: Devloped by Chris Poole | @codingplanets :-- |\033[37m")
17
18
+string = str(sys.argv[2])
19
20
+with open(sys.argv[1], 'r') as data:
21
+ for grep in data:
22
+ if string in grep:
23
+ print grep
0 commit comments