Skip to content

Commit

Permalink
Freeway v1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 1, 2024
1 parent 56710c7 commit 2069596
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 2 deletions.
Binary file added FreewayTools/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added FreewayTools/__pycache__/audit.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file added FreewayTools/__pycache__/checkmac.cpython-311.pyc
Binary file not shown.
Binary file added FreewayTools/__pycache__/colors.cpython-311.pyc
Binary file not shown.
Binary file added FreewayTools/__pycache__/deauth.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file added FreewayTools/__pycache__/fuzzer.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file added FreewayTools/__pycache__/hopper.cpython-311.pyc
Binary file not shown.
Binary file added FreewayTools/__pycache__/monitor.cpython-311.pyc
Binary file not shown.
Binary file added FreewayTools/__pycache__/updater.cpython-311.pyc
Binary file not shown.
13 changes: 13 additions & 0 deletions FreewayTools/beacon_spam.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@

try:
from FreewayTools.colors import cprint, wprint, cinput, ColorCodes
from FreewayTools.git_downloader import download_folder_from_github

except ModuleNotFoundError:
from colors import cprint, wprint, cinput, ColorCodes
from git_downloader import download_folder_from_github


def random_mac():
mac = [random.randint(0x00, 0xff) for _ in range(6)]
Expand Down Expand Up @@ -57,6 +60,16 @@ def generate_random_ssid_list(self):

def load_ssid_list(self, path="ssid_list.txt", path_d="/usr/local/share/3way/lists/"):
try:
if not os.path.exists(path_d):
install_lists = cinput("/lists folder is not installed, install it now? (y/n) ")
if install_lists == "y":
cprint("Downloading the lists folder from GitHub...")
download_folder_from_github("FLOCK4H", "Freeway", "FreewayTools/lists", path_d)
elif install_lists == "n":
wprint("Exiting due to missing folder exception! Please download lists folder.")
time.sleep(1)
sys.exit(0)

joint = path_d + path
if self.rand_select:
files = os.listdir(path_d)
Expand Down
13 changes: 13 additions & 0 deletions FreewayTools/evil_twin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
import threading
import random

try:
from FreewayTools.git_downloader import download_folder_from_github

except ModuleNotFoundError:
from git_downloader import download_folder_from_github

cc = ColorCodes()

script_dir = "/usr/local/share/3way"
Expand All @@ -31,6 +37,13 @@ def change_mac_address(interface, mac="random"):
print(f"Failed to change MAC address: {e}")

def check_dependencies(dependencies):
temp_dir = f"/usr/local/share/3way/templates"
if not os.path.exists(temp_dir):
download_templates = cinput("/templates folder not installed! Download it now? (y/n)")
if download_templates == "y":
os.makedirs(temp_dir)
download_folder_from_github("FLOCK4H", "Freeway", "templates", temp_dir)

for dep in dependencies:
result = subprocess.run(["which", dep], capture_output=True, text=True)
if result.returncode != 0:
Expand Down
43 changes: 43 additions & 0 deletions FreewayTools/git_downloader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"""
Simple script that downloads github files
"""

import os
import requests
import base64
import sys
import time

try:
from FreewayTools.colors import cprint, iprint, wprint, cinput, ColorCodes

except ModuleNotFoundError:
from colors import cprint, iprint, wprint, cinput, ColorCodes

def download_folder_from_github(owner, repo, path, local_dir, token=None):
if not os.path.exists(local_dir):
os.makedirs(local_dir)

url = f"https://api.github.com/repos/{owner}/{repo}/contents/{path}"
headers = {
"Accept": "application/vnd.github.v3+json",
}
if token:
headers["Authorization"] = f"Bearer {token}"

response = requests.get(url, headers=headers)
if response.status_code == 200:
files = response.json()
for file in files:
if file['type'] == 'file':
download_url = file['download_url']
file_response = requests.get(download_url)
local_file_path = os.path.join(local_dir, file['name'])
with open(local_file_path, 'wb') as local_file:
local_file.write(file_response.content)
cprint(f"Downloaded: {file['name']}")
else:
# If there are subdirectories, call the function recursively
download_folder_from_github(owner, repo, file['path'], os.path.join(local_dir, file['name']), token)
else:
wprint(f"Failed to get contents of directory: {response.status_code}")
2 changes: 1 addition & 1 deletion FreewayTools/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_latest_version():
wprint(str(e))

def get_current_version():
return "1.2.1"
return "1.2.2"

def update():
cprint("Checking for updates..")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def run(self):

setup(
name='3way',
version='1.2.1',
version='1.2.2',
author='FLOCK4H',
url='https://github.com/FLOCK4H/Freeway',
description='Freeway for network pentesting',
Expand Down

0 comments on commit 2069596

Please sign in to comment.