php_sqlsrv.dll and php_pdo_sqlsrv.dll missing error

I am using PHP version 8.2.12 for DB am using SQL Server.

I am doing a project in laravel, but it shows

Unable to load dynamic library ‘php_sqlsrv.dll

Unable to load dynamic library ‘php_pdo_sqlsrv.dll

I tried to download the dll file from MS site, but in zip it doesn’t have these dll files, instead it has dll file with some numbers.

Please help me out to fix this error.
Is there any web site to download required dll files?

Past answers posted on site, were not having that dll files in zip.

Catching errors of model in controller method

I have a controller method which I am using to change the status of the row data in the database. But I forget to mention status field in the model file. So the status was not changing in the database. When I added status attribute in the model file, then only I can change the status of the table data.

use AppHttpControllersController;
use AppModelsAdminServicesBundle;
class BundleController extends Controller
{

    public function changeStatus($id)
      {
        try 
        {
            $bundle = Bundle::find($id);
            $bundle->update(['status' => false]);
            return redirect()->route('admin_bundle.index');
        } catch (Exception $exception) 
        {
            return response()->json(['status'=>'error', 'error'=> $exception->getMessage()]);        
        }
      }
}

Model file::

class Bundle extends Model
{
    protected $fillable = [
        'name', 'description', 'remarks', 'image_path', 'status'
    ];
}

I want to know that although I have kept try catch block in my controller method but still the error was not caught in the controller. How to catch such errors like missing attributes in the model?

Livewire update reload the dom

So I loop through user notifications like so, in my Livewire Volt component:

#[Computed]
public function notifications()
{
    return auth()->user()->fresh()->unreadNotifications;
}

Then in blade:

@forelse($this->notifications as $notification)
    //Display notifications
@empty
    No notifications
@endforelse

I have a little x icon to mark a notification as read:

markAsRead('{{ $notification->id }}')

public function markAsRead(string $notificationId): void
{
    auth()->user()->unreadNotifications()
        ->where('id', $notificationId)
        ->update(['read_at' => now()]);
}

Everything works. However, after the last notification has been marked as read, the text “No notifications” does not display. I first need a refresh. I’m trying to understand why I cannot get this to work.

Things I’ve tried:

public function markAsRead(string $notificationId): void
{
    auth()->user()->unreadNotifications()
        ->where('id', $notificationId)
        ->update(['read_at' => now()]);

    $this->dispatch('notificationsUpdated'); (or $this->dispatch('$refresh');)
}

And in the volt component:

protected $listeners = ['notificationsUpdated' => '$refresh'];

Also tried this instead:

public array $notifications = [];

public function mount()
{
    $this->loadNotifications();
}

public function loadNotifications()
{
    $this->notifications = auth()->user()->unreadNotifications;
}

public function markAsRead(string $notificationId): void
{
    auth()->user()->unreadNotifications()
        ->where('id', $notificationId)
        ->update(['read_at' => now()]);

    $this->loadNotifications();
}

Lastly I’ve tried:

public function loadNotifications()
{
    $this->notifications = auth()->user()->fresh()->unreadNotifications;
}

Thinking this would reload a fresh user instance or something.

But the same “issue” keeps happening. I don’t want to show the user an empty block once the last notification has been marked as read, but I want it to show directly “No notifications” as stated in the @empty of the @forelse.

First and foremost I want to understand why this does not work. Any solution is of course a bonus.

How to safely override Laravel’s CacheManager to support tenant-aware cache in Stancl Tenancy?

I’m using the stancl/tenancy package in a Laravel v12 application and need to apply tenant-specific scoping to cached values. By default, the package overrides Laravel’s CacheManager to apply tags() based on the tenant ID.

However, this approach crashes when using cache drivers like database that don’t support tagging, throwing:

BadMethodCallException: This cache store does not support tagging.

I tried overriding the CacheManager using app()->extend('cache', ...) in my service provider, but it gets initialized before tenancy is bootstrapped, making tenant() return null, which leads to:

Call to a member function getTenantKey() on null

What I need:

  • A reliable way to override or wrap Laravel’s cache manager to add tenant-based scoping only when a tenant is resolved, and only when the store supports tagging.
  • A fallback solution for stores that do not support tagging (e.g., prefixing the cache key manually).

What’s the best approach to achieve this without breaking Laravel’s cache system or the tenancy lifecycle?

Any guidance or best practices would be greatly appreciated.

I created a custom TenantCacheManager that checks if the underlying store supports tags (supportsTags()) and falls back to manually prefixing the cache key when it doesn’t. I expected this to allow seamless tenant-specific cache usage without errors, regardless of the store driver.

However, the custom manager was still instantiated too early, before the tenant was resolved, causing tenant() to return null and crash. I also attempted to conditionally override the binding inside the service provider, but it was too late or ineffective.

How to spawn a react element through vite?

I’m trying to code a weak core without typescript

import { useState } from 'react';
import { ReactElement } from 'react'
vite.spawn?this.state(<ReactElement spell="btn"/>)

and getting a type conflict:

index-DIIg0VsU.js:49 3
index-DIIg0VsU.js:49 NaN

preview

Rollup: Error: Cannot find package all rollup plugins packages

I’m having issue with Rollup finding all Rollup plugin packages. It used to work some months ago but now I get the following error. I tried some isolation testing by disabling one module at a time, thinking maybe a module could be the issue, I also updated all modules, still no resolution. I started a new project, the issue persists. I also updated all modules,In another existing project there no problem.

All recommended solutions do not work.

Error: Cannot find package ‘@rollup/plugin-node-resolve’ imported from P:devProjectseSvrAppsrollup-testrollup.config.js

If I remove one imported plugin, it shows error for the next imported plugin package.

From the affected

  "devDependencies": {
    "@rollup/plugin-commonjs": "^28.0.1",
    "@rollup/plugin-json": "^6.1.0",
    "@rollup/plugin-node-resolve": "^15.3.1",
    "@rollup/plugin-terser": "^0.4.4",
    "rollup-plugin-copy": "^3.5.0",
    "rollup-plugin-delete": "^2.1.0",
    "rollup-plugin-execute": "^1.1.1"
  }
import json from '@rollup/plugin-json'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import terser from '@rollup/plugin-terser'
import del from 'rollup-plugin-delete'
import copy from 'rollup-plugin-copy'
import execute from 'rollup-plugin-execute'

My fear is that the current working project may start to fail.
Thanks for any help.

Difference between iterating node.children and node.querySelectorAll?

Perhaps I am misunderstanding this example, but I had what appears to be the misconception that querying the DOM could be relatively rather slow and was looking for a “good” way to remove all selections from a variable-sized list.

The thought was that if a reference was held in memory to the children collection of a parent node, it would quicker to iterate the children and remove the selection (method_2) class than it would be to use querySelectorAll to iterate the DOM to locate selected children and then iterate that collection to remove the selection class (method_1).

However, that appears to be incorrect. Why is this the case? Or did I make a mistake?

Is the native method of querySelectorAll that much faster the a JS script loop?

Thank you.

let 
   p = document.querySelector('.parent'),
   f = document.createDocumentFragment(),
   c = p.children
;
function populate(n,mod) {
  for (let d, i =0; i < n; i++) {
    d = document.createElement("DIV");
    if ( i % mod === 0 ) d.className = "sel";
    f.append(d);
  }
  p.append(f);
  console.log(`populated total of ${n} having ${p.querySelectorAll('.sel').length} selected.`);
}
function method_1() {
  let n = Date.now();
  p.querySelectorAll('.sel').forEach( v => v.classList.remove('sel'));
  console.log(`method_1 elapsed: ${Date.now() - n}`);
}
function method_2() {
  let 
     n = Date.now(),
     i,
     l = c.length
  ;
  for (i =0; i < l; i++) {
    c[i].classList.remove('sel');
  }
  console.log(`method_2 elapsed: ${Date.now() - n}`);

}

populate(100000,250);
method_1()
console.log(`Remaining selected after method_1: ${p.querySelectorAll('.sel').length} selected.`);
populate(100000,250);
method_2();
console.log(`Remaining selected after method_2: ${p.querySelectorAll('.sel').length} selected.`);
<div class="parent"></div>

My results are similar to:

populated total of 100000 having 400 selected.
method_1 elapsed: 1
Remaining selected after method_1: 0 selected.
populated total of 100000 having 400 selected.
method_2 elapsed: 84
Remaining selected after method_2: 0 selected.

VS Code: Quokka Extension Won’t Work After I Save My File

I’m new to VS Code. I recently downloaded a bunch of extensions including Quokka and Code Runner. Everything works great until I save my file to my desktop. After saving, the Quokka tab disappears from the lower panel and I get a message in the Output panel saying

[Running] node “c:UsersmynameOneDriveDesktopmyfile.js”
‘node’ is not recognized as an internal or external command, operable program or batch file.

This only happens after saving the file. What can I do to fix this? Please explain like I’m 5, I’m new to coding.

TLDR: Thanks to the extensions I downloaded (Quokka and Code Runner) I can see the results of my code right away. This works as expected until I save my work. After saving the file, I get an error about nodes in the Output panel. I’m not sure what to do.

Problem trying to sort images alphabetically by file name that have been loaded into a div via file reader

I am trying to load images into an html document using the file reader API, and then sorting them alphabetically. The code I have written loads the images into the div just fine, however it doesn’t sort the images in alphabetical order, instead it loads them into the document seemingly at random. I have tried using the following code to sort the images but to no avail: files.sort((a, b) => a.name.localeCompare(b.name)); Would appreciate any help that you can provide.

document.getElementById('loadImageButton').addEventListener('click', () => {
    document.getElementById('imageInput').click(); 
});

document.getElementById('imageInput').addEventListener('change', (event) => {
    let files = Array.from(event.target.files);
    const imageContainer = document.getElementById('imageContainer');
    imageContainer.innerHTML = '';
    
    console.log('Before Sort: ', files);
    
  // Sort files alphabetically by name
    files.sort((a, b) => a.name.localeCompare(b.name));
    
    
    console.log('After Sort: ', files);
    

    files.forEach(file => {
        if (file.type.startsWith('image/')) {
            const reader = new FileReader();

            reader.onload = (e) => {
                const img = document.createElement('img');
                img.src = e.target.result;
                img.alt = file.name; // Use file name as alt text
                imageContainer.appendChild(img);
            console.log('Image as appended: ', img);
            };

            reader.readAsDataURL(file);
        }
    });
});
#imageContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid #ccc;
    padding: 10px;
    min-height: 100px;
  }
  #imageContainer img {
    width: 150px;
    height: auto;
  }
<input type="file" id="imageInput" accept="image/*" multiple style="display: none;">
<button id="loadImageButton">Import Images</button>
<div id="imageContainer"></div>

Wrote the above code expecting the images to be loaded into the imageContainer div in alphabetical order, instead they seem to be loaded in a random order.

Thunderbird: opening emails in an external text editor

I would like to edit the source code of emails stored locally in Thunderbird (as .eml files) inside an external text editor (Notepad++).

(My current workflow of searching for the file manually is too cumbersome for regular usage.)

I spent a week unsuccessfully talking to an AI trying to code a javascript add-on, that opens the currently selected email in Notepad++.

If there is a simple solution, could you post a code snippet ?
Or else should I post the dysfunctional code for you to salvage ?

JavaScript deobfuscate

Can anyone help, I can’t deobfuscate the code, I can’t even understand what its meaning is. Some binary data is sent, how to decode it, please help.

!function(e,d){!function(){function n(){var n={};return function(n){window[d("b25lcnJvcg")]=function(c,b,u,t,Z){Array[d("aXNBcnJheQ")](n[162])||(n[162]=[]),n[162][n[162][d("bGVuZ3Ro")]]=[c,b,u,t,Z][d("am9pbg")](d("LCA"))}}(n),n}function c(n,c){c[d("Zm9yRWFjaA")]((function(c){var b=c[0],u=c[1];try{n[b]=u()}catch(c){n[b]=c&&c[d("bWVzc2FnZQ")]}}))}var b=window[d("cGVyZm9ybWFuY2U")]?function(){return window[d("cGVyZm9ybWFuY2U")][d("bm93")]()}:function(){return Date[d("bm93")]()},u=[22,function(){return e(d("dHlwZW9mIHdpbmRvdy5jaHJvbWU"))[d("dG9TdHJpbmc")]()}],t=[24,function(){return e(d("ZG9jdW1lbnQuaGlkZGVu"))[d("dG9TdHJpbmc")]()}],Z=[26,function(){return e(d("ISh0b3A9PXdpbmRvdyk"))[d("dG9TdHJpbmc")]()}],l=[35,function(){return e(d("dG9wLmZyYW1lcy5sZW5ndGg"))[d("dG9TdHJpbmc")]()}],m=[36,function(){return e(d("d2luZG93Lmhpc3RvcnkubGVuZ3Ro"))[d("dG9TdHJpbmc")]()}],G=[210,function(){return e(d("d2luZG93LmlubmVyV2lkdGg"))[d("dG9TdHJpbmc")]()}],a=[211,function(){return e(d("d2luZG93LmlubmVySGVpZ2h0"))[d("dG9TdHJpbmc")]()}],V=[60,function(){return e(d("c2NyZWVuLndpZHRo"))[d("dG9TdHJpbmc")]()}],o=[61,function(){return e(d("c2NyZWVuLmhlaWdodA"))[d("dG9TdHJpbmc")]()}],W=[126,function(){return e(d("bmF2aWdhdG9yLnVzZXJBZ2VudA"))[d("dG9TdHJpbmc")]()}],i=[138,function(){return e(d("bmF2aWdhdG9yLmhhcmR3YXJlQ29uY3VycmVuY3k"))[d("dG9TdHJpbmc")]()}],r=[139,function(){return e(d("bmF2aWdhdG9yLm1heFRvdWNoUG9pbnRz"))[d("dG9TdHJpbmc")]()}],R=[146,function(){return e(d("bmF2aWdhdG9yLm9uTGluZQ"))[d("dG9TdHJpbmc")]()}],X=[73,function(){return e(d("d2luZG93Lm9wZW5lci5zY3JlZW5YfHx3aW5kb3cub3BlbmVyLnNjcmVlbkxlZnQ"))[d("dG9TdHJpbmc")]()}],y=[80,function(){return e(d("KG5ldyBEYXRlKS5nZXRUaW1lem9uZU9mZnNldCgp"))[d("dG9TdHJpbmc")]()}],Y=[160,function(){return e(d("bmF2aWdhdG9yLnBsdWdpbnM"))[d("dG9TdHJpbmc")]()}],f=[104,function(){return e(d("SFRNTENhbnZhc0VsZW1lbnQucHJvdG90eXBlLnRvRGF0YVVSTA"))[d("dG9TdHJpbmc")]()}],h=[125,function(){return e(d("d2luZG93Lk5vdGlmaWNhdGlvbi5wZXJtaXNzaW9u"))[d("dG9TdHJpbmc")]()}],p=[214,function(){try{return(void 0)[d("eA")],d("LQ")}catch(n){return n[d("bWVzc2FnZQ")]}}],F=[215,function(){var n;try{null[0]()}catch(c){n=c[d("c3RhY2s")][d("dG9TdHJpbmc")]()}return/:(d+:d+)/[d("ZXhlYw")](n)[1]}],v=[217,function(){var n=e(d("bmF2aWdhdG9yLnBsdWdpbnM")),c=e(d("UGx1Z2luQXJyYXk")),b=e(d("UGx1Z2lu"));return c[d("cHJvdG90eXBl")]===n[d("X19wcm90b19f")]&&(!n[d("bGVuZ3Ro")]||n[0][d("X19wcm90b19f")]===b[d("cHJvdG90eXBl")])?1:[c[d("cHJvdG90eXBl")],n[d("X19wcm90b19f")],n[d("bGVuZ3Ro")]?n[0][d("X19wcm90b19f")]:null]}],J=[218,function(){if(navigator[d("dXNlckFnZW50RGF0YQ")])return navigator[d("dXNlckFnZW50RGF0YQ")][d("YnJhbmRz")][d("ZmlsdGVy")]((function(n){return n[d("YnJhbmQ")]===d("Q2hyb21pdW0")}))[0][d("dmVyc2lvbg")]}],w=[124,function(n){var c=[d("YXNkamZsYXN1dG9wZmh2Y1pMbWNmbF8"),d("YXN5bmNTY3JpcHRJbmZv"),d("YXN5bmNFeGVjdXRvcg"),d("QlJPV1NFUlRPT0xT"),d("Y2hyb21lRHJpdmVy"),d("Y29tbWFuZExpbmU"),d("ZG9tQXV0b21hdGlvbg"),d("ZHJpdmVy"),d("ZHJpdmVyX2V2YWx1YXRl"),d("RUxFTV9DQUNIRQ"),d("ZXZhbHVhdGU"),d("ZXZhbHVhdGVfcmVzcG9uc2U"),d("ZXhlY3V0b3I"),d("RmlyZWJ1Zw"),d("Znhkcml2ZXI"),d("SURFX1JlY29yZGVy"),d("anVnZ2xlcg"),d("bGFzdFdhdGly"),d("bmlnaHRtYXJl"),d("cGhhbnRvbQ"),d("cGxheXdyaWdodA"),d("c2NyaXB0X2Zu"),d("c2NyaXB0X2Z1bmM"),d("c2NyaXB0X2Z1bmN0aW9u"),d("c2NyaXB0SW5mbw"),d("c2VsZW5pdW0"),d("dW53cmFwcGVk"),d("V0VCX1ZJRVc"),d("d2ViQ29udGVudHM"),d("d2ViZHJpdmVy"),d("eHdhbGs"),d("Y2RjXw")],b=[d("ZHJpdmVy"),d("bmlnaHRtYXJl"),d("cGhhbnRvbQ"),d("cGxheXdyaWdodA"),d("c2VsZW5pdW0"),d("d2ViZHJpdmVy")],u=[d("X0FycmF5"),d("X1Byb21pc2U"),d("X1N5bWJvbA")];!function(n,c){var b=c[124]={};function u(c){try{var u=c[d("YWRkRXZlbnRMaXN0ZW5lcg")];c[d("YWRkRXZlbnRMaXN0ZW5lcg")]=function(){var c=arguments[0];return n[d("Zm9yRWFjaA")]((function(n){new RegExp(n,d("aQ"))[d("dGVzdA")](c)&&(b[d("bGlzdGVuZXIg")+c]=1)})),u[d("YXBwbHk")](this,arguments)}}catch(n){b[c[d("dG9TdHJpbmc")]()+d("Lmxpc3RlbmVyIGVycm9yOiA")+(n&&n[d("bWVzc2FnZQ")])]=1}}u(window),u(document)}(c,n),function(n,c,b,u){var t=u[124];try{var Z=e(d("d2luZG93Lm5hdmlnYXRvci53ZWJkcml2ZXI"));void 0!==Z&&!1!==Z&&(t[d("d2ViZHJpdmVy")]=1),c[d("Zm9yRWFjaA")]((function(n){window[d("ZG9jdW1lbnQ")][d("ZG9jdW1lbnRFbGVtZW50")][d("Z2V0QXR0cmlidXRl")](n)&&(t[d("YXR0cnMg")+n]=1)})),l(window),l(document),l(navigator),m(),G()}catch(n){t[d("ZG9DaGVjayBlcnJvciA")+(n&&n[d("bWVzc2FnZQ")])]=1}function l(c){var u=Object[d("a2V5cw")](c);n[d("Zm9yRWFjaA")]((function(n){var b=new RegExp(n,d("aQ"));for(var Z in u)b[d("dGVzdA")](u[Z])&&(t[c+d("IA")+u[Z]]=1)})),d("")[d("ZW5kc1dpdGg")]&&u[d("Zm9yRWFjaA")]((function(n){b[d("Zm9yRWFjaA")]((function(b){n[d("ZW5kc1dpdGg")](b)&&(t[c+d("IA")+b]=1)}))}))}function m(){var n=d("Y2FjaGVf");for(var c in window[d("ZG9jdW1lbnQ")])try{window[d("ZG9jdW1lbnQ")][c][n]&&(t[n+d("IA")+(c||d("X18"))]=1)}catch(n){}}function G(){var n=d("U2VxdWVudHVt"),c=e(d("d2luZG93LmV4dGVybmFs"));c&&c[d("dG9TdHJpbmc")]&&-1<c[d("dG9TdHJpbmc")]()[d("aW5kZXhPZg")](n)&&(t[n]=1)}}(c,b,u,n)}];function Q(n){return n[d("ZmlsdGVy")]((function(n){return n}))[d("bGVuZ3Ro")]}var H=[118,function(n){n[118]=d("dw");var c=[];c[d("dGhyZXNob2xk")]=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];var b=new IntersectionObserver((function(c){n[118]=100*c[0][d("aW50ZXJzZWN0aW9uUmF0aW8")],b[d("dW5vYnNlcnZl")](document[d("ZG9jdW1lbnRFbGVtZW50")]),b[d("ZGlzY29ubmVjdA")]()}),c);b[d("b2JzZXJ2ZQ")](document[d("ZG9jdW1lbnRFbGVtZW50")])}],g=[117,function(n){var c=e(d("bmF2aWdhdG9yLmdldEJhdHRlcnkoKQ"));function b(c){n[117]=[Math[d("cm91bmQ")](100*c[d("bGV2ZWw")]),c[d("Y2hhcmdpbmc")]]}function u(c){n[117]=c[d("dG9TdHJpbmc")]()||d("ZXJyb3I")}c[d("Y2F0Y2g")](u)[d("dGhlbg")](b),c[d("Y2F0Y2g")](u)[d("dGhlbg")](b),c[d("Y2F0Y2g")](u)[d("dGhlbg")](b)}],N=[212,function(){var n=document[d("Y3JlYXRlRWxlbWVudA")](d("Y2FudmFz")),c=n[d("Z2V0Q29udGV4dA")](d("d2ViZ2wy"))||n[d("Z2V0Q29udGV4dA")](d("d2ViZ2w")),b=c[d("Z2V0RXh0ZW5zaW9u")](d("V0VCR0xfZGVidWdfcmVuZGVyZXJfaW5mbw"));return c[d("Z2V0UGFyYW1ldGVy")](b[d("VU5NQVNLRURfVkVORE9SX1dFQkdM")])}];var I=[213,function(){var n=[];function c(c,b){b[d("Zm9yRWFjaA")]((function(b){try{var u=e(c+d("Lg")+b+d("LnRvU3RyaW5nKCk")),t=b[d("c3BsaXQ")](d("Lg"))[d("cG9w")]();u[d("cmVwbGFjZQ")](/[srn]/g,d(""))[d("cmVwbGFjZQ")](t,d(""))!==d("ZnVuY3Rpb24oKXtbbmF0aXZlY29kZV19")&&n[d("cHVzaA")]([b,u[d("dG9TdHJpbmc")]()])}catch(c){n[d("cHVzaA")]([b,c[d("bWVzc2FnZQ")]])}}))}return c(d("d2luZG93"),[d("b3Blbg"),d("YWxlcnQ"),d("SFRNTENhbnZhc0VsZW1lbnQucHJvdG90eXBlLnRvRGF0YVVSTA"),d("ZXZhbA"),d("WE1MSHR0cFJlcXVlc3Q")]),c(d("ZG9jdW1lbnQ"),[d("aGFzRm9jdXM"),d("Y3JlYXRlRWxlbWVudA")]),c(d("bG9jYWxTdG9yYWdl"),[d("Z2V0SXRlbQ"),d("c2V0SXRlbQ"),d("cmVtb3ZlSXRlbQ")]),navigator[d("dXNlckFnZW50RGF0YQ")]&&c(d("bmF2aWdhdG9y"),[d("dXNlckFnZW50RGF0YS5nZXRIaWdoRW50cm9weVZhbHVlcw")]),[d("c2NyZWVu"),d("bmF2aWdhdG9y"),d("d2luZG93"),d("aGlzdG9yeQ"),[d("bmF2aWdhdG9yLnBsdWdpbnM"),d("UGx1Z2luQXJyYXk")],[d("bG9jYWxTdG9yYWdl"),d("U3RvcmFnZQ")],[d("c2Vzc2lvblN0b3JhZ2U"),d("U3RvcmFnZQ")]][d("Zm9yRWFjaA")]((function(c){var b=typeof c===d("c3RyaW5n")?[c,c[0][d("dG9VcHBlckNhc2U")]()+c[d("c2xpY2U")](1)]:c;try{var u=e(b[0]+d("LnRvU3RyaW5nKCk"));u!==d("W29iamVjdCA")+b[1]+d("XQ")&&n[d("cHVzaA")]([b[0],u[d("dG9TdHJpbmc")]()])}catch(c){n[d("cHVzaA")]([b[0],c[d("bWVzc2FnZQ")]])}})),window[d("UlRDUGVlckNvbm5lY3Rpb24")]||window[d("d2Via2l0UlRDUGVlckNvbm5lY3Rpb24")]||window[d("bW96UlRDUGVlckNvbm5lY3Rpb24")]||n[d("cHVzaA")]([d("UlRDUGVlckNvbm5lY3Rpb24"),1]),n[d("cmVkdWNl")]((function(n,c){return n[c[0]]=c[1],n}),{})}],U=null;function k(){return U||((U=document[d("Y3JlYXRlRWxlbWVudA")](d("aWZyYW1l")))[d("c3JjZG9j")]=d("YmxhbmsgcGFnZQ"),U[d("c3R5bGU")][d("ZGlzcGxheQ")]=d("bm9uZQ"),document[d("Ym9keQ")][d("YXBwZW5kQ2hpbGQ")](U)),U}var A=[216,function(n){window[d("YWRkRXZlbnRMaXN0ZW5lcg")](d("bG9hZA"),(function(){var c=k();n[216]=c[d("Y29udGVudFdpbmRvdw")]!==window}))}];function B(n){return d("QGJhYmVsL2hlbHBlcnMgLSB0eXBlb2Y"),B=d("ZnVuY3Rpb24")==typeof Symbol&&d("c3ltYm9s")==typeof Symbol[d("aXRlcmF0b3I")]?function(n){return typeof n}:function(n){return n&&d("ZnVuY3Rpb24")==typeof Symbol&&n.constructor===Symbol&&n!==Symbol[d("cHJvdG90eXBl")]?d("c3ltYm9s"):typeof n},B(n)}var T=+new Date;function z(n,c,b,u){var t={};for(var Z in n)n[d("aGFzT3duUHJvcGVydHk")](Z)&&(t[Z]=n[Z]);t[109]=T,o(1,(function(){return+new Date-T})),o(48,(function(){return window[d("aW5uZXJXaWR0aA")]})),o(49,(function(){return window[d("aW5uZXJIZWlnaHQ")]})),o(35,(function(){return window[d("dG9w")][d("ZnJhbWVz")][d("bGVuZ3Ro")]-(U?1:0)}));var l,m,G=JSON[d("c3RyaW5naWZ5")](t,(function(n,c){return B(c)!==d("b2JqZWN0")&&null!==c?c+d(""):n!==d("")?JSON[d("c3RyaW5naWZ5")](c):c})),a=b?G:(l=G,m=d("Z0hSZmR2OG1iZQ"),new Function(d("YQ"),d("Yg"),d("dmFyIHMgPSB1bmVzY2FwZShlbmNvZGVVUklDb21wb25lbnQoYSkpOw")+d("dmFyIGFiID0gbmV3IEFycmF5QnVmZmVyKHMubGVuZ3RoKTs")+d("dmFyIGMgPSBuZXcgVWludDhBcnJheShhYik7")+d("dmFyIGwgPSBiLmxlbmd0aDs")+d("Zm9yICh2YXIgaSA9IDA7IGkgPCBzLmxlbmd0aDsgaSsrKWNbaV0gPSBzLmNoYXJDb2RlQXQoaSkgXiBiLmNoYXJDb2RlQXQoaSAlIGwpOw")+d("cmV0dXJuIGFiOw"))(l,m));if(d("ZmV0Y2g")in window)fetch(c,{method:"POST",headers:{"Accept-Language":"*","Content-Type":"application/octet-stream"},body:a})[d("dGhlbg")]((function(n){return 200===n[d("c3RhdHVz")]?Promise[d("YWxs")]([n,n[d("dGV4dA")]()]):Promise[d("cmVqZWN0")](n)}))[d("dGhlbg")]((function(n){var c=n[0],b=n[1];b&&u(b,c[d("aGVhZGVycw")])}));else{var V=new XMLHttpRequest;V[d("b3Blbg")](d("UE9TVA"),c,!0),V[d("c2V0UmVxdWVzdEhlYWRlcg")](d("QWNjZXB0LUxhbmd1YWdl"),d("Kg")),V[d("c2V0UmVxdWVzdEhlYWRlcg")](d("Q29udGVudC1UeXBl"),d("YXBwbGljYXRpb24vb2N0ZXQtc3RyZWFt"));try{V[d("d2l0aENyZWRlbnRpYWxz")]=!0}catch(n){}V[d("b25sb2Fk")]=function(){if(200===V[d("c3RhdHVz")]&&V[d("cmVzcG9uc2VUZXh0")]){var n={get:function(n){return V[d("Z2V0UmVzcG9uc2VIZWFkZXI")](n)}};u(V[d("cmVzcG9uc2VUZXh0")],n)}},V[d("c2VuZA")](a)}function o(n,c){try{t[n]=c()}catch(c){t[n]=c[d("bWVzc2FnZQ")]}}}var s=!1;function S(n,c){s||(s=!0,function(n,c,u,t){if(window[d("aW5uZXJXaWR0aA")]>0)z(n,c,u,t);else var Z=b(),l=setInterval((function(){(window[d("aW5uZXJXaWR0aA")]>0||b()-Z>1e3)&&(clearInterval(l),z(n,c,u,t))}),10)}(n,d(config[d("ZFhKcw")])+(c||d("")),config[d("WkdSbA")],(function(n){return n&&window[d("bG9jYXRpb24")][d("cmVwbGFjZQ")](n)})))}!function(b,U){var k=n();(function(n,c){c[d("Zm9yRWFjaA")]((function(c){var b=c[0],u=c[1];try{u(n)}catch(c){n[b]=c&&c[d("bWVzc2FnZQ")]||d("ZXJyb3I")}}))})(k,[(U=U||{})[d("ZWRh")]||w,H,g,A]),c(k,[l,G,a,Z,u,X,m,h,Y,f,t,i,r,R,V,o,y,W,I,p,F,v,J]),-1!==navigator[d("cGxhdGZvcm0")][d("aW5kZXhPZg")](d("V2lu"))&&c(k,[N]);try{!function(n){var c=Q([e(d("IndlYmtpdFBlcnNpc3RlbnRTdG9yYWdlIiBpbiBuYXZpZ2F0b3I")),e(d("IndlYmtpdFRlbXBvcmFyeVN0b3JhZ2UiIGluIG5hdmlnYXRvcg")),e(d("MCA9PT0gbmF2aWdhdG9yLnZlbmRvci5pbmRleE9mKCJHb29nbGUiKQ")),e(d("IndlYmtpdFJlc29sdmVMb2NhbEZpbGVTeXN0ZW1VUkwiIGluIHdpbmRvdw")),e(d("IkJhdHRlcnlNYW5hZ2VyIiBpbiB3aW5kb3c")),e(d("IndlYmtpdE1lZGlhU3RyZWFtIiBpbiB3aW5kb3c")),e(d("IndlYmtpdFNwZWVjaEdyYW1tYXIiIGluIHdpbmRvdw"))])>=5;n[172]=+c;var b=c&&Q([e(d("Im9ub3JpZW50YXRpb25jaGFuZ2UiIGluIHdpbmRvdw")),e(d("Im9yaWVudGF0aW9uIiBpbiB3aW5kb3c")),e(d("IlNoYXJlZFdvcmtlciIgaW4gd2luZG93"))])>=2;n[170]=+b}(k)}catch(n){}setTimeout((function(){return b(k)}),10)}((function(n){!function(n){n[2]=d(config[d("Wlc1a2NHOXBiblE9")]),n[3]=d(config[d("WTJsaw")]),n[4]=d(config[d("WVdsaw")]),n[5]=d(config[d("Y21WbVpYSmxjZz09")]),n[6]=null!==config[d("ZEdsdFpWUnZRMnhwWTJzPQ")]?d(config[d("ZEdsdFpWUnZRMnhwWTJzPQ")]):null,n[7]=d(config[d("YVc1MFpYSnRaV1JwWVhSbFVHRm5aVXB6Y0U1aGJXVT0")]),n[198]=config[d("YVhORGJHbGphMUpsWTI5MlpYSmxaRVp5YjIxSlkyOXU")],n[219]=d(config[d("ZEE9PQ")])}(n),S(n)}))}()}(eval(atob("ZXZhbA")),eval(atob("YXRvYg")));

I tried to sniff the traffic, there is binary data, deobfuscation tools do not help.

Hook SSL_write on child process via Frida

With Frida Javascript I wait for fork

Interceptor.attach(Module.findExportByName("libc.so", "fork"), {
    onEnter: function (args) {
        try {
            // Get the current module calling fork
            const caller = Process.getModuleByAddress(this.returnAddress);
            console.log("[*] fork called by:", caller.name, "at", this.returnAddress);
            console.log("[*] Path to module:", caller.path);
        } catch (e) {
            console.log("[!] Error resolving module for return address:", this.returnAddress, e);
        }
    },
    onLeave: function (retval) {
        console.log("[*] fork returned PID:", retval.toInt32());
        setTimeout(inner, 100);

    }
});

Now into inner function I want to hook SSL_write function.

The problem is that SSL_write function exist in parent and in the child process, and when I try to hook I hook only SSL_write into child process.

What can I do?

conditional regex for VScode syntax highlighting not working

I’ve created a toy scripting language and managed to configure basic syntax highlighting for the very simple things like keywords, comments and strings, But when I tried more complex logic it didn’t work.

I want it so that the identifier after the ‘func’ keyword will be a different color than normal identifiers, Here’s my code .json file:

{
    "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
    "name": "samir_script",
    "patterns": [
        {
            "include": "#keywords"
        },
        {
            "include": "#strings"
        },
        {
            "include": "#comments"
        },
        {
            "include": "#digits"
        },
        {
            "include": "#opperators"
        },
        {
            "include": "#reserved_words"
        },
        {
            "include": "#func_declre"
        },
        {
            "include": "#identifiers"
        }

        

    ],
    "repository": {
        "keywords": {
            "patterns": [{
                "name": "keyword.control.smr",
                "match": "\b(if|while|for|return|func|match|elif|else|case|var|do|lambda|then|with|break|continue|in|print|println|import|as)\b"
            }]
        },
        "strings": {
            "name": "string.quoted.double.smr",
            "begin": """,
            "end": """,
            "patterns": [
                {
                    "name": "constant.character.escape.smr",
                    "match": "\\."
                }
            ]
        },
        "comments":{
            "name": "comment.line",
            "begin": "#",
            "end": "n"
        },
        "digits":{
            "name":"constant.numeric",
            "match": "\b(\d+)\b"
        },
        "opperators":{
            "name": "keyword.operator",
            "match": "\b(\+|-|=|\*|/==)\b"
        },
        "identifiers":{
            "name": "support.variable",
            "match": "\b(\w+)\b"
        },
        "reserved_words":{
                "name": "constant.language",
                "match": "\b(true|false|nil)\b"
        },
         // This doesn't do anything:
        "func_declre":{
            "name": "comment.block", // Chose comment color to make debugging this easier.
            "begin": "\b(func)(\s+)(\w+)\b", //'func sum(x, y)' sum would be different.
            "beginCaptures": {
                "1": {
                "name": "comment.block"
                },
                "2": {
                "name": "comment.block"
                }
            },
            "end": "\b(\s+)\b" // Ends after a white space.
        }
    },
    "scopeName": "source.smr"
}

Could not load the “sharp” module using the linux-x64 runtime

I am working on a nest js project and I am using sharp library, suddenly I am starting to get error when trying to run the docker container
here is my dockerfile

FROM node:20-alpine AS builder
WORKDIR /app
COPY . .
RUN yarn
RUN npx nx build api --production=true

FROM node:20-alpine AS runner
WORKDIR /app

COPY --from=builder /app/package.json ./
COPY --from=builder /app/yarn.lock ./

RUN yarn install --production
RUN yarn add sharp --ignore-engines

COPY --from=builder /app/dist/apps/api ./
ARG PORT=3333
ENV PORT=${PORT}

EXPOSE ${PORT}

CMD [ "node", "main" ]

I tried upgrading and downgrading sharp version, and still didn’t work