-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcaller.py
More file actions
executable file
·96 lines (84 loc) · 3.14 KB
/
caller.py
File metadata and controls
executable file
·96 lines (84 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# caller.py
#
# Copyright 2013 Wolf Halton <wolf@sourcefreedom.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
import time
from reader import process
def main():
''' How to use: either put the csv-edit folder in your dist-packages
folder or invoke caller on the command line from inside the
csv-edit folder. Current choices to use are "1" - to process your
raw Qualys csv output file, 88 for this help string and 99 to run
away.
'''
#--start constants--
__version__ = "0.0.0.1"
#--end constants--
choice = "chew"
filename=raw_input("enter the filename==> ")
qu = "all"
outFileT = ''
outFileL = ''
outFileC = ''
outFileQ = ''
outFileM = ''
outFileE = ''
current_db = filename[:-4]+'.db'
outdir = ''
qu = ''
outFileQ, outFileM, outFileE,
while choice != "swallow":
os_choice = "100099"
while os_choice != "99" :
print('\nEnter "1" Fully automates reader.process() module')
print(' ******************************')
print(' "88" Display Help File')
print(' "99" to exit the script')
os_choice = raw_input(' \n => ')
if os_choice == "1":
(filename, outdir, qu, outFileT, outFileL, outFileC, outFileQ, outFileM, outFileE, current_db) = process(filename, outdir, qu, outFileT, outFileL, outFileC, outFileQ, outFileM, outFileE, current_db)
# (filename, qu, outFileT, outFileL, outFileC, current_db) = process(filename, qu, outFileT, outFileL, outFileC, current_db)
elif os_choice == "88":
help_me()
elif os_choice == "99":
break
else: continue
print(" Input File = %s,\n Current Platform = %s,\n Output Title File = %s\n Output Label File = %s,\n Output Content File = %s" % (filename, qu, outFileT, outFileL, outFileC))
run_away = raw_input("if you would like to run with a different source-file, type 'y'\nIf you would like to run away, type 'r' :=> ")
if run_away == 'y':
filename=raw_input("enter the filename==> ")
elif run_away == 'r':
print("Thanks for using the csv-edit scripts.")
time.sleep(7)
choice = "swallow"
else:
print("Either 'y' or 'r' please")
return 0
def help_me():
print('''
How to use: either put the csv-edit folder in your dist-packages
folder or invoke caller on the command line from inside the
csv-edit folder. Current choices to use are "1" - to process your
raw Qualys csv output file, 88 for this help string and 99 to run
away.''')
if __name__ == '__main__':
main()