Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfredredbird committed Nov 27, 2023
2 parents 3f647dc + 09a2933 commit 6169091
Show file tree
Hide file tree
Showing 9 changed files with 197 additions and 80 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: "--check --verbose"
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Our tool was created by me and is available for your use.
I do not take responsibility for any malicious actions and or responsibility caused by my tool. :(
Please note that Alfred was created to help new programers or pentesters get into the world of OSINT. My end term goal is to make Alfred as perfect as I can and make it easy for new programmers to understand. Also take note that Alfred is optimised for python 12. If you want to contribute, make a fork and make a pull request to submit your changes. :D I am proud to anounce that Alfred has over 700 weekly downloads!

![Screen Shot 2023-08-25 at 9 37 36 PM](https://github.com/Alfredredbird/alfred/assets/105014217/136c266d-ba5f-478c-9bbf-ad4d0f5c5ad3)
<img width="502" alt="imasdasdage" src="https://github.com/Alfredredbird/alfred/assets/105014217/c085915e-5803-4b4f-9d25-efc96822ac19">


# 📦 Installation
Expand Down Expand Up @@ -137,8 +137,9 @@ There Is A Lot Lol
# 🍿 Showcase
Alfred has a wide variety of options to use.
Typing -h twice shows the help menu.
![Screen Shot 2023-08-22 at 3 33 18 PM](https://github.com/Alfredredbird/alfred/assets/105014217/386e84cf-3291-44d2-8d55-b76a5a149ab6)


<img width="434" alt="imaasdasdasage" src="https://github.com/Alfredredbird/alfred/assets/105014217/756d0b3b-6c37-425d-ae98-7ab00befb77d">


# ⁉️ Need Help?
Check out https://github.com/Alfredredbird/alfred/issues or the WiKi for help.
Expand Down
20 changes: 15 additions & 5 deletions brib.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
from __future__ import print_function

import datetime
import os
import site
import time
Expand All @@ -8,17 +10,18 @@
from socket import socket
from time import sleep
from timeit import default_timer

from alive_progress import *
from colorama import Back, Fore, Style
from rich.console import Console

from modules.configcheck import *
from modules.crypt import *
from modules.modules import *
from modules.printmodules import *
from modules.scanmodules import *
from modules.siteListGen import *
from modules.webscrape import *
from modules.crypt import *
import datetime

# cool arrow because I keep forgetting what UNICODE arrow I used. ⤷
# variables
Expand Down Expand Up @@ -46,8 +49,15 @@
siteList = []
siteErrors = []
siteNSFW = []
#checks that the folders exist. if not it creates them
folders_to_create = ['config', 'captured', 'downloadedSites','modules','proxys','sites']
# checks that the folders exist. if not it creates them
folders_to_create = [
"config",
"captured",
"downloadedSites",
"modules",
"proxys",
"sites",
]
create_folders(folders_to_create)
# gets the defualt browser and system information
browser = get_default_browser()
Expand Down Expand Up @@ -197,7 +207,7 @@
test = True
inputnum = ""
# creates the save file
file_name = uname +".txt"
file_name = uname + ".txt"
file_path = os.path.join("./captured/", file_name)
# check if the directory exists
if os.path.exists("./captured/"):
Expand Down
4 changes: 2 additions & 2 deletions modules/configcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import time

from colorama import *
import time


#
Expand Down Expand Up @@ -232,10 +231,11 @@ def dirDump(mydir):
for f in filelist:
os.remove(os.path.join(mydir, f))


def create_folders(folder_list):
for folder in folder_list:
if not os.path.exists(folder):
print(f"Creating folder: {folder}")
os.makedirs(folder)
else:
print(f"Folder already exists: {folder}")
print(f"Folder already exists: {folder}")
6 changes: 4 additions & 2 deletions modules/crypt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from cryptography.fernet import Fernet
from configparser import ConfigParser
import platform
from configparser import ConfigParser

from cryptography.fernet import Fernet

from modules.configcheck import *

config = ConfigParser()
Expand Down
3 changes: 0 additions & 3 deletions modules/printmodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

from modules.modules import *
from modules.webscrape import *
import time
import platform
import os


def print_logoscreen(version, config):
Expand Down
207 changes: 151 additions & 56 deletions modules/scanmodules.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
from colorama import *
import requests
import datetime
import json
from bs4 import BeautifulSoup as bs
from urllib.parse import urljoin
from modules.configcheck import *
from modules.webscrape import *
from configparser import ConfigParser
from urllib.parse import urljoin
import datetime

import requests
from bs4 import BeautifulSoup as bs
from colorama import *
import datetime

from modules.configcheck import *
from modules.webscrape import *

config = ConfigParser()

date = datetime.date.today()


# scan logic
def Startscan(
modes,
Expand Down Expand Up @@ -107,70 +105,167 @@ def Startscan(
connection_error = 1
if "-a" in modes:
print("[" + Fore.YELLOW + "E" + Fore.RESET + "] " + siteN + uname)
f.write(str(date)+"[" + "E" + "] " + siteN + uname + "\n")
f.write(str(date) + "[" + "E" + "] " + siteN + uname + "\n")
cError += 1
return cError
except KeyboardInterrupt:
print("""===========================================================""")
print("Stopping........")

f.close
print("Saved Results To File")
exit(99)
else:
if webscrape == True:
if "-a" in modes:
if response.status_code >= 400 and response.status_code <= 510 and result == "Yes":
print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
f.write(str(date)+"[" + "-" + "] " + siteN + uname + "\n")
# if response.status_code == 406 and result == "Yes":
# print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
# f.write("[" + "-" + "] " + siteN + uname + "\n")
if "-a" in modes:
if (
response.status_code >= 400
and response.status_code <= 510
and result == "Yes"
):
print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "-" + "] " + siteN + uname + "\n")
# if response.status_code == 406 and result == "Yes":
# print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
# f.write("[" + "-" + "] " + siteN + uname + "\n")

if "-N" in modes:
if response.status_code == 200 and siteNSFW == "true" and result == "No":
print("["+ Fore.LIGHTMAGENTA_EX+ "NSFW"+ Fore.RESET+ "] "+ siteN+ uname+ " "+ Fore.RESET)
f.write(str(date)+"[" + "+" + "] " + siteN + uname + " NSFW" + "\n")
if response.status_code == 200 and siteNSFW == "Unknown" and result == "No":
print("["+ Fore.BLACK+ "NSFW?"+ Fore.RESET+ "] "+ siteN+ uname+ " "+ Fore.RESET)
f.write(str(date)+"[" + "+" + "] " + siteN + uname + " NSFW?" + "\n")
if "-N" in modes:
if (
response.status_code == 200
and siteNSFW == "true"
and result == "No"
):
print(
"["
+ Fore.LIGHTMAGENTA_EX
+ "NSFW"
+ Fore.RESET
+ "] "
+ siteN
+ uname
+ " "
+ Fore.RESET
)
f.write(
str(date)
+ "["
+ "+"
+ "] "
+ siteN
+ uname
+ " NSFW"
+ "\n"
)
if (
response.status_code == 200
and siteNSFW == "Unknown"
and result == "No"
):
print(
"["
+ Fore.BLACK
+ "NSFW?"
+ Fore.RESET
+ "] "
+ siteN
+ uname
+ " "
+ Fore.RESET
)
f.write(
str(date)
+ "["
+ "+"
+ "] "
+ siteN
+ uname
+ " NSFW?"
+ "\n"
)

if response.status_code == 200 and siteNSFW == "false" and result == "No":
if (
response.status_code == 200
and siteNSFW == "false"
and result == "No"
):
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")
if (
response.status_code >= 200
and response.status_code <= 390
and "-N" not in modes
and result == "No"
):
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date)+"[" + "+" + "] " + siteN + uname + "\n")
if response.status_code >= 200 and response.status_code <= 390 and "-N" not in modes and result == "No":
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date)+"[" + "+" + "] " + siteN + uname + "\n")
return siteProgcounter
if response.status_code == 406 and "-N" not in modes and result == "No":
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write("[" + "+" + "] " + siteN + uname + "\n")
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")
return siteProgcounter
if response.status_code == 406 and "-N" not in modes and result == "No":
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write("[" + "+" + "] " + siteN + uname + "\n")
if webscrape == False:
if "-a" in modes:
if response.status_code >= 300 and response.status_code <= 510:
print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
f.write(str(date)+"[" + "-" + "] " + siteN + uname + "\n")
# if response.status_code == 406 and result == "Yes":
# print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
# f.write("[" + "-" + "] " + siteN + uname + "\n")
if "-a" in modes:
if response.status_code >= 300 and response.status_code <= 510:
print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "-" + "] " + siteN + uname + "\n")
# if response.status_code == 406 and result == "Yes":
# print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
# f.write("[" + "-" + "] " + siteN + uname + "\n")

if "-N" in modes:
if response.status_code == 200 and siteNSFW == "true":
print("["+ Fore.LIGHTMAGENTA_EX+ "NSFW"+ Fore.RESET+ "] "+ siteN+ uname+ " "+ Fore.RESET)
f.write(str(date)+"[" + "+" + "] " + siteN + uname + " NSFW" + "\n")
if response.status_code == 200 and siteNSFW == "Unknown":
print("["+ Fore.BLACK+ "NSFW?"+ Fore.RESET+ "] "+ siteN+ uname+ " "+ Fore.RESET)
f.write(str(date)+"[" + "+" + "] " + siteN + uname + " NSFW?" + "\n")
if response.status_code == 200 and siteNSFW == "false":
if "-N" in modes:
if response.status_code == 200 and siteNSFW == "true":
print(
"["
+ Fore.LIGHTMAGENTA_EX
+ "NSFW"
+ Fore.RESET
+ "] "
+ siteN
+ uname
+ " "
+ Fore.RESET
)
f.write(
str(date)
+ "["
+ "+"
+ "] "
+ siteN
+ uname
+ " NSFW"
+ "\n"
)
if response.status_code == 200 and siteNSFW == "Unknown":
print(
"["
+ Fore.BLACK
+ "NSFW?"
+ Fore.RESET
+ "] "
+ siteN
+ uname
+ " "
+ Fore.RESET
)
f.write(
str(date)
+ "["
+ "+"
+ "] "
+ siteN
+ uname
+ " NSFW?"
+ "\n"
)
if response.status_code == 200 and siteNSFW == "false":
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")
if response.status_code == 200 and "-N" not in modes:
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")
return siteProgcounter
if response.status_code == 406 and "-N" not in modes:
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date)+"[" + "+" + "] " + siteN + uname + "\n")
if response.status_code == 200 and "-N" not in modes:
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date)+"[" + "+" + "] " + siteN + uname + "\n")
return siteProgcounter
if response.status_code == 406 and "-N" not in modes:
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date)+"[" + "+" + "] " + siteN + uname + "\n")
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")


def scanFileList(siteList, slectpath):
Expand Down
Loading

0 comments on commit 6169091

Please sign in to comment.