Init flake

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-03-25 19:16:01 +01:00
parent e008473cf5
commit 8a6133dd15
8 changed files with 2071 additions and 14 deletions

View File

@@ -11,7 +11,7 @@
# Another Hadi's Blog # Another Hadi's Blog
My personal portfolio & blog; built with **Astro**, **Tailwind CSS** and **DaisyUI**. My personal portfolio & blog; built with **Astro**, **Tailwind CSS** and **DaisyUI**.
Live at [hadi.diy](https://hadi.diy). Live at [hadi.icu](https://hadi.icu).
Started from [bloomfolio](https://github.com/lauroguedes/bloomfolio), thanks for this great project! Started from [bloomfolio](https://github.com/lauroguedes/bloomfolio), thanks for this great project!

View File

@@ -6,7 +6,11 @@ import mdx from '@astrojs/mdx';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: "https://hadi.diy", image: {
service: { entrypoint: 'astro/assets/services/noop' }
},
site: "https://hadi.icu",
output: 'static',
integrations: [mdx()], integrations: [mdx()],
vite: { vite: {
plugins: [tailwindcss()] plugins: [tailwindcss()]

1844
bun.nix Normal file

File diff suppressed because it is too large Load Diff

136
flake.lock generated Normal file
View File

@@ -0,0 +1,136 @@
{
"nodes": {
"bun2nix": {
"inputs": {
"flake-parts": "flake-parts",
"import-tree": "import-tree",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1770895533,
"narHash": "sha256-v3QaK9ugy9bN9RXDnjw0i2OifKmz2NnKM82agtqm/UY=",
"owner": "nix-community",
"repo": "bun2nix",
"rev": "c843f477b15f51151f8c6bcc886954699440a6e1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "bun2nix",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"import-tree": {
"locked": {
"lastModified": 1763762820,
"narHash": "sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0=",
"owner": "vic",
"repo": "import-tree",
"rev": "3c23749d8013ec6daa1d7255057590e9ca726646",
"type": "github"
},
"original": {
"owner": "vic",
"repo": "import-tree",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1774106199,
"narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1769909678,
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "72716169fe93074c333e8d0173151350670b824c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": {
"inputs": {
"bun2nix": "bun2nix",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"bun2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1770228511,
"narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "337a4fe074be1042a35086f15481d763b8ddc0e7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

73
flake.nix Normal file
View File

@@ -0,0 +1,73 @@
{
description = "anotherhadi blog";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
bun2nix = {
url = "github:nix-community/bun2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
bun2nix,
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
bun2nixPkg = bun2nix.packages.${system}.default;
blog = pkgs.stdenv.mkDerivation (finalAttrs: {
pname = "blog";
version = "1.0.0";
src = ./.;
nativeBuildInputs = [
pkgs.bun
bun2nixPkg.hook
];
bunDeps = bun2nixPkg.fetchBunDeps {
bunNix = ./bun.nix;
};
buildPhase = ''
runHook preBuild
bun run build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/blog
cp -r dist/* $out/share/blog/
runHook postInstall
'';
meta = {
description = "Anotherhadi's blog";
homepage = "https://github.com/anotherhadi/blog";
license = pkgs.lib.licenses.mit;
mainProgram = "blog";
};
});
in {
packages.${system} = {
inherit blog;
default = blog;
};
devShells.${system}.default = pkgs.mkShell {
packages = [
pkgs.bun
bun2nixPkg
];
};
};
}

View File

@@ -12,7 +12,7 @@ When a manufacturer ships a router, a camera, or a piece of software, it needs t
_The problem?_ Most users never change them. Whether out of convenience, lack of awareness, or simply because the service "works fine as-is", these factory-set credentials often remain active long after deployment.. turning a minor convenience into a serious **security hole**. _The problem?_ Most users never change them. Whether out of convenience, lack of awareness, or simply because the service "works fine as-is", these factory-set credentials often remain active long after deployment.. turning a minor convenience into a serious **security hole**.
To help security researchers and pentesters quickly identify these exposure points, I built **[default-creds](https://default-creds.hadi.diy)**. It's an open-source, community-driven database of default credentials. Just search for a device or service, and you'll instantly get its known factory-set username and password. It also comes with a public API, documented at [default-creds.hadi.diy/api-docs](https://default-creds.hadi.diy/api-docs). To help security researchers and pentesters quickly identify these exposure points, I built **[default-creds](https://default-creds.hadi.icu)**. It's an open-source, community-driven database of default credentials. Just search for a device or service, and you'll instantly get its known factory-set username and password. It also comes with a public API, documented at [default-creds.hadi.icu/api-docs](https://default-creds.hadi.icu/api-docs).
## Real-world impact ## Real-world impact
@@ -36,11 +36,11 @@ Default credentials aren't just a consumer problem. Enterprises, developers, and
1. **Change default credentials immediately.** The moment you deploy a new device or service, changing the default username and password should be the first thing you do; before it ever touches a production network. 1. **Change default credentials immediately.** The moment you deploy a new device or service, changing the default username and password should be the first thing you do; before it ever touches a production network.
2. **Use strong, unique passwords.** Replacing `admin:admin` with `admin:admin123` doesn't count. Use a password manager to generate and store proper credentials for each service. 2. **Use strong, unique passwords.** Replacing `admin:admin` with `admin:admin123` doesn't count. Use a password manager to generate and store proper credentials for each service.
3. **Audit your infrastructure.** You can't fix what you don't know about. Regularly scan your own systems for services still running on default credentials: this is exactly the kind of task [default-creds](https://default-creds.hadi.diy/) is built for. 3. **Audit your infrastructure.** You can't fix what you don't know about. Regularly scan your own systems for services still running on default credentials: this is exactly the kind of task [default-creds](https://default-creds.hadi.icu/) is built for.
### For developers ### For developers
1. **Never ship with hardcoded default credentials.** A default password baked into your codebase is a vulnerability waiting to be exploited (and it will end up in databases like [default-creds](https://default-creds.hadi.diy) :p ) 1. **Never ship with hardcoded default credentials.** A default password baked into your codebase is a vulnerability waiting to be exploited (and it will end up in databases like [default-creds](https://default-creds.hadi.icu) :p )
2. **Force a password change on first launch.** If your software needs a default to function, make it temporary. Block access until the user has set their own credentials. 2. **Force a password change on first launch.** If your software needs a default to function, make it temporary. Block access until the user has set their own credentials.
3. **Generate a random password instead.** Even better: skip the default entirely. Generate a strong, unique password at install time and print it once in the console or the setup logs. The user still should change this password. 3. **Generate a random password instead.** Even better: skip the default entirely. Generate a strong, unique password at install time and print it once in the console or the setup logs. The user still should change this password.

View File

@@ -3,7 +3,7 @@ title: "Default-Creds"
description: "Default Creds is a centralized, community-driven repository of factory-set credentials. Designed for pentesters and security researchers, it helps identify weak access points during engagement phases or audit internal infrastructure before they become a security liability." description: "Default Creds is a centralized, community-driven repository of factory-set credentials. Designed for pentesters and security researchers, it helps identify weak access points during engagement phases or audit internal infrastructure before they become a security liability."
image: "../../../public/images/projects/default-creds.png" image: "../../../public/images/projects/default-creds.png"
tags: ["default-password", "cybersecurity"] tags: ["default-password", "cybersecurity"]
demoLink: "https://default-creds.hadi.diy" demoLink: "https://default-creds.hadi.icu"
sourceLink: "https://github.com/anotherhadi/default-creds" sourceLink: "https://github.com/anotherhadi/default-creds"
--- ---
@@ -22,9 +22,9 @@ sourceLink: "https://github.com/anotherhadi/default-creds"
**Default Creds** is a centralized, community-driven repository of factory-set credentials. Designed for pentesters and security researchers, it helps identify weak access points during engagement phases or audit internal infrastructure before they become a security liability. **Default Creds** is a centralized, community-driven repository of factory-set credentials. Designed for pentesters and security researchers, it helps identify weak access points during engagement phases or audit internal infrastructure before they become a security liability.
**Live Instance:** [default-creds.hadi.diy](https://default-creds.hadi.diy) **Live Instance:** [default-creds.hadi.icu](https://default-creds.hadi.icu)
**API Documentation:** [default-creds.hadi.diy/api-docs](https://default-creds.hadi.diy/api-docs) **API Documentation:** [default-creds.hadi.icu/api-docs](https://default-creds.hadi.icu/api-docs)
## 🎯 The Mission ## 🎯 The Mission

View File

@@ -3,7 +3,7 @@ title: "Nix 4 cyber"
description: "A modular, opensource toolkit & knowledge-base for cybersecurity professionals built with nix & markdown, for CTF, OSINT or Pentest." description: "A modular, opensource toolkit & knowledge-base for cybersecurity professionals built with nix & markdown, for CTF, OSINT or Pentest."
image: "../../../public/images/projects/n4c.png" image: "../../../public/images/projects/n4c.png"
tags: ["nix", "ctf", "cybersecurity", "cheatsheets"] tags: ["nix", "ctf", "cybersecurity", "cheatsheets"]
url: "https://n4c.hadi.diy" url: "https://n4c.hadi.icu"
sourceLink: "https://github.com/nix4cyber/n4c" sourceLink: "https://github.com/nix4cyber/n4c"
--- ---
@@ -19,9 +19,9 @@ N4C (**nix4cyber**) is a personal knowledge-base and toolbox for CTF (capture th
It combines three core components: It combines three core components:
- [Nix-based shells](https://n4c.hadi.diy/shells): pre-configured environments for specific security domains (web, cracking, networking, forensic, ...). - [Nix-based shells](https://n4c.hadi.icu/shells): pre-configured environments for specific security domains (web, cracking, networking, forensic, ...).
- [Cheatsheets](https://n4c.hadi.diy/cheatsheets/cheatsheets): quick reference guides organized by category. - [Cheatsheets](https://n4c.hadi.icu/cheatsheets/cheatsheets): quick reference guides organized by category.
- [CTF writeups](https://n4c.hadi.diy/writeups): markdown-formatted reports of challenges we've solved. - [CTF writeups](https://n4c.hadi.icu/writeups): markdown-formatted reports of challenges we've solved.
All content is served through a static website built with [Hugo](https://gohugo.io/) and the [Doks](https://github.com/DELIGHT-LABS/hugo-theme-doks) (<3) theme, hosted on Netlify. The project is fully opensource under the MIT license and lives on GitHub. All content is served through a static website built with [Hugo](https://gohugo.io/) and the [Doks](https://github.com/DELIGHT-LABS/hugo-theme-doks) (<3) theme, hosted on Netlify. The project is fully opensource under the MIT license and lives on GitHub.
@@ -34,9 +34,9 @@ You can then start a shell with the following command:
nix develop github:nix4cyber/n4c#<toolkit> nix develop github:nix4cyber/n4c#<toolkit>
``` ```
You could also install the alias `n4c` ([see here](https://n4c.hadi.diy/shells#alias)) and only type `n4c <toolkit>` You could also install the alias `n4c` ([see here](https://n4c.hadi.icu/shells#alias)) and only type `n4c <toolkit>`
More informations about shells & toolkits [here](https://n4c.hadi.diy/shells) More informations about shells & toolkits [here](https://n4c.hadi.icu/shells)
### Example ### Example