Canstralian commited on
Commit
23e94c0
1 Parent(s): f8340ed

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +104 -0
app.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import numpy as np
4
+ import matplotlib.pyplot as plt
5
+ import seaborn as sns
6
+ from wordlist_generator import generate_wordlist # A mock-up function for your project
7
+
8
+ # Page configuration
9
+ st.set_page_config(page_title="ReconNinja Wordlists", page_icon="💬", layout="wide")
10
+
11
+ # Header section
12
+ st.title("💬 ReconNinja Wordlists")
13
+ st.subheader("Tailored wordlists for efficient penetration testing")
14
+ st.markdown(
15
+ """
16
+ This application generates customized wordlists for use in network reconnaissance and penetration testing.
17
+ Adjust the parameters to generate wordlists suited for your specific testing scenario.
18
+ """
19
+ )
20
+
21
+ # Sidebar for user input
22
+ st.sidebar.header("Customize Your Wordlist")
23
+ st.sidebar.markdown(
24
+ """
25
+ Adjust the following parameters to create wordlists optimized for your penetration testing tasks.
26
+ """
27
+ )
28
+
29
+ # Wordlist customization settings
30
+ wordlist_size = st.sidebar.slider("Wordlist Size", min_value=50, max_value=10000, value=1000, step=50)
31
+ min_length = st.sidebar.slider("Minimum Word Length", min_value=3, max_value=12, value=6)
32
+ max_length = st.sidebar.slider("Maximum Word Length", min_value=3, max_value=12, value=8)
33
+ include_special_chars = st.sidebar.checkbox("Include Special Characters", value=False)
34
+ include_numbers = st.sidebar.checkbox("Include Numbers", value=True)
35
+
36
+ # Display wordlist generation results
37
+ st.header("Generated Wordlist Preview")
38
+
39
+ # Call to a mock-up function for wordlist generation (you will replace this with your actual logic)
40
+ wordlist = generate_wordlist(
41
+ size=wordlist_size,
42
+ min_length=min_length,
43
+ max_length=max_length,
44
+ special_chars=include_special_chars,
45
+ numbers=include_numbers
46
+ )
47
+
48
+ # Display the first 20 items in the wordlist
49
+ st.write(f"Preview of {wordlist_size} words:")
50
+ st.write(wordlist[:20]) # Show the first 20 words for brevity
51
+
52
+ # Download link for the full wordlist
53
+ st.markdown("### Download Full Wordlist")
54
+ csv_data = pd.Series(wordlist).to_csv(index=False).encode()
55
+ st.download_button(
56
+ label="Download Wordlist as CSV",
57
+ data=csv_data,
58
+ file_name="reconninja_wordlist.csv",
59
+ mime="text/csv"
60
+ )
61
+
62
+ # Visualize wordlist statistics (for example, word length distribution)
63
+ st.header("Wordlist Statistics")
64
+ word_lengths = [len(word) for word in wordlist]
65
+ word_length_df = pd.DataFrame(word_lengths, columns=["Word Length"])
66
+
67
+ # Create a histogram to show the distribution of word lengths
68
+ fig, ax = plt.subplots(figsize=(8, 6))
69
+ sns.histplot(word_length_df["Word Length"], kde=True, bins=20, ax=ax)
70
+ ax.set_title("Word Length Distribution")
71
+ ax.set_xlabel("Word Length")
72
+ ax.set_ylabel("Frequency")
73
+ st.pyplot(fig)
74
+
75
+ # Advanced Feature - Analyzing Wordlist Security
76
+ st.header("Analyze Wordlist Security")
77
+
78
+ # Slider for password entropy calculation
79
+ entropy_slider = st.slider(
80
+ "Select Entropy Multiplier",
81
+ min_value=1.0,
82
+ max_value=10.0,
83
+ value=3.0,
84
+ step=0.1
85
+ )
86
+
87
+ # Simulate password entropy calculation (simple calculation for demonstration)
88
+ entropy = np.log2(len(wordlist) ** entropy_slider)
89
+ st.write(f"Estimated Entropy: {entropy:.2f} bits")
90
+
91
+ # Showcase a mock security analysis (this would be expanded in your actual app)
92
+ if entropy < 50:
93
+ st.warning("Low entropy detected! This wordlist might be vulnerable to brute-force attacks.")
94
+ else:
95
+ st.success("Good entropy! This wordlist is secure against most brute-force attempts.")
96
+
97
+ # Footer
98
+ st.markdown("---")
99
+ st.markdown(
100
+ "Made with ❤️ by Canstralian. For more information on ReconNinja, visit our [GitHub](https://github.com/Canstralian)."
101
+ )
102
+
103
+
104
+