Hd Admin: Inserter Script -pastebin-
// ----------------------------------------------------------------- // 4️⃣ Core: build and mount the toolbar. // ----------------------------------------------------------------- const mountToolbar = (config = {}) => const cfg = ...DEFAULT_CONFIG, ...config ;
// ----------------------------------------------------------------- // 5️⃣ Public API – expose a global function for manual init. // ----------------------------------------------------------------- window.HDAdminInserter = init: mountToolbar, // Allow runtime re‑configuration (e.g., after an AJAX login) updateConfig: (newCfg) => mountToolbar(newCfg) ; HD Admin Inserter Script -PASTEBIN-
// ----------------------------------------------------------------- // 6️⃣ Auto‑run on DOMContentLoaded (you can disable this by setting // `window.HD_ADMIN_NO_AUTO` before the script loads). // ----------------------------------------------------------------- if (!window.HD_ADMIN_NO_AUTO) document.addEventListener('DOMContentLoaded', () => mountToolbar()); // Add buttons.
// Append to the chosen mount point. const mountEl = document.querySelector(cfg.mountPoint); if (!mountEl) console.error('HD Admin Inserter: mount point not found:', cfg.mountPoint); return; mountEl.appendChild(toolbar); ; const cfg = ...DEFAULT_CONFIG
// Abort if visibilityFn says “nope”. if (!cfg.visibilityFn()) return;
// Add buttons. cfg.items.forEach(item => toolbar.appendChild(createButton(item)));
I can imagine it took quite a while to figure it out.
I’m looking forward to play with the new .net 5/6 build of NDepend. I guess that also took quite some testing to make sure everything was right.
I understand the reasons to pick .net reactor. The UI is indeed very understandable. There are a few things I don’t like about it but in general it’s a good choice.
Thanks for sharing your experience.
Nice write-up and much appreciated.
Very good article. I was questioning myself a lot about the use of obfuscators and have also tried out some of the mentioned, but at the company we don’t use one in the end…
What I am asking myself is when I publish my .net file to singel file, ready to run with an fixed runtime identifer I’ll get sort of binary code.
At first glance I cannot dissasemble and reconstruct any code from it.
What do you think, do I still need an obfuscator for this szenario?
> when I publish my .net file to singel file, ready to run with an fixed runtime identifer I’ll get sort of binary code.
Do you mean that you are using .NET Ahead Of Time compilation (AOT)? as explained here:
https://blog.ndepend.com/net-native-aot-explained/
In that case the code is much less decompilable (since there is no more IL Intermediate Language code). But a motivated hacker can still decompile it and see how the code works. However Obfuscator presented here are not concerned with this scenario.
OK. After some thinking and updating my ILSpy to the latest version I found out that ILpy can diassemble and show all sources of an “publish single file” application. (DnSpy can’t by the way…)
So there IS definitifely still the need to obfuscate….
Ok, Btw we compared .NET decompilers available nowadays here: https://blog.ndepend.com/in-the-jungle-of-net-decompilers/