Skip to content

Commit 2a3cd41

Browse files
committed
Added adjustment for display corners to line up
1 parent 7289861 commit 2a3cd41

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

searchsploit.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,10 @@ def searchsploitout():
409409
# xx building terminal look
410410
# the magic number to decide how much space is between the two subjects
411411
lim = int((COL - 3)/2)
412+
413+
# manipulate limit if ID is used
414+
if parseArgs.id:
415+
lim = int(COL * 0.8)
412416
query = [] # temp variable thatll hold all the results
413417
try:
414418
for i in range(len(files_array)):
@@ -425,10 +429,11 @@ def searchsploitout():
425429
if len(query) == 0: # is the search results came up with nothing
426430
print(name_array[i] + ": No Results")
427431
continue
432+
drawline(COL//4)
433+
separater(COL//4, name_array[i] + " Title", "Path")
434+
separater(COL//4, "", os.path.abspath(path_array[i]))
435+
drawline(COL//4) # display title for every database
428436
drawline(lim)
429-
separater(COL/4, name_array[i] + " Title", "Path")
430-
separater(COL/4, "", os.path.abspath(path_array[i]))
431-
drawline(lim) # display title for every database
432437
for lines in query:
433438
# Removing quotes around title if present
434439
if (lines[0][0] == "\"" or lines[0][0] == "\'"):
@@ -443,11 +448,7 @@ def searchsploitout():
443448
for term in terms:
444449
lines[0] = highlightTerm(lines[0], term)
445450
lines[1] = highlightTerm(lines[1], term)
446-
if parseArgs.id:
447-
# made this change so that ids get less display space
448-
separater(int(COL * 0.8), lines[0], lines[1])
449-
else:
450-
separater(lim, lines[0], lines[1])
451+
separater(lim, lines[0], lines[1])
451452
drawline(lim)
452453
except KeyboardInterrupt:
453454
drawline(lim)

0 commit comments

Comments
 (0)