
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Definitions of Windows Date Types for node-ffi, node-ffi-napi
npm run repo:init
Package | Version |
---|---|
win32-api | |
win32-def |
Write node-ffi or node-ffi-napi calling win32 native functions code by Typescript with Types support.
npm install win32-def
import * as ffi from 'ffi-napi'
import { DModel as M, DTypes as W, FModel as FM } from 'win32-def'
export interface Win32Fns extends FM.DllFuncsModel {
ClientToScreen(hWnd: M.HWND, lpPoint: M.LPPOINT): M.BOOL
GetAncestor(hwnd: M.HWND, gaFlags: M.UINT): M.HWND
}
export const user32: Win32Fns = ffi.Library('user32.dll', {
ClientToScreen: [W.BOOL, [W.HWND, W.LPPOINT] ],
GetAncestor: [W.HWND, [W.HWND, W.UINT] ],
})
import * as ffi from 'ffi-napi'
import { DModel as M, DTypes as W, FModel as FM } from 'win32-def'
export interface Win32Fns extends FM.DllFuncsModel {
ClientToScreen(hWnd: M.HWND, lpPoint: M.LPPOINT): M.BOOL
GetAncestor(hwnd: M.HWND, gaFlags: M.UINT): M.HWND
}
export const user32: FM.ExpandFnModel<Win32Fns> = ffi.Library('user32.dll', {
ClientToScreen: [W.BOOL, [W.HWND, W.LPPOINT] ],
GetAncestor: [W.HWND, [W.HWND, W.UINT] ],
})
// You can calling with BOTH sync and async method
const hWnd = user32.GetAncestor(hWnd, uint)
user32.GetAncestor.async(handle, uint, (err, hWnd) => {
// typeof hWnd will be the same of ReturnType of sync method
if (err) {
throw err
}
if (hWnd && !ref.isNull(hWnd) && ref.address(hWnd)) {
// ...
}
else {
throw new Error('hWnd invalid')
}
})
18.0.0 (2022-07-22)
FAQs
win32 definitions for node-ffi
We found that win32-def demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.