# esther7171/scripts architecture

> Architecture diagram of the GitHub repository esther7171/scripts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/esther7171/scripts
- Repository: https://github.com/esther7171/scripts

## Overview

##### Project type and purpose
- This is a “scripts library” repository: a collection of small automation utilities (PowerShell, VBScript, Bash, Python) that the author uses to expedite daily tasks on Windows and Linux.
- The primary use cases:
- Windows folder locking (FolderLock.ps1)
- Forwarding honeypot logs to Telegram (telegram.py)
- One‐liner installers or updaters for Linux (Install-snap-store.sh, update, linpeas.sh)
- Automated shutdown on Windows (shut.vbs)
- Miscellaneous documentation (bluetooth.md, shutdown.md, cis.csv).

##### File structure
- Top-level items:
- Two feature folders for multi-file scripts (Folder-Protection-Script-for-Windows and Forward-Honeypot-Log-to-Telegram).
- Individual scripts at root (Install-snap-store.sh, linpeas.sh, update).
- One VBScript folder (Shutdown).
- Miscellaneous docs (bluetooth.md, shutdown.md, cis.csv).
- No build system or compiled binaries—each script runs in its native environment.
- Deployment hint: users are instructed to move scripts into /usr/local/bin to make them global commands.

##### README for additional insights
- The README is brief: it describes the collection’s intent (daily‐base task automation) and gives a “make scripts into commands” snippet.

a. Main components:
– User (invoker)
– Linux environment (Bash shell)
– Windows environment (PowerShell host, Windows Scripting Host for VBScript)
– Scripts subcomponents:
- FolderLock.ps1
- shut.vbs
- telegram.py
- Bash utilities (Install-snap-store.sh, update, linpeas.sh)
– External service: Telegram Bot API
– File system (local folders, /usr/local/bin)
b. Relationships and interactions:
– User → launches script on appropriate OS
– Bash scripts → local package manager or file system operations
– telegram.py → forwards logs to Telegram Bot endpoint over HTTPS
– FolderLock.ps1 → invokes PowerShell file attributes & encryption APIs
– shut.vbs → calls WSH shutdown method
c. Architectural patterns and principles:
– Single-responsibility: each script handles one task
– Environment separation: Linux vs. Windows runtimes
– External integration: Python script as the only script requiring an external API
d. Key technologies & frameworks:
– PowerShell engine (.ps1)
– Windows Scripting Host (.vbs)
– Bash shell on Linux
– Python 3 + requests (or built-in urllib) for Telegram forwarding

##### Detail over complexity
- Environment prerequisites: “Python 3 installed” or “PowerShell v5+” in small annotation callouts.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Root Documentation
    R0["Project Overview"]:::doc
    click R0 "https://github.com/esther7171/scripts/blob/main/README.md"

    %% User
    User[("User")]

    %% Windows Environment
    subgraph "Windows Environment"
        direction TB
        subgraph "PowerShell Host"
            direction TB
            FL["FolderLock.ps1 – PowerShell Script"]:::script
            click FL "https://github.com/esther7171/scripts/blob/main/Folder-Protection-Script-for-Windows/FolderLock.ps1"
            R1["Folder-Protection Instructions"]:::doc
            click R1 "https://github.com/esther7171/scripts/blob/main/Folder-Protection-Script-for-Windows/readme.md"
        end
        subgraph "Windows Scripting Host"
            direction TB
            SV["shut.vbs – VBScript Script"]:::script
            click SV "https://github.com/esther7171/scripts/blob/main/Shutdown/shut.vbs"
            R2["Shutdown Usage Notes"]:::doc
            click R2 "https://github.com/esther7171/scripts/blob/main/shutdown.md"
        end
        FSWin[(File System)]:::storage
        NoteWin["Requires PowerShell v5+"]:::note
    end

    %% Linux Environment
    subgraph "Linux Environment"
        direction TB
        subgraph "Bash Shell"
            direction TB
            S1["Install-snap-store.sh"]:::script
            click S1 "https://github.com/esther7171/scripts/blob/main/Install-snap-store.sh"
            S2["update"]:::script
            click S2 "https://github.com/esther7171/scripts/tree/main/update"
            S3["linpeas.sh"]:::script
            click S3 "https://github.com/esther7171/scripts/blob/main/linpeas.sh"
        end
        subgraph "Python 3"
            direction TB
            TG["telegram.py – Python Script"]:::script
            click TG "https://github.com/esther7171/scripts/blob/main/Forward-Honeypot-Log-to-Telegram/telegram.py"
            R3["Honeypot-to-Telegram Instructions"]:::doc
            click R3 "https://github.com/esther7171/scripts/blob/main/Forward-Honeypot-Log-to-Telegram/readme.md"
        end
        FSLin[(/usr/local/bin)]:::storage
        NoteLin["Requires Bash & Python 3"]:::note
    end

    %% External Service
    TEL["Telegram Bot API"]:::external

    %% User interactions
    User -->|"invokes"| FL
    User -->|"invokes"| SV
    User -->|"invokes"| S1
    User -->|"invokes"| S2
    User -->|"invokes"| S3
    User -->|"invokes"| TG
    User -->|"deploys to"| FSLin

    %% Script interactions
    FL -->|"reads/writes"| FSWin
    SV -->|"calls WSH shutdown"| FSWin
    S1 -->|"installs via snap"| FSLin
    S2 -->|"updates packages"| FSLin
    S3 -->|"audits system"| FSLin
    TG -->|"HTTPS"| TEL

    %% Styles
    classDef script fill:#e0f7fa,stroke:#006064,color:#004d40,stroke-width:1px;
    classDef doc fill:#fff8e1,stroke:#ffb300,color:#bf360c,stroke-width:1px;
    classDef storage fill:#eceff1,stroke:#607d8b,color:#263238,stroke-width:1px,shape:cylinder;
    classDef external fill:#ffe0b2,stroke:#e65100,color:#bf360c,stroke-width:1px,shape:cloud;
    classDef note fill:#fafafa,stroke:#bdbdbd,color:#424242,stroke-width:1px,stroke-dasharray: 2 2;

    class FL,SV windows;
    class S1,S2,S3,TG linux;
    class TEL external;
    class FSWin,FSLin storage;
    class NoteWin,NoteLin note;
```
