A next-gen forensic scanner for folders packed with code, documentation, and more. Analyze, summarize, and report like a digital detective 🕵️♂️.
python main.py <folder_path>
Flag | Description |
---|---|
--html |
Generate HTML report |
--pdf |
Generate PDF report (WeasyPrint or ReportLab) |
--csv |
Export report to CSV format |
--log |
Save a .log file of operations |
--zip |
Auto zip the report directory |
--deep |
Perform forensic scans for code smell, reuse, obfuscation, sensitive data |
Located at: report_generator/text_analyzer.py
-
analyze_text_file(file_path)
➤ Returns word count, sentence count, sentiment polarity & subjectivity -
advanced_text_insights(file_path)
➤ Adds reading ease score, most common words, and plagiarism matches -
perform_ner_and_sentiment(file_path)
➤ Named Entity Recognition + sentiment scan -
text_plagiarism_check(file_path)
➤ Uses TF-IDF + cosine similarity to flag reused content in the same folder
Located at: report_generator/code_analyzer.py
-
analyze_code_file(file_path)
➤ Detects number of functions, classes, language type, and complexity hints -
deep_code_analysis()
➤ Hooks into more advanced tools for structural insights -
run_bandit_scan(file_path)
➤ Python security audit using Bandit -
detect_sensitive_data(file_path)
➤ Flags tokens, API keys, secrets -
detect_code_reuse(file_path)
➤ Checks for signs of copied logic from other sources -
detect_obfuscated_code(file_path)
➤ Spots minified, encoded, or misleading structures -
analyze_code_complexity(file_path)
➤ Measures cyclomatic complexity, nested blocks, and potential technical debt
.md
: Full Markdown Summary Report.html
: Stylish HTML version of the above.pdf
: Clean printable report.csv
: Tabular dump of file metrics.log
: Step-by-step operations log.zip
: Compressed report package
Install dependencies using pip:
pip install -r requirements.txt
Or individually:
pip install textblob spacy sklearn weasyprint markdown2
python -m textblob.download_corpora
python -m spacy download en_core_web_sm
python main.py D:/ProjectPortfolio --html --csv --log --zip --deep
This will produce:
- An HTML report
- A CSV table
- A zip file with all results
- Deep scan insights
- Currently works best on
.txt
,.py
,.js
,.html
,.md
,.json
files - Plagiarism check compares local
.txt
files only - Bandit scan requires
bandit
installed (pip install bandit
)
- Researchers 🧪
- Developers 🧑💻
- Forensic Analysts 🕵️♀️
- AI Workflow Auditors 🤖
FolderScopeAI isn’t just a tool. It’s a codebase conscience.
analyze_text_file()
→ Word count, sentence count, sentiment polarity and subjectivityadvanced_text_insights()
→ Flesch reading ease, most common words, plagiarism detectionperform_ner_and_sentiment()
→ Named Entity Recognition (NER) + sentiment analysistext_plagiarism_check()
→ Detect similarity between.txt
files in same folder
analyze_code_file()
→ Line count, class/function count, comments ratiodeep_code_analysis()
→ Flags long functions, duplicate lines, weird code patternsrun_bandit_scan()
→ Runs Bandit security scan on Python filesanalyze_code_complexity()
→ Complexity and readability check (NEW!)
detect_sensitive_data()
→ Finds hardcoded keys, tokens, secretsdetect_code_reuse()
→ Flags reused logic across files (GitHub-copy style)detect_obfuscated_code()
→ Detects encoded or minified suspicious code
python main.py <folder_path> [--html] [--csv] [--log] [--zip] [--deep]
--html
→ Export full HTML report--csv
→ Export insights to CSV--log
→ Create scan log file--zip
→ Archive the folder with timestamp--deep
→ Run forensic scans on top of analysis
Make sure you’re in a virtual environment, then run:
pip install textblob
pip install spacy
pip install scikit-learn
python -m textblob.download_corpora
python -m spacy download en_core_web_sm
- Markdown and HTML summaries per file
- Forensic logs (if
--log
enabled) - CSVs with structured results
- Optional
.zip
backup of the scanned folder
Made with ❤️ by Ijtihad Emon — AI-assisted, precision-delivered.
Stay curious. Stay skeptical. Scan responsibly.