All Projects → stefano-m → lua-enum

stefano-m / lua-enum

Licence: Apache-2.0 license
Enumerated Types for Lua

Programming Languages

lua
6591 projects
Nix
1067 projects
Makefile
30231 projects

Projects that are alternatives of or similar to lua-enum

php-enumeration
Implementation of enumeration classes in PHP. The better alternative for enums
Stars: ✭ 54 (+237.5%)
Mutual labels:  enumeration
enumerated type
Simple enumerated types
Stars: ✭ 14 (-12.5%)
Mutual labels:  enumerated-types
WhoEnum
Mass querying whois records
Stars: ✭ 24 (+50%)
Mutual labels:  enumeration
Platenum
The PHP enumeration type library
Stars: ✭ 34 (+112.5%)
Mutual labels:  enumeration
Blowhole
Docker auditing and enumeration script.
Stars: ✭ 21 (+31.25%)
Mutual labels:  enumeration
AzureAD Autologon Brute
Brute force attack tool for Azure AD Autologon/Seamless SSO - Source: https://arstechnica.com/information-technology/2021/09/new-azure-active-directory-password-brute-forcing-flaw-has-no-fix/
Stars: ✭ 90 (+462.5%)
Mutual labels:  enumeration
Sudomy
Sudomy is a subdomain enumeration tool to collect subdomains and analyzing domains performing automated reconnaissance (recon) for bug hunting / pentesting
Stars: ✭ 1,572 (+9725%)
Mutual labels:  enumeration
Spray365
Spray365 makes spraying Microsoft accounts (Office 365 / Azure AD) easy through its customizable two-step password spraying approach. The built-in execution plan features options that attempt to bypass Azure Smart Lockout and insecure conditional access policies.
Stars: ✭ 233 (+1356.25%)
Mutual labels:  enumeration
php-enum
Enumeration support for PHP
Stars: ✭ 17 (+6.25%)
Mutual labels:  enumeration
graphw00f
graphw00f is GraphQL Server Engine Fingerprinting utility for software security professionals looking to learn more about what technology is behind a given GraphQL endpoint.
Stars: ✭ 260 (+1525%)
Mutual labels:  enumeration
roboxtractor
Extract endpoints marked as disallow in robots files to generate wordlists.
Stars: ✭ 40 (+150%)
Mutual labels:  enumeration
CEH
Exam Prep for the Ec-council Certified Ethical Hacker 312-50
Stars: ✭ 71 (+343.75%)
Mutual labels:  enumeration
nightcall
Automated Enumeration Script for Pentesting
Stars: ✭ 32 (+100%)
Mutual labels:  enumeration
Cheat-Sheet---Active-Directory
This cheat sheet contains common enumeration and attack methods for Windows Active Directory with the use of powershell.
Stars: ✭ 154 (+862.5%)
Mutual labels:  enumeration
Lucifer
A Powerful Penetration Tool For Automating Penetration Tasks Such As Local Privilege Escalation, Enumeration, Exfiltration and More... Use Or Build Automation Modules To Speed Up Your Cyber Security Life
Stars: ✭ 302 (+1787.5%)
Mutual labels:  enumeration
findcdn
findCDN is a tool created to help accurately identify what CDN a domain is using.
Stars: ✭ 64 (+300%)
Mutual labels:  enumeration
spicescript
A Handy-Dandy Personal Toolkit for Enumeration and a headstart on attacking a machine!
Stars: ✭ 20 (+25%)
Mutual labels:  enumeration
zBuster
Bash script for CTF automating basic enumeration
Stars: ✭ 20 (+25%)
Mutual labels:  enumeration
massh-enum
OpenSSH 2.3 up to 7.4 Mass Username Enumeration (CVE-2018-15473).
Stars: ✭ 136 (+750%)
Mutual labels:  enumeration
php-enum
Better PHP enum support
Stars: ✭ 23 (+43.75%)
Mutual labels:  enumeration

Build Status codecov

Enum @VERSION@ - Simulate Enums in Lua

This is a little module that simulates enumerated types in Lua.

Its API is very similar to the Python3 Enum API, although much more limited.

Example Usage

enum = require("enum")

sizes = {"SMALL", "MEDIUM", "BIG"}
Size = enum.new("Size", sizes)
print(Size) -- "<enum 'Size'>"
print(Size.SMALL) -- "<Size.SMALL: 1>"
print(Size.SMALL.name) -- "SMALL"
print(Size.SMALL.value) -- 1
assert(Size.SMALL ~= Size.BIG) -- true
assert(Size.SMALL < Size.BIG) -- error "Unsupported operation"
assert(Size[1] == Size.SMALL) -- true
Size[5] -- error "Invalid enum member: 5"

-- Enums cannot be modified
Size.MINI -- error "Invalid enum: MINI"
assert(Size.BIG.something == nil) -- true
Size.MEDIUM.other = 1 -- error "Cannot set fields in enum value"

-- Keys cannot be reused
Color = enum.new("Color", {"RED", "RED"}) -- error "Attempted to reuse key: 'RED'"

Installing

Using "classic" nix

If you are on NixOS, you can install this package from nix-stefano-m-overlays.

Using nix flakes

This package can be installed as a nix flake. It provides packages for the various versions of Lua shipped with nix as well as an overlay that adds the enum attribute to the Lua package sets.


NOTE

To ensure that the flake overlays are composable, enum is added directly to the top-level luaPackages. An unfortunate consequence is that enum will not be present in lua.pkgs. To use enum in lua.withPackages, one must refer to the top-level luaPackages.

For example, say that you want a Lua environment with enum and http, you need to do something like:

let
  # assume that enumOverlay is the overlay provided by the enum flake.
  pkgs = import <nixpkgs> {overlays = [enumOverlay];};
in
# http is present in lua.pkgs
# enum is not present in lua.pkgs
myLuaEnv = pkgs.lua.withPackages(ps: [ps.http pkgs.luaPackages.enum])

Using Luarocks

This package is published to Luarocks as enum and can be installed using

luarocks install enum
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].