Skip to content

Commit 36d6b51

Browse files
Merge branch 'master' into eggshell
2 parents 73f3e99 + 85a6de2 commit 36d6b51

20 files changed

Lines changed: 1472 additions & 3 deletions

File tree

.github/workflows/auto-assign.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Auto Assign
33
on:
44
issue_comment:
55
types: [created]
6-
schedule:
7-
- cron: '0 0 * * *' # Runs daily at midnight
86
workflow_dispatch:
97

108
jobs:
@@ -39,4 +37,4 @@ jobs:
3937
return github.issues.addAssignees(config);
4038
} else {
4139
return true;
42-
}
40+
}

Automation script/automation.py

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import os
2+
import requests
3+
from PIL import Image
4+
#Import necessary libraries
5+
6+
website_url = "https://example.com/images/"
7+
#Define the URL of the website containing the images you want to download
8+
9+
def download_images(url, download_folder):
10+
response = requests.get(url)
11+
image_names = ["image1.jpg", "image2.jpg", "image3.jpg"] # Replace with actual image names or fetch them dynamically
12+
for name in image_names:
13+
image_url = url + name
14+
image_path = os.path.join(download_folder, name)
15+
with open(image_path, 'wb') as f:
16+
f.write(response.content)
17+
#Create a function to download images from the website
18+
19+
def resize_images(input_folder, output_folder, target_size):
20+
for filename in os.listdir(input_folder):
21+
input_path = os.path.join(input_folder, filename)
22+
output_path = os.path.join(output_folder, filename)
23+
img = Image.open(input_path)
24+
img_resized = img.resize(target_size)
25+
img_resized.save(output_path)
26+
27+
#Create a function to resize images
28+
def resize_images(input_folder, output_folder, target_size):
29+
for filename in os.listdir(input_folder):
30+
input_path = os.path.join(input_folder, filename)
31+
output_path = os.path.join(output_folder, filename)
32+
img = Image.open(input_path)
33+
img_resized = img.resize(target_size)
34+
img_resized.save(output_path)
35+
36+
37+
#Define the target size for the resized images
38+
target_size = (300, 200) # Width x Height in pixels
39+
40+
def organize_images_by_dimensions(input_folder):
41+
for filename in os.listdir(input_folder):
42+
input_path = os.path.join(input_folder, filename)
43+
img = Image.open(input_path)
44+
width, height = img.size
45+
folder_name = f"{width}x{height}"
46+
folder_path = os.path.join(input_folder, folder_name)
47+
if not os.path.exists(folder_path):
48+
os.mkdir(folder_path)
49+
output_path = os.path.join(folder_path, filename)
50+
shutil.move(input_path, output_path
51+
#Create a function to organize images into folders based on their dimensions
52+
53+
#Main function to execute the automation script
54+
if __name__ == "__main__":
55+
download_folder = "downloads"
56+
os.makedirs(download_folder, exist_ok=True)
57+
download_images(website_url, download_folder)
58+
59+
resize_folder = "resized"
60+
os.makedirs(resize_folder, exist_ok=True)
61+
resize_images(download_folder, resize_folder, target_size)
62+
63+
organize_images_by_dimensions(resize_folder)
64+

Ciphey tool/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Ciphey - Automated Decryption Tool
2+
3+
Ciphey is an automated decryption tool that uses smart artificial intelligence and natural language processing to automatically decrypt encrypted text. Simply input encrypted text, and Ciphey will attempt to find the decrypted text for you.
4+
5+
## Installation
6+
7+
To use Ciphey, you need Python 3.7 or higher. It is recommended to use a virtual environment to isolate the tool's dependencies.
8+
9+
1. Clone the Ciphey repository
10+
2. Change into the Ciphey directory
11+
3. Install the required dependencies using `pip`:
12+
```pip install -r requirements.txt
13+
```
14+
## Usage
15+
16+
You can run Ciphey with the following command:
17+
```python ciphey.py ```
18+

Ciphey tool/ciphey.py

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
import os
2+
import warnings
3+
from typing import Any, Optional, Union
4+
5+
import click
6+
from appdirs import AppDirs
7+
import logging
8+
from rich.logging import RichHandler
9+
from rich.console import Console
10+
11+
from ciphey import iface
12+
13+
warnings.filterwarnings("ignore")
14+
15+
console = Console()
16+
17+
18+
def decrypt(config: iface.Config, ctext: Any) -> Union[str, bytes]:
19+
"""A simple alias for searching a ctext and makes the answer pretty"""
20+
res: Optional[iface.SearchResult] = config.objs["searcher"].search(ctext)
21+
if res is None:
22+
return "Failed to crack"
23+
if config.verbosity < 0:
24+
return res.path[-1].result.value
25+
else:
26+
return iface.pretty_search_results(res)
27+
28+
29+
def print_help(ctx):
30+
# prints help menu
31+
# if no arguments are passed
32+
click.echo(ctx.get_help())
33+
ctx.exit()
34+
35+
36+
@click.command()
37+
@click.option(
38+
"-t",
39+
"--text",
40+
help="The ciphertext you want to decrypt.",
41+
type=str,
42+
)
43+
@click.option(
44+
"-q", "--quiet", help="Decrease verbosity", type=int, count=True, default=None
45+
)
46+
@click.option(
47+
"-g",
48+
"--greppable",
49+
help="Only print the answer (useful for grep)",
50+
is_flag=True,
51+
default=None,
52+
)
53+
@click.option("-v", "--verbose", count=True, type=int)
54+
@click.option("-C", "--checker", help="Use the given checker", default=None)
55+
@click.option(
56+
"-c",
57+
"--config",
58+
help="Uses the given config file. Defaults to appdirs.user_config_dir('ciphey', 'ciphey')/'config.yml'",
59+
)
60+
@click.option("-w", "--wordlist", help="Uses the given wordlist")
61+
@click.option(
62+
"-p",
63+
"--param",
64+
help="Passes a parameter to the language checker",
65+
multiple=True,
66+
)
67+
@click.option(
68+
"-l",
69+
"--list-params",
70+
help="List the parameters of the selected module",
71+
is_flag=True,
72+
)
73+
@click.option(
74+
"--searcher",
75+
help="Select the searching algorithm to use",
76+
)
77+
@click.option(
78+
"-b",
79+
"--bytes",
80+
help="Forces Ciphey to use binary mode for the input",
81+
is_flag=True,
82+
default=None,
83+
)
84+
@click.option(
85+
"--default-dist",
86+
help="Sets the default character/byte distribution",
87+
type=str,
88+
default=None,
89+
)
90+
@click.option(
91+
"-m",
92+
"--module",
93+
help="Adds a module from the given path",
94+
type=click.Path(),
95+
multiple=True,
96+
)
97+
@click.option(
98+
"-A",
99+
"--appdirs",
100+
help="Print the location of where Ciphey wants the settings file to be",
101+
is_flag=True,
102+
)
103+
@click.option("-f", "--file", type=click.File("rb"), required=False)
104+
@click.argument("text_stdin", callback=iface.get_input_from_stdin, required=False)
105+
def main(**kwargs):
106+
# Initialize the console and logging
107+
console = Console()
108+
logging.basicConfig(
109+
level=logging.INFO,
110+
format="%(message)s",
111+
datefmt="[%X]",
112+
handlers=[RichHandler(console=console, rich_tracebacks=True)],
113+
)
114+
115+
# Create the configuration object
116+
config = iface.Config()
117+
118+
# Load the settings file into the config
119+
config.load_settings_file(kwargs["config"])
120+
121+
# Set verbosity level
122+
verbosity = kwargs["verbose"] - kwargs["quiet"] if kwargs["verbose"] is not None else None
123+
config.set_verbosity(verbosity)
124+
125+
# Load additional options into the config
126+
config.set_option("checker", kwargs["checker"])
127+
config.set_option("searcher", kwargs["searcher"])
128+
config.set_option("default_dist", kwargs["default_dist"])
129+
config.set_option("wordlist", kwargs["wordlist"])
130+
131+
# Load additional modules
132+
config.load_modules(kwargs["module"])
133+
134+
# Update parameters
135+
config.update_parameters(kwargs["param"])
136+
137+
# Complete the configuration setup
138+
config.complete_config()
139+
140+
# Process the input text
141+
input_text = kwargs["text"] or kwargs["text_stdin"]
142+
if isinstance(input_text, bytes) and not kwargs["bytes"]:
143+
input_text = input_text.decode("utf-8")
144+
elif isinstance(input_text, str) and kwargs["bytes"]:
145+
input_text = input_text.encode("utf-8")
146+
147+
# Perform decryption
148+
result = None
149+
with console.status("[bold green]Thinking...", spinner="moon") as status:
150+
config.set_spinner(status)
151+
result = decrypt(config, input_text)
152+
153+
# Print the result
154+
console.print(result)
155+
156+
157+
if __name__ == "__main__":
158+
main()

Ciphey tool/dependencies.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Dependencies
2+
3+
The Ciphey tool relies on several modules and dependencies. Here are the main ones:
4+
5+
- Ciphey Core: The core functionality of the Ciphey tool. It can be installed using pip install ciphey.
6+
7+
- Click: A command-line interface (CLI) library for Python. It handles the command-line options and arguments. Install it with pip install click.
8+
9+
- AppDirs: A Python module for determining appropriate application directories on various operating systems. It is used to handle the location of the configuration file. Install it with pip install appdirs.
10+
11+
- Rich: A library for rich text and beautiful formatting in the terminal. It is used for enhanced logging output and spinner display. Install it with pip install rich.
12+
13+
Make sure to install these dependencies before running the enhanced Ciphey tool. You can install them by running the corresponding pip install commands mentioned above.

Ciphey tool/requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
appdirs
2+
click
3+
rich
4+
ciphey

CrossLinked/Readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# CrossLinked
2+
3+
CrossLinked is a LinkedIn enumeration tool that uses search engine scraping to collect valid employee names from an organization. This technique provides accurate results without the use of API keys, credentials, or accessing LinkedIn directly!
4+

CrossLinked/logger.py

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import os
2+
import sys
3+
import logging
4+
5+
STYLE = {'None': '0',
6+
'bold': '1'
7+
}
8+
9+
FG = {'None': '',
10+
'gray': ';30',
11+
'red': ';31',
12+
'green': ';32',
13+
'yellow': ';33',
14+
'blue': ';34',
15+
'purple': ';35',
16+
'cyan': ';36'
17+
}
18+
19+
20+
class Log:
21+
# Quick log class for CLI output
22+
@staticmethod
23+
def info(msg):
24+
print(' '.join([highlight('[*]', 'bold', 'blue'), msg]))
25+
26+
@staticmethod
27+
def success(msg):
28+
print(' '.join([highlight('[+]', 'bold', 'green'), msg]))
29+
30+
@staticmethod
31+
def warn(msg):
32+
print(' '.join([highlight('[*]', 'bold', 'yellow'), msg]))
33+
34+
35+
def code_gen(data, style, color, windows=False):
36+
return data if windows else '\033[0{}{}m{}\033[0m'.format(STYLE[style], FG[color], data)
37+
38+
39+
def highlight(data, style='bold', fg='blue'):
40+
return code_gen(data, style, fg, windows=True if os.name == 'nt' else False)
41+
42+
43+
def debug_args(args):
44+
for k in args.__dict__:
45+
logging.debug('{:20} => {}'.format(k, args.__dict__[k]))
46+
47+
48+
def setup_debug_logger():
49+
debug_output_string = "{} %(message)s".format(highlight('DEBUG', fg='purple'))
50+
formatter = logging.Formatter(debug_output_string)
51+
streamHandler = logging.StreamHandler(sys.stdout)
52+
streamHandler.setFormatter(formatter)
53+
54+
root_logger = logging.getLogger()
55+
root_logger.propagate = False
56+
root_logger.addHandler(streamHandler)
57+
root_logger.setLevel(logging.DEBUG)
58+
return root_logger
59+
60+
61+
def setup_file_logger(file_name, log_name='cLinked_file', file_mode='w'):
62+
formatter = logging.Formatter('%(message)s')
63+
fileHandler = logging.FileHandler(file_name, file_mode)
64+
fileHandler.setFormatter(formatter)
65+
66+
logger = logging.getLogger(log_name)
67+
logger.propagate = False
68+
logger.addHandler(fileHandler)
69+
logger.setLevel(logging.INFO)
70+
71+
first_run(logger) if not os.path.exists(file_name) else False
72+
return logger
73+
74+
75+
def first_run(logger):
76+
# init headings in CSV log file
77+
logger.info('Datetime, Search, Name, Title, URL, rawText')
78+
79+
80+
def setup_cli_logger(log_level=logging.INFO, logger_name='cLinked'):
81+
formatter = logging.Formatter('%(message)s')
82+
StreamHandler = logging.StreamHandler(sys.stdout)
83+
StreamHandler.setFormatter(formatter)
84+
85+
logger = logging.getLogger(logger_name)
86+
logger.propagate = False
87+
logger.addHandler(StreamHandler)
88+
logger.setLevel(log_level)
89+
return logger

0 commit comments

Comments
 (0)