aiden-runtime 3.19.5 → 3.19.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api/server.js +24 -25
- package/dist/core/agentLoop.js +8 -6
- package/dist/core/aidenPersonality.js +20 -3
- package/dist/core/protectedContext.js +15 -2
- package/dist/core/skillLoader.js +2 -0
- package/dist/core/skillTeacher.js +18 -5
- package/dist/core/version.js +1 -1
- package/dist-bundle/cli.js +50 -18
- package/dist-bundle/index.js +73 -35
- package/package.json +2 -1
- package/scripts/postinstall.js +70 -1
- package/workspace-templates/HEARTBEAT.md +16 -0
- package/workspace-templates/SOUL.md +267 -0
- package/workspace-templates/STANDING_ORDERS.md +21 -0
- package/workspace-templates/permissions.yaml +180 -0
- package/workspace-templates/skills/architecture-diagram/SKILL.md +126 -0
- package/workspace-templates/skills/architecture-diagram/skill.json +25 -0
- package/workspace-templates/skills/arxiv/SKILL.md +124 -0
- package/workspace-templates/skills/arxiv/skill.json +26 -0
- package/workspace-templates/skills/ascii-art/SKILL.md +142 -0
- package/workspace-templates/skills/ascii-art/skill.json +26 -0
- package/workspace-templates/skills/blogwatcher/SKILL.md +147 -0
- package/workspace-templates/skills/blogwatcher/skill.json +26 -0
- package/workspace-templates/skills/censys/SKILL.md +104 -0
- package/workspace-templates/skills/censys/index.ts +133 -0
- package/workspace-templates/skills/censys/skill.json +25 -0
- package/workspace-templates/skills/clipboard-history/SKILL.md +101 -0
- package/workspace-templates/skills/clipboard-history/skill.json +23 -0
- package/workspace-templates/skills/crt-sh/SKILL.md +102 -0
- package/workspace-templates/skills/crt-sh/index.ts +59 -0
- package/workspace-templates/skills/crt-sh/skill.json +25 -0
- package/workspace-templates/skills/cveapi/SKILL.md +114 -0
- package/workspace-templates/skills/cveapi/index.ts +249 -0
- package/workspace-templates/skills/cveapi/skill.json +25 -0
- package/workspace-templates/skills/docker-management/SKILL.md +156 -0
- package/workspace-templates/skills/docker-management/skill.json +25 -0
- package/workspace-templates/skills/excalidraw/SKILL.md +148 -0
- package/workspace-templates/skills/excalidraw/skill.json +25 -0
- package/workspace-templates/skills/explainshell/SKILL.md +93 -0
- package/workspace-templates/skills/explainshell/index.ts +132 -0
- package/workspace-templates/skills/explainshell/skill.json +25 -0
- package/workspace-templates/skills/financial_research/SKILL.md +21 -0
- package/workspace-templates/skills/financial_research/skill.json +24 -0
- package/workspace-templates/skills/gif-search/SKILL.md +122 -0
- package/workspace-templates/skills/gif-search/skill.json +25 -0
- package/workspace-templates/skills/github-auth/SKILL.md +134 -0
- package/workspace-templates/skills/github-auth/skill.json +26 -0
- package/workspace-templates/skills/github-issues/SKILL.md +130 -0
- package/workspace-templates/skills/github-issues/skill.json +25 -0
- package/workspace-templates/skills/github-pr-workflow/SKILL.md +143 -0
- package/workspace-templates/skills/github-pr-workflow/skill.json +26 -0
- package/workspace-templates/skills/github-repo-management/SKILL.md +147 -0
- package/workspace-templates/skills/github-repo-management/skill.json +26 -0
- package/workspace-templates/skills/google-workspace/SKILL.md +110 -0
- package/workspace-templates/skills/google-workspace/skill.json +26 -0
- package/workspace-templates/skills/greynoise/SKILL.md +96 -0
- package/workspace-templates/skills/greynoise/index.ts +107 -0
- package/workspace-templates/skills/greynoise/skill.json +25 -0
- package/workspace-templates/skills/haveibeenpwned/SKILL.md +100 -0
- package/workspace-templates/skills/haveibeenpwned/index.ts +72 -0
- package/workspace-templates/skills/haveibeenpwned/skill.json +24 -0
- package/workspace-templates/skills/jupyter-live-kernel/SKILL.md +116 -0
- package/workspace-templates/skills/jupyter-live-kernel/skill.json +25 -0
- package/workspace-templates/skills/linear/SKILL.md +107 -0
- package/workspace-templates/skills/linear/skill.json +25 -0
- package/workspace-templates/skills/nano-pdf/SKILL.md +113 -0
- package/workspace-templates/skills/nano-pdf/skill.json +26 -0
- package/workspace-templates/skills/notion/SKILL.md +108 -0
- package/workspace-templates/skills/notion/skill.json +24 -0
- package/workspace-templates/skills/obsidian/SKILL.md +115 -0
- package/workspace-templates/skills/obsidian/skill.json +24 -0
- package/workspace-templates/skills/ocr-and-documents/SKILL.md +125 -0
- package/workspace-templates/skills/ocr-and-documents/skill.json +26 -0
- package/workspace-templates/skills/p5js/SKILL.md +163 -0
- package/workspace-templates/skills/p5js/skill.json +24 -0
- package/workspace-templates/skills/research-paper-writing/SKILL.md +158 -0
- package/workspace-templates/skills/research-paper-writing/skill.json +26 -0
- package/workspace-templates/skills/securityheaders/SKILL.md +99 -0
- package/workspace-templates/skills/securityheaders/index.ts +213 -0
- package/workspace-templates/skills/securityheaders/skill.json +26 -0
- package/workspace-templates/skills/shodan/SKILL.md +113 -0
- package/workspace-templates/skills/shodan/index.ts +94 -0
- package/workspace-templates/skills/shodan/skill.json +26 -0
- package/workspace-templates/skills/songsee/SKILL.md +152 -0
- package/workspace-templates/skills/songsee/skill.json +25 -0
- package/workspace-templates/skills/ssllabs/SKILL.md +107 -0
- package/workspace-templates/skills/ssllabs/index.ts +208 -0
- package/workspace-templates/skills/ssllabs/skill.json +27 -0
- package/workspace-templates/skills/stable-diffusion-image-generation/SKILL.md +136 -0
- package/workspace-templates/skills/stable-diffusion-image-generation/skill.json +24 -0
- package/workspace-templates/skills/systematic-debugging/SKILL.md +131 -0
- package/workspace-templates/skills/systematic-debugging/skill.json +25 -0
- package/workspace-templates/skills/test-driven-development/SKILL.md +164 -0
- package/workspace-templates/skills/test-driven-development/skill.json +25 -0
- package/workspace-templates/skills/urlscan/SKILL.md +118 -0
- package/workspace-templates/skills/urlscan/index.ts +94 -0
- package/workspace-templates/skills/urlscan/skill.json +24 -0
- package/workspace-templates/skills/virustotal/SKILL.md +120 -0
- package/workspace-templates/skills/virustotal/index.ts +124 -0
- package/workspace-templates/skills/virustotal/skill.json +26 -0
- package/workspace-templates/skills/web_research/SKILL.md +18 -0
- package/workspace-templates/skills/web_research/skill.json +20 -0
- package/workspace-templates/skills/xitter/SKILL.md +148 -0
- package/workspace-templates/skills/xitter/skill.json +26 -0
- package/workspace-templates/skills/youtube-content/SKILL.md +121 -0
- package/workspace-templates/skills/youtube-content/skill.json +25 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "securityheaders",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Audit HTTP security headers for any URL and receive a grade (A+ to F) with specific recommendations for missing headers",
|
|
5
|
+
"author": "aiden",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"tools": [],
|
|
8
|
+
"trigger_phrases": [],
|
|
9
|
+
"compatible_agents": [
|
|
10
|
+
"aiden"
|
|
11
|
+
],
|
|
12
|
+
"min_agent_version": "3.0.0",
|
|
13
|
+
"tags": [
|
|
14
|
+
"security",
|
|
15
|
+
"http",
|
|
16
|
+
"headers",
|
|
17
|
+
"csp",
|
|
18
|
+
"hsts",
|
|
19
|
+
"xframe",
|
|
20
|
+
"audit",
|
|
21
|
+
"web",
|
|
22
|
+
"hardening",
|
|
23
|
+
"compliance"
|
|
24
|
+
],
|
|
25
|
+
"created": "2026-04-27T17:11:40.692Z"
|
|
26
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shodan
|
|
3
|
+
description: Search Shodan for internet-connected devices, open ports, and services — host lookups and database queries
|
|
4
|
+
category: security
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
license: Apache-2.0
|
|
7
|
+
origin: aiden
|
|
8
|
+
tags: security, shodan, osint, recon, ports, services, iot, asset-discovery, cve, infosec
|
|
9
|
+
env_required:
|
|
10
|
+
- SHODAN_API_KEY
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Shodan — Internet Device Search
|
|
14
|
+
|
|
15
|
+
Shodan indexes internet-connected devices and exposes metadata: open ports, running services, banners, TLS certificates, and known CVEs. Use it for security audits, reconnaissance, and asset discovery.
|
|
16
|
+
|
|
17
|
+
**Requires:** `SHODAN_API_KEY` — free tier at https://account.shodan.io (1 req/sec, 100 queries/month).
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- User wants to know what ports/services are exposed on a specific IP
|
|
22
|
+
- User wants to find vulnerable systems of a specific type (e.g. exposed databases)
|
|
23
|
+
- User is doing a security audit and needs external exposure info
|
|
24
|
+
- User asks "what does Shodan show for IP X" or "find exposed Redis servers"
|
|
25
|
+
- Asset discovery: find all internet-exposed assets for a company/ASN
|
|
26
|
+
|
|
27
|
+
## How to Use
|
|
28
|
+
|
|
29
|
+
### Look up a specific IP address
|
|
30
|
+
|
|
31
|
+
```powershell
|
|
32
|
+
$ip = "8.8.8.8"
|
|
33
|
+
$key = $env:SHODAN_API_KEY
|
|
34
|
+
$url = "https://api.shodan.io/shodan/host/${ip}?key=${key}"
|
|
35
|
+
|
|
36
|
+
$host = Invoke-RestMethod -Uri $url
|
|
37
|
+
Write-Host "IP: $($host.ip_str)"
|
|
38
|
+
Write-Host "Organization: $($host.org)"
|
|
39
|
+
Write-Host "OS: $($host.os)"
|
|
40
|
+
Write-Host "Country: $($host.country_name)"
|
|
41
|
+
Write-Host "Open ports: $($host.ports -join ', ')"
|
|
42
|
+
Write-Host ""
|
|
43
|
+
Write-Host "Services:"
|
|
44
|
+
$host.data | ForEach-Object {
|
|
45
|
+
Write-Host " Port $($_.port)/$($_.transport) — $($_.product) $($_.version)"
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Search for exposed services by query
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
$query = [Uri]::EscapeDataString("port:27017 product:MongoDB")
|
|
53
|
+
$key = $env:SHODAN_API_KEY
|
|
54
|
+
$url = "https://api.shodan.io/shodan/host/search?query=${query}&key=${key}"
|
|
55
|
+
|
|
56
|
+
$results = Invoke-RestMethod -Uri $url
|
|
57
|
+
Write-Host "Total results: $($results.total)"
|
|
58
|
+
$results.matches | Select-Object -First 10 | ForEach-Object {
|
|
59
|
+
Write-Host " $($_.ip_str):$($_.port) — $($_.org) ($($_.location.country_name))"
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Find CVEs on a host
|
|
64
|
+
|
|
65
|
+
```powershell
|
|
66
|
+
$ip = "TARGET_IP"
|
|
67
|
+
$key = $env:SHODAN_API_KEY
|
|
68
|
+
$host = Invoke-RestMethod -Uri "https://api.shodan.io/shodan/host/${ip}?key=${key}"
|
|
69
|
+
|
|
70
|
+
if ($host.vulns) {
|
|
71
|
+
Write-Host "CVEs found on ${ip}:"
|
|
72
|
+
$host.vulns.PSObject.Properties | ForEach-Object { Write-Host " $($_.Name)" }
|
|
73
|
+
} else {
|
|
74
|
+
Write-Host "No known CVEs found for ${ip}"
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Useful Shodan search filters
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
port:22 country:IN SSH servers in India
|
|
82
|
+
product:nginx version:1.14 Specific nginx version
|
|
83
|
+
org:"Amazon" Amazon-owned IPs
|
|
84
|
+
ssl.cert.subject.cn:*.example.com Certs for a domain
|
|
85
|
+
http.title:"Dashboard" port:80 Web dashboards on port 80
|
|
86
|
+
vuln:CVE-2021-44228 Log4Shell vulnerable hosts
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Examples
|
|
90
|
+
|
|
91
|
+
**"What is exposed on IP 1.2.3.4?"**
|
|
92
|
+
→ Use the host lookup. Shows open ports, services, OS.
|
|
93
|
+
|
|
94
|
+
**"Find all MongoDB servers with no auth"**
|
|
95
|
+
→ Query: `port:27017 product:MongoDB -authentication`
|
|
96
|
+
|
|
97
|
+
**"Search for Apache servers in India"**
|
|
98
|
+
→ Query: `product:Apache country:IN`
|
|
99
|
+
|
|
100
|
+
**"Does this IP have any known CVEs?"**
|
|
101
|
+
→ Use the CVE snippet above on the target IP.
|
|
102
|
+
|
|
103
|
+
## Cautions
|
|
104
|
+
|
|
105
|
+
- Free tier: 100 queries/month and 1 request/second — add `Start-Sleep -Milliseconds 1100` between bulk calls
|
|
106
|
+
- Shodan data is cached — it reflects the last scan date, not necessarily the current state
|
|
107
|
+
- Host lookups and scans data about publicly reachable services only — no active scanning is performed by this skill
|
|
108
|
+
- Never use Shodan results to attempt unauthorized access; this skill is for reconnaissance and awareness only
|
|
109
|
+
- The `vulns` field only appears when Shodan has matched CVE data to the service banner
|
|
110
|
+
|
|
111
|
+
## Requirements
|
|
112
|
+
|
|
113
|
+
- `SHODAN_API_KEY` — free account at https://account.shodan.io
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// skills/shodan/index.ts
|
|
2
|
+
// Programmatic handler — host lookups and search queries via Shodan API.
|
|
3
|
+
|
|
4
|
+
import { ApiSkill, requireApiKey } from '../../core/apiSkillBase'
|
|
5
|
+
|
|
6
|
+
const skill = new ApiSkill({
|
|
7
|
+
name: 'shodan',
|
|
8
|
+
baseUrl: 'https://api.shodan.io',
|
|
9
|
+
apiKeyEnv: 'SHODAN_API_KEY',
|
|
10
|
+
authType: 'query',
|
|
11
|
+
authQueryParam: 'key',
|
|
12
|
+
rateLimit: { requests: 1, windowMs: 1_000 },
|
|
13
|
+
timeout: 20_000,
|
|
14
|
+
retries: 3,
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
export interface ShodanService {
|
|
18
|
+
port: number
|
|
19
|
+
transport: string
|
|
20
|
+
product: string
|
|
21
|
+
version: string
|
|
22
|
+
banner: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ShodanHost {
|
|
26
|
+
ip: string
|
|
27
|
+
org: string
|
|
28
|
+
os: string | null
|
|
29
|
+
country: string
|
|
30
|
+
city: string
|
|
31
|
+
ports: number[]
|
|
32
|
+
services: ShodanService[]
|
|
33
|
+
hostnames: string[]
|
|
34
|
+
vulns: string[]
|
|
35
|
+
lastUpdate: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ShodanSearchResult {
|
|
39
|
+
total: number
|
|
40
|
+
matches: Array<{
|
|
41
|
+
ip: string
|
|
42
|
+
port: number
|
|
43
|
+
org: string
|
|
44
|
+
country: string
|
|
45
|
+
product: string
|
|
46
|
+
version: string
|
|
47
|
+
}>
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Look up a specific IP address in Shodan. */
|
|
51
|
+
export async function hostLookup(ip: string): Promise<ShodanHost> {
|
|
52
|
+
requireApiKey('SHODAN_API_KEY')
|
|
53
|
+
|
|
54
|
+
const raw = await skill.get(`/shodan/host/${encodeURIComponent(ip)}`)
|
|
55
|
+
|
|
56
|
+
const services: ShodanService[] = (raw.data ?? []).map((svc: any) => ({
|
|
57
|
+
port: svc.port ?? 0,
|
|
58
|
+
transport: svc.transport ?? 'tcp',
|
|
59
|
+
product: svc.product ?? '',
|
|
60
|
+
version: svc.version ?? '',
|
|
61
|
+
banner: svc.data ?? '',
|
|
62
|
+
}))
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
ip: raw.ip_str ?? ip,
|
|
66
|
+
org: raw.org ?? '',
|
|
67
|
+
os: raw.os ?? null,
|
|
68
|
+
country: raw.country_name ?? '',
|
|
69
|
+
city: raw.city ?? '',
|
|
70
|
+
ports: raw.ports ?? [],
|
|
71
|
+
services,
|
|
72
|
+
hostnames: raw.hostnames ?? [],
|
|
73
|
+
vulns: raw.vulns ? Object.keys(raw.vulns) : [],
|
|
74
|
+
lastUpdate: raw.last_update ?? '',
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Search Shodan using a filter query string. */
|
|
79
|
+
export async function search(query: string, page = 1): Promise<ShodanSearchResult> {
|
|
80
|
+
requireApiKey('SHODAN_API_KEY')
|
|
81
|
+
|
|
82
|
+
const raw = await skill.get('/shodan/host/search', { query, page: String(page) })
|
|
83
|
+
|
|
84
|
+
const matches = (raw.matches ?? []).map((m: any) => ({
|
|
85
|
+
ip: m.ip_str ?? '',
|
|
86
|
+
port: m.port ?? 0,
|
|
87
|
+
org: m.org ?? '',
|
|
88
|
+
country: m.location?.country_name ?? '',
|
|
89
|
+
product: m.product ?? '',
|
|
90
|
+
version: m.version ?? '',
|
|
91
|
+
}))
|
|
92
|
+
|
|
93
|
+
return { total: raw.total ?? 0, matches }
|
|
94
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "shodan",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Search Shodan for internet-connected devices, open ports, and services — host lookups and database queries",
|
|
5
|
+
"author": "aiden",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"tools": [],
|
|
8
|
+
"trigger_phrases": [],
|
|
9
|
+
"compatible_agents": [
|
|
10
|
+
"aiden"
|
|
11
|
+
],
|
|
12
|
+
"min_agent_version": "3.0.0",
|
|
13
|
+
"tags": [
|
|
14
|
+
"security",
|
|
15
|
+
"shodan",
|
|
16
|
+
"osint",
|
|
17
|
+
"recon",
|
|
18
|
+
"ports",
|
|
19
|
+
"services",
|
|
20
|
+
"iot",
|
|
21
|
+
"asset-discovery",
|
|
22
|
+
"cve",
|
|
23
|
+
"infosec"
|
|
24
|
+
],
|
|
25
|
+
"created": "2026-04-27T17:11:40.713Z"
|
|
26
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: songsee
|
|
3
|
+
description: Visualize audio files as mel spectrograms, chromagrams, and MFCC plots using Python librosa
|
|
4
|
+
category: media
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
origin: aiden
|
|
7
|
+
license: Apache-2.0
|
|
8
|
+
tags: audio, spectrogram, mel, chroma, mfcc, librosa, visualization, music, sound-analysis
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Audio Visualization with Spectrograms
|
|
12
|
+
|
|
13
|
+
Visualize audio files as mel spectrograms, chromagrams, and MFCC feature plots using the `librosa` Python library. Useful for music analysis, speech processing, and audio debugging.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- User wants to visualize what an audio file "looks like"
|
|
18
|
+
- User wants to analyze the frequency content of a recording
|
|
19
|
+
- User wants to compare two audio files visually
|
|
20
|
+
- User wants to understand musical key or chroma content
|
|
21
|
+
- User wants to extract MFCC features for a machine learning task
|
|
22
|
+
|
|
23
|
+
## How to Use
|
|
24
|
+
|
|
25
|
+
### 1. Install dependencies
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
pip install librosa matplotlib soundfile
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2. Generate a mel spectrogram
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
import librosa
|
|
35
|
+
import librosa.display
|
|
36
|
+
import matplotlib.pyplot as plt
|
|
37
|
+
import numpy as np
|
|
38
|
+
|
|
39
|
+
def mel_spectrogram(audio_path, output="mel_spec.png"):
|
|
40
|
+
y, sr = librosa.load(audio_path, sr=None)
|
|
41
|
+
S = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=128, fmax=8000)
|
|
42
|
+
S_db = librosa.power_to_db(S, ref=np.max)
|
|
43
|
+
|
|
44
|
+
fig, ax = plt.subplots(figsize=(12, 4), facecolor="#0d1117")
|
|
45
|
+
ax.set_facecolor("#0d1117")
|
|
46
|
+
img = librosa.display.specshow(S_db, sr=sr, x_axis="time", y_axis="mel", fmax=8000, ax=ax, cmap="magma")
|
|
47
|
+
fig.colorbar(img, ax=ax, format="%+2.0f dB", label="dB")
|
|
48
|
+
ax.set_title(f"Mel Spectrogram — {audio_path}", color="white")
|
|
49
|
+
ax.tick_params(colors="white")
|
|
50
|
+
ax.xaxis.label.set_color("white")
|
|
51
|
+
ax.yaxis.label.set_color("white")
|
|
52
|
+
plt.tight_layout()
|
|
53
|
+
plt.savefig(output, dpi=150, bbox_inches="tight")
|
|
54
|
+
plt.close()
|
|
55
|
+
print(f"Saved: {output}")
|
|
56
|
+
|
|
57
|
+
mel_spectrogram("song.mp3")
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 3. Generate a chromagram (musical key content)
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
import librosa, librosa.display, matplotlib.pyplot as plt
|
|
64
|
+
|
|
65
|
+
def chromagram(audio_path, output="chroma.png"):
|
|
66
|
+
y, sr = librosa.load(audio_path, sr=None)
|
|
67
|
+
chroma = librosa.feature.chroma_cqt(y=y, sr=sr)
|
|
68
|
+
|
|
69
|
+
fig, ax = plt.subplots(figsize=(12, 4), facecolor="#0d1117")
|
|
70
|
+
ax.set_facecolor("#0d1117")
|
|
71
|
+
img = librosa.display.specshow(chroma, y_axis="chroma", x_axis="time", ax=ax, cmap="coolwarm")
|
|
72
|
+
fig.colorbar(img, ax=ax)
|
|
73
|
+
ax.set_title("Chromagram", color="white")
|
|
74
|
+
ax.tick_params(colors="white")
|
|
75
|
+
plt.tight_layout()
|
|
76
|
+
plt.savefig(output, dpi=150, bbox_inches="tight")
|
|
77
|
+
plt.close()
|
|
78
|
+
print(f"Saved: {output}")
|
|
79
|
+
|
|
80
|
+
chromagram("song.mp3")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 4. Generate MFCC features
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
import librosa, librosa.display, matplotlib.pyplot as plt
|
|
87
|
+
import numpy as np
|
|
88
|
+
|
|
89
|
+
def mfcc_plot(audio_path, n_mfcc=20, output="mfcc.png"):
|
|
90
|
+
y, sr = librosa.load(audio_path, sr=None)
|
|
91
|
+
mfccs = librosa.feature.mfcc(y=y, sr=sr, n_mfcc=n_mfcc)
|
|
92
|
+
|
|
93
|
+
fig, ax = plt.subplots(figsize=(12, 4), facecolor="#0d1117")
|
|
94
|
+
ax.set_facecolor("#0d1117")
|
|
95
|
+
img = librosa.display.specshow(mfccs, x_axis="time", ax=ax, cmap="viridis")
|
|
96
|
+
fig.colorbar(img, ax=ax)
|
|
97
|
+
ax.set_title(f"MFCC ({n_mfcc} coefficients)", color="white")
|
|
98
|
+
ax.tick_params(colors="white")
|
|
99
|
+
plt.tight_layout()
|
|
100
|
+
plt.savefig(output, dpi=150, bbox_inches="tight")
|
|
101
|
+
plt.close()
|
|
102
|
+
print(f"Saved: {output}")
|
|
103
|
+
|
|
104
|
+
mfcc_plot("speech.wav", n_mfcc=13)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 5. Generate all three plots at once
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
def analyze_audio(audio_path):
|
|
111
|
+
base = audio_path.rsplit(".", 1)[0]
|
|
112
|
+
mel_spectrogram(audio_path, output=f"{base}_mel.png")
|
|
113
|
+
chromagram(audio_path, output=f"{base}_chroma.png")
|
|
114
|
+
mfcc_plot(audio_path, output=f"{base}_mfcc.png")
|
|
115
|
+
print(f"Analysis complete: 3 PNG files saved for {audio_path}")
|
|
116
|
+
|
|
117
|
+
analyze_audio("recording.wav")
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 6. Get basic audio statistics
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
import librosa, numpy as np
|
|
124
|
+
|
|
125
|
+
y, sr = librosa.load("audio.mp3", sr=None)
|
|
126
|
+
duration = librosa.get_duration(y=y, sr=sr)
|
|
127
|
+
tempo, _ = librosa.beat.beat_track(y=y, sr=sr)
|
|
128
|
+
rms = np.sqrt(np.mean(y**2))
|
|
129
|
+
|
|
130
|
+
print(f"Duration: {duration:.2f} seconds")
|
|
131
|
+
print(f"Sample rate:{sr} Hz")
|
|
132
|
+
print(f"Tempo: {tempo:.1f} BPM")
|
|
133
|
+
print(f"RMS energy: {rms:.4f}")
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Examples
|
|
137
|
+
|
|
138
|
+
**"Show me what this audio recording looks like as a spectrogram"**
|
|
139
|
+
→ Use step 2 to generate a mel spectrogram PNG. Open the saved file.
|
|
140
|
+
|
|
141
|
+
**"What musical key is this song in? Visualize the chroma content"**
|
|
142
|
+
→ Use step 3 to generate a chromagram — peaks in chroma rows indicate dominant pitch classes.
|
|
143
|
+
|
|
144
|
+
**"Generate MFCC features from this speech recording for my ML model"**
|
|
145
|
+
→ Use step 4 to plot MFCCs, then extract the `mfccs` array for downstream ML use.
|
|
146
|
+
|
|
147
|
+
## Cautions
|
|
148
|
+
|
|
149
|
+
- librosa loads audio in float32 mono by default — stereo files are mixed down automatically
|
|
150
|
+
- Large audio files (> 30 minutes) take significant time and memory to process — slice with `offset` and `duration` parameters if needed
|
|
151
|
+
- `librosa.load` supports MP3, WAV, FLAC, OGG — ensure `soundfile` and `audioread` are installed for MP3 support
|
|
152
|
+
- MFCC coefficients are sensitive to `n_mfcc` and `sr` — use consistent settings across all files in an ML dataset
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "songsee",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Visualize audio files as mel spectrograms, chromagrams, and MFCC plots using Python librosa",
|
|
5
|
+
"author": "aiden",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"tools": [],
|
|
8
|
+
"trigger_phrases": [],
|
|
9
|
+
"compatible_agents": [
|
|
10
|
+
"aiden"
|
|
11
|
+
],
|
|
12
|
+
"min_agent_version": "3.0.0",
|
|
13
|
+
"tags": [
|
|
14
|
+
"audio",
|
|
15
|
+
"spectrogram",
|
|
16
|
+
"mel",
|
|
17
|
+
"chroma",
|
|
18
|
+
"mfcc",
|
|
19
|
+
"librosa",
|
|
20
|
+
"visualization",
|
|
21
|
+
"music",
|
|
22
|
+
"sound-analysis"
|
|
23
|
+
],
|
|
24
|
+
"created": "2026-04-27T17:11:40.732Z"
|
|
25
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ssllabs
|
|
3
|
+
description: Comprehensive TLS/SSL analysis via Qualys SSL Labs — grades cipher suites, certificate chains, protocol versions, and known vulnerabilities
|
|
4
|
+
category: security
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
license: Apache-2.0
|
|
7
|
+
origin: aiden
|
|
8
|
+
tags: security, ssl, tls, certificates, ssllabs, qualys, https, ciphers, heartbleed, poodle, compliance
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# SSL Labs — TLS/SSL Deep Analysis
|
|
12
|
+
|
|
13
|
+
Qualys SSL Labs performs a comprehensive TLS/SSL scan and assigns a grade from A+ to F. It checks cipher suite strength, certificate validity and chain, protocol support (TLS 1.0–1.3), forward secrecy, and known vulnerabilities like Heartbleed, POODLE, DROWN, and LOGJAM.
|
|
14
|
+
|
|
15
|
+
**No API key required.** Scans can take 60–120 seconds for first-time analysis.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- Verify TLS configuration before or after a certificate renewal
|
|
20
|
+
- Compliance check: confirm TLS 1.0/1.1 is disabled, HSTS is set
|
|
21
|
+
- Incident response: check if a server is vulnerable to Heartbleed or POODLE
|
|
22
|
+
- User asks "what grade is my SSL?", "is the TLS cert on X valid?", "does site support TLS 1.3?"
|
|
23
|
+
|
|
24
|
+
## How to Use
|
|
25
|
+
|
|
26
|
+
### Start a scan and poll for results
|
|
27
|
+
|
|
28
|
+
```powershell
|
|
29
|
+
$host = "github.com"
|
|
30
|
+
$apiUrl = "https://api.ssllabs.com/api/v3/analyze"
|
|
31
|
+
|
|
32
|
+
# Start new scan
|
|
33
|
+
$result = Invoke-RestMethod -Uri "$apiUrl`?host=$host&publish=off&startNew=on&all=done"
|
|
34
|
+
Write-Host "Status: $($result.status)"
|
|
35
|
+
|
|
36
|
+
# Poll until ready (may take 1-2 minutes)
|
|
37
|
+
while ($result.status -ne 'READY' -and $result.status -ne 'ERROR') {
|
|
38
|
+
Start-Sleep -Seconds 20
|
|
39
|
+
$result = Invoke-RestMethod -Uri "$apiUrl`?host=$host&publish=off&all=done"
|
|
40
|
+
Write-Host "Status: $($result.status) — $(($result.endpoints | Measure-Object).Count) endpoint(s)"
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
$result.endpoints | ForEach-Object {
|
|
44
|
+
Write-Host " $($_.ipAddress) Grade: $($_.grade) $($_.statusMessage)"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Check TLS protocols and known vulnerabilities
|
|
49
|
+
|
|
50
|
+
```powershell
|
|
51
|
+
$host = "example.com"
|
|
52
|
+
$result = Invoke-RestMethod -Uri "https://api.ssllabs.com/api/v3/analyze?host=$host&publish=off&all=done"
|
|
53
|
+
|
|
54
|
+
while ($result.status -ne 'READY') {
|
|
55
|
+
Start-Sleep -Seconds 15
|
|
56
|
+
$result = Invoke-RestMethod -Uri "https://api.ssllabs.com/api/v3/analyze?host=$host&publish=off&all=done"
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
$ep = $result.endpoints[0]
|
|
60
|
+
Write-Host "Grade: $($ep.grade)"
|
|
61
|
+
Write-Host "TLS protocols supported:"
|
|
62
|
+
$ep.details.protocols | ForEach-Object { Write-Host " $($_.name) $($_.version)" }
|
|
63
|
+
Write-Host ""
|
|
64
|
+
Write-Host "Vulnerabilities:"
|
|
65
|
+
Write-Host " Heartbleed: $($ep.details.heartbleed)"
|
|
66
|
+
Write-Host " POODLE (SSL): $($ep.details.poodleSsl)"
|
|
67
|
+
Write-Host " FREAK: $($ep.details.freak)"
|
|
68
|
+
Write-Host " LOGJAM: $($ep.details.logjam)"
|
|
69
|
+
Write-Host " DROWN: $($ep.details.drownVulnerable)"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Get the direct report URL (instant — no waiting)
|
|
73
|
+
|
|
74
|
+
```powershell
|
|
75
|
+
$host = "taracod.com"
|
|
76
|
+
$encoded = [Uri]::EscapeDataString($host)
|
|
77
|
+
$url = "https://www.ssllabs.com/ssltest/analyze.html?d=$encoded&hideResults=on&ignoreMismatch=on"
|
|
78
|
+
Write-Host "Open in browser: $url"
|
|
79
|
+
Start-Process $url
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Examples
|
|
83
|
+
|
|
84
|
+
**"What SSL grade does github.com get?"**
|
|
85
|
+
→ Scan and poll — typically returns A+ in ~90 seconds.
|
|
86
|
+
|
|
87
|
+
**"Is my server vulnerable to Heartbleed?"**
|
|
88
|
+
→ Scan and check `endpoints[0].details.heartbleed` — should be false.
|
|
89
|
+
|
|
90
|
+
**"Does this server still support TLS 1.0?"**
|
|
91
|
+
→ Check `endpoints[0].details.protocols` — TLS 1.0 and 1.1 should be absent for A grade.
|
|
92
|
+
|
|
93
|
+
**"Just give me the SSL Labs link for my site"**
|
|
94
|
+
→ Use `quickScan` — returns the browser URL instantly without waiting.
|
|
95
|
+
|
|
96
|
+
## Cautions
|
|
97
|
+
|
|
98
|
+
- First-time scans for a new host take 60–120 seconds — cached results return in seconds
|
|
99
|
+
- `publish=off` is essential — without it, results appear on the public leaderboard
|
|
100
|
+
- SSL Labs API rate limits: 1 request per 2 seconds — do not spam the poll loop
|
|
101
|
+
- Scans from the same IP on the same host within 24h return cached results by default
|
|
102
|
+
- A READY result with `gradeTrustIgnored` different from `grade` means there is a certificate trust issue
|
|
103
|
+
|
|
104
|
+
## Requirements
|
|
105
|
+
|
|
106
|
+
- None — no API key needed
|
|
107
|
+
- For bulk scanning, respect the rate limits or use the direct URL and view in browser
|