Skip to content

Commit e6a87f1

Browse files
committed
fixed csv stripping write bug
1 parent aa35752 commit e6a87f1

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

modules/check_macs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash
22
testip=example.com
3-
maccount=$(($2-1))
3+
maccount=$(($2))
44
interface=$3
5-
interfacemon="${interface}mon"
65

76
if [ $# -eq 3 ]
87
then

modules/stripmacs.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,11 @@
6060

6161
print(str(counter)+". "+str(row[0])) # say we've found a mac
6262

63-
if (counter > 1): # this ensures there's no blank lines
64-
outputFile.write("\n")
63+
outputFile.write(row[0]+'\n') # write mac to file
6564

66-
outputFile.write(row[0]) # write mac to file
6765
counter = counter + 1
6866

69-
print("Found",counter,"MAC addresses!")
67+
print("Found",counter,"associated MAC addresses!")
7068

7169
inputFile.close()
7270
outputFile.close()

0 commit comments

Comments
 (0)