首頁 » 加密貨幣新聞
NPM 最受依賴的套件之一正遭受持續的供應鏈攻擊。
}
function loadTrinityPlayer(targetWrapper, theme,extras="") {
cleanupPlayer(targetWrapper); // Always clean first ✅
targetWrapper.classList.add('played');
// Create script
const scriptEl = document.createElement("script");
scriptEl.setAttribute("fetchpriority", "high");
scriptEl.setAttribute("charset", "UTF-8");
const scriptURL = new URL(`https://trinitymedia.ai/player/trinity/2900019254/?themeAppearance=${theme}${extras}`);
scriptURL.searchParams.set("pageURL", window.location.href);
scriptEl.src = scriptURL.toString();
// Insert player
const placeholder = targetWrapper.querySelector(".add-before-this");
placeholder.parentNode.insertBefore(scriptEl, placeholder.nextSibling);
}
function getTheme() {
return document.body.classList.contains("dark") ? "dark" : "light";
}
// Initial Load for Desktop
if (window.innerWidth > 768) {
const desktopBtn = document.getElementById("desktopPlayBtn");
if (desktopBtn) {
desktopBtn.addEventListener("click", function () {
const desktopWrapper = document.querySelector(".desktop-player-wrapper.trinity-player-iframe-wrapper");
if (desktopWrapper) loadTrinityPlayer(desktopWrapper, getTheme(),'&autoplay=1′);
});
}
}
// Mobile Button Click
const mobileBtn = document.getElementById("mobilePlayBtn");
if (mobileBtn) {
mobileBtn.addEventListener("click", function () {
const mobileWrapper = document.querySelector(".mobile-player-wrapper.trinity-player-iframe-wrapper");
if (mobileWrapper) loadTrinityPlayer(mobileWrapper, getTheme(),'&autoplay=1′);
});
}
function reInitButton(container,html){
container.innerHTML = " + html;
}
// Theme switcher
const destroyButton = document.getElementById("checkbox");
if (destroyButton) {
destroyButton.addEventListener("click", () => {
setTimeout(() => {
const theme = getTheme();
if (window.innerWidth > 768) {
const desktopWrapper = document.querySelector(".desktop-player-wrapper.trinity-player-iframe-wrapper");
if(desktopWrapper.classList.contains('played')){
loadTrinityPlayer(desktopWrapper, theme,'&autoplay=1′);
}else{
reInitButton(desktopWrapper,'Listen')
const desktopBtn = document.getElementById("desktopPlayBtn");
if (desktopBtn) {
desktopBtn.addEventListener("click", function () {
const desktopWrapper = document.querySelector(".desktop-player-wrapper.trinity-player-iframe-wrapper");
if (desktopWrapper) loadTrinityPlayer(desktopWrapper,theme,'&autoplay=1');
});
}
}
} else {
const mobileWrapper = document.querySelector(".mobile-player-wrapper.trinity-player-iframe-wrapper");
if(mobileWrapper.classList.contains('played')){
loadTrinityPlayer(mobileWrapper, theme,'&autoplay=1′);
}else{
const mobileBtn = document.getElementById("mobilePlayBtn");
if (mobileBtn) {
mobileBtn.addEventListener("click", function () {
const mobileWrapper = document.querySelector(".mobile-player-wrapper.trinity-player-iframe-wrapper");
if (mobileWrapper) loadTrinityPlayer(mobileWrapper,theme,'&autoplay=1′);
});
}
}
}
}, 100);
});
}
})();
使用 AI 摘要
使用 AI 摘要
根據安全導向公司 Socket Security 聯合創始人 Feross Aboukhadijeh 表示,Axios 正遭受活躍的供應鏈攻擊,而 Axios 是 npm 最受依賴的套件之一。
NPM 代表 Node Package Manager,基本上是全球最大的軟體註冊中心,託管超過兩百萬個開源 JavaScript 程式碼套件。可以說它是現代 Web3 開發的支柱。
根據 Feross 的說法,最新的 [email protected] 目前正在引入 [email protected],這是一個今天之前並不存在的套件,顯示這是一次即時入侵。
該惡意軟體能夠執行一系列操作,包括在執行後刪除和重新命名檔案以銷毀鑑識證據、暫存並複製載荷檔案到作業系統臨時目錄和 Windows ProgramData 目錄、執行解碼的 shell 指令等。
專家建議使用 axios 的開發者立即鎖定其版本並審查其鎖定檔案,同時暫時避免任何更新。
Binance 免費 $600(CryptoPotato 獨家):使用此連結註冊新帳戶,即可在 Binance 獲得價值 $600 的獨家歡迎優惠(完整詳情)。
Bybit 為 CryptoPotato 讀者提供的限時優惠:使用此連結註冊,即可在任何幣種上開設 $500 免費倉位!
來源:https://cryptopotato.com/expert-warns-of-critical-ongoing-supply-chain-attack-on-axios/

