Yaklang (CDSL-YAK)

website·Indexed 32 days ago

https://yaklang.io/docs/intro/

A dynamically typed, Go-runtime-backed domain-specific programming language (CDSL-YAK) built for cybersecurity engineering. The project includes the Yaklang language, Yakit (latest release v1.4.9-0925), and YakLab tutorials, providing tools for security research workflows, AI agent engines, and built-in modules for xpath and jsonstream.

Tokens
6.3K
Snippets
3
Records
93
Agent score
61%

What's inside Yaklang

  1. Overview of AI Programming in Yaklang

    Yaklang treats Large Language Models (LLMs) as first-class citizens. It allows developers to initiate conversations, perform function calls, consume structured data streams, process large text via pipelines, and run ReAct agents directly within security scripts.
  2. Overview of the Yak Project Ecosystem

    The Yak Project provides a suite of tools for cybersecurity engineering:

    • Yaklang (YAK): A domain-specific programming language (CDSL-YAK) designed to unify scanning, proof-of-concept development, vulnerability validation, traffic analysis, and security automation.
    • Yakit: An open-source, cross-platform GUI cybersecurity workbench built on Yaklang, used for penetration testing and security collaboration. It supports Windows, macOS, and Linux.
    • IRify: A source-code security analysis tool built on YAK SSA and SyntaxFlow, used for reproducible and extensible multi-language static analysis and vulnerability discovery.
  3. Use Yaklang for cybersecurity engineering

    Yaklang (CDSL-YAK) is a domain-specific programming language designed for cybersecurity engineering. It is used to unify scanning, proof-of-concept (PoC) authoring, vulnerability validation, traffic analysis, and security automation.
  4. Create an HTTP server with the httpserver library

    The httpserver library allows developers to quickly start an HTTP service by registering a handler function. The handler provides access to the request (req) and response writer (rsp), which is useful for creating Mock APIs, callback services, or local debugging tools.
  5. Perform text similarity analysis with SSDeep, SimHash, and SQLMAP

    Yak provides a unified interface for three text similarity algorithms to determine if pages are identical or similar, which is useful for generic vulnerability detection. SSDeep is recommended for processing massive amounts of text.
  6. Send raw HTTP packets for security testing

    Yak provides a specialized method for sending raw HTTP packets optimized for security research, bypassing some of the standard Golang http module abstractions. The engine automatically handles the calculation of Content-Length unless manually overridden.
  7. Use the xpath module for HTML processing

    The xpath built-in module provides a streamlined wrapper around htmlquery for processing HTML. Before using the query APIs, you must generate an operable HTML document using xpath.LoadHTMLDocument.
  8. Implement modular programming in Yaklang

    Yaklang supports multi-file programming and modularity. It provides specific global variables to help locate files and resource directories, including YAKMAIN (a boolean that is true only when the file is the primary entry point and false when imported by another file).
  9. Install and access Yak Project source code

    The Yak Project is open source and hosted on GitHub under the organization github.com/yaklang. Key repositories include:

    • yaklang: Contains the language and runtime.
    • yakit: Contains the security workbench.

    To install Yakit, use the installers provided on the official website Downloads page. To install the Yaklang runtime, follow the configuration instructions located in the yaklang project repository.