-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathOSINTParser.py
75 lines (27 loc) · 775 Bytes
/
OSINTParser.py
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
#import necessary libraries
import pandas as pd
import os
import csv
import glob
import xlsxwriter
#path to parse to and read files from
path = "/Users/Omar/Documents/Scripts/OSINT Parser/"
#all files ending in .csv
all_files = glob.glob(os.path.join(path, "*.csv"))
#read data from each file
df_from_each_file = (pd.read_csv(f) for f in all_files)
#initialize writer
writer = pd.ExcelWriter('ParsedOSINT.xlsx', engine='xlsxwriter')
#write all files into excel
for f in all_files:
df = pd.read_csv(f)
df.to_excel(writer, sheet_name=os.path.basename(f))
#save written files
writer.save()
print("Parsing Complete")
#random number output
num = 5
for i in range(num):
square = num*num
print(square)
num = num-1