Skip to content

Commit

Permalink
CortexLink.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Symbolexe authored Sep 22, 2024
1 parent 99483a7 commit 1de2b3c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions CortexLink.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import argparse
from googlesearch import search
import random
from time import sleep
from tabulate import tabulate
from colorama import Fore, Style, init
from colorama import Fore, init
init(autoreset=True)
def perform_search(query, num_results=10, region=None, lang="en", output_file="Cortex-Link-Result.txt",
def perform_search(query, num_results=10, region=None, lang="en", output_file="Cortex-Link-Result.txt",
use_table=False, no_color=False, proxy=None, ssl_verify=True, sleep_interval=0):
try:
with open(output_file, 'w') as output:
Expand All @@ -22,12 +21,9 @@ def perform_search(query, num_results=10, region=None, lang="en", output_file="C
else:
print(result)
if use_table:
if not no_color:
print(Fore.YELLOW + "\nResults in Table Format:\n")
headers = ["No", "URL"]
table_data = [[i + 1, res] for i, res in enumerate(results)]
print(tabulate(table_data, headers=headers, tablefmt="grid"))

print(f"\n[+] Results have been saved to {output_file}")
except Exception as e:
print(f"[!] An error occurred: {e}")
Expand Down

0 comments on commit 1de2b3c

Please sign in to comment.