Zum Hauptinhalt springen
LIVE
CVSS 6.5CVE-2026-111315 | The Smaily Connect plugin for WordPress is vulnerable to Insecure Direct Object Reference in versions up to, and including, 3.24.0 This is due to the smaily_get_edit_user_id() function reading an attacker-controlled $_GET['user_id'] parameter without performing any ownership or capability check, and then feeding that id into smaily_get_userdata() (which calls get_user_meta()) when rendering the WooCommerce My Account 'edit-account' form via the smaily_print_CVSS 6.4CVE-2026-137713 | Webmin through 2.670 before ae8feb1 allows XSS via an SVG attachment in a mail queue, relevant if an authenticated user uploads an SVG document and an administrator views it.CVSS 6.9CVE-2026-137678 | A security vulnerability has been detected in code-projects Online Job Portal 1.0. Affected by this issue is some unknown functionality of the file Admin/InsertUser.php. Such manipulation of the argument txtUserName/txtPassword leads to sql injection. The attack can be launched remotely. The exploit has been disclosed publicly and may be used.CVSS 5.3CVE-2026-137703 | Flask-AppBuilder before 5.3.1 contains a path traversal vulnerability in ImageManager.save_file that allows authenticated users to write image files outside IMG_UPLOAD_FOLDER via unsanitized multipart filenames. Attackers with add or edit permission on a ModelView with an ImageColumn can upload filenames containing ../ segments to create or overwrite image files like static assets.CVSS 6.1CVE-2026-130039 | The LiteSpeed Cache plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'REQUEST_URI' parameter in all versions up to, and including, 7.9.3 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. Successful exploitation requires comments to be open, a comment author name containinCVSS 6.1CVE-2026-136206 | The Export Products, Orders & Customers for WooCommerce plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via the 'start_date' parameter in all versions up to, and including, 2.4.3 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link. SucCVSS 9.4CVE-2026-137706 | Smart Portal developed by Direk Tech has a Missing Authorization vulnerability. Authenticated remote attackers can add a specified account to the Active Directory Domain Admins group, thereby obtaining domain administrator privileges.CVSS 8.7CVE-2026-137705 | Smart Portal developed by Direk Tech has an Arbitrary File Read vulnerability.Unauthenticated remote attackers can exploit Relative Path Traversal to download arbitrary system files.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

同樣是 50 行程式碼,為什麼做出來的東西像藝術品?

先玩再說 這是做出來會長這樣——看到那些「會呼吸」的漸層了嗎?不是漸變,是雜訊。但看起來像是有生命的流體。 為什麼? 別人做出來像藝術品,你做出來像數學作業 p5.js 有兩個 noise(): // 壞掉的 noise(直線) ellipse(x, noise(x)*height, 10, 10); // 看起來像鋸…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 3 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung




先玩再說



這是做出來會長這樣——看到那些「會呼吸」的漸層了嗎?不是漸變,是雜訊。但看起來像是有生命的流體。



為什麼?






別人做出來像藝術品,你做出來像數學作業



p5.js 有兩個 noise():




// 壞掉的 noise(直線)
ellipse(x, noise(x)*height, 10, 10); // 看起來像鋸齒

// 會呼吸的 noise(加時間)
ellipse(x, noise(x, frameCount*0.01)*height, 10, 10); // 看起來像海草






差別只有一個維度:時間。



加上 frameCount 這件事,多數教學都有講。但多數教學沒講的是:同樣是 50 行,為什麼做出來像藝術品而不是像「證明我會用 noise 函式」?






秘密一:視覺幻覺——你的大腦在幫視覺「加工」



看這張圖:




●●●●●●●●●●●●●●●●●●●●
●●●●○○○○●●●●●●●●●●●●
●●●●●●●●●●●●●●●●●●●●






你看到什麼?



多數人說「一條線」。但實際上那只是一群各自獨立的點,大腦自動幫你連起來了。



這叫視覺幻覺——沒有意義的訊號,大腦自動幫你補上結構和意圖。



TeamLab 就是用這個原理:500 個各自輕微不同步的簡單元素,大腦把它們當成「一片會呼吸的森林」。






秘密二:讓變化「慢一點開始」——看起來自然多了



「慢慢亮」「慢慢暗」比「立刻亮立刻暗」感覺自然,為什麼?



因為現實世界裡東西改變速度很少是均勻的。一盞燈關掉的時候,是先快後慢——不是線性勻速。



不是線性的:




  • ❌ brightness = distance(線性:均勻變化,感覺像機器)

  • ✅ brightness = t * (2 - t)(快開始,慢結束,感覺像真的)



人眼對「一開始快、然後慢下來」的速度變化特別有感覺,因為這跟我們在物理世界遇到的情況一致。




function easeOutQuad(t) {
return t * (2 - t); // 簡單的緩出公式
}









做出來(一):基礎流體場






let particles = [];

function setup() {
createCanvas(windowWidth, windowHeight);
for (let i = 0; i < 300; i++) {
particles.push({
x: random(width),
y: random(height),
speed: random(0.8, 1.5)
});
}
}

function draw() {
background(255, 253, 250); // 暖白,不是純白

for (let p of particles) {
// 正確的 flow field:用粒子真實位置算 noise
let noiseScale = 0.005;
let angle = noise(p.x * noiseScale, p.y * noiseScale, frameCount * 0.004) * TWO_PI * 2;

p.x += cos(angle) * p.speed;
p.y += sin(angle) * p.speed;

// 繞圈回來
if (p.x < 0) p.x = width;
if (p.x > width) p.x = 0;
if (p.y < 0) p.y = height;
if (p.y > height) p.y = 0;

// 日系啞色
let col = noise(p.x * 0.01, p.y * 0.01, frameCount * 0.008);
fill(60 + col*40, 80 + col*30, 100 + col*60, 150);
noStroke();
ellipse(p.x, p.y, 4, 4);
}
}






為什麼看起來像藝術品?





  1. 暖白底色:background(255, 253, 250) 不是純白,是紙張的顏色


  2. 啞色粒子:RGB(60-100, 80-110, 100-160) 不是鮮豔的藍或紅,是日本寺廟感的光


  3. 300 個粒子:數量夠多,大腦就會開始「出戲」——把機械過程詮釋成生命






做出來(二):加分項——滑鼠互動






function mouseMoved() {
for (let p of particles) {
let d = dist(mouseX, mouseY, p.x, p.y);
if (d < 100) {
// 滑鼠靠近時,粒子被推開
let angle = atan2(p.y - mouseY, p.x - mouseX);
p.x += cos(angle) * (100 - d) * 0.05;
p.y += sin(angle) * (100 - d) * 0.05;
}
}
}






這段加上去,畫面從「動態壁布」變成「活的空間」——滑鼠變成一種存在感。






做出來(三):再加一個維度——顏色也跟著變



把以下函式加到前面的程式碼下面,就能在同一個粒子系統裡同時控制位置和顏色:




function displayParticle(p) {
// 用粒子的真實位置算 noise(與上方 flow field 共用同一套三維 noise 空間)
let n = noise(p.x*0.01, p.y*0.01, frameCount*0.008);

// 日系啞色系:低對比、有灰度
let r = 80 + n * 80; // 80-160
let g = 100 + n * 60; // 100-160
let b = 120 + n * 60; // 120-180
let a = 100 + n * 100; // 透明度也有漸層

fill(r, g, b, a);
noStroke();

// 粒子大小也呼吸
let size = 3 + sin(frameCount*0.05 + p.x * 0.1) * 2;
ellipse(p.x, p.y, size, size);
}






然後在 draw() 迴圈裡,每次畫完位置呼叫 displayParticle(p) 就能著色。



為什麼日系美學做出來的東西看起來比較貴?



因為低對比、灰階、有「餘韻」的顏色,大腦不會覺得被「攻擊」,反而願意停留在上面。這就是 TeamLab 每個展都排隊的原因之一——視覺不疲勞。






完整程式碼






// p5.js Noise Flow Field — 日系啞光版本
// 50行以內,做出像藝術品的流體視覺效果

let particles = [];
const NUM = 300;

function setup() {
createCanvas(windowWidth, windowHeight);
colorMode(RGB, 255, 255, 255, 255);

for (let i = 0; i < NUM; i++) {
particles.push({
x: random(width),
y: random(height),
speed: random(0.8, 1.5)
});
}
}

function draw() {
// 暖白底(紙張色,不是純白)
background(255, 253, 250);

for (let p of particles) {
// noise 三維:x, y, time — 用粒子真實位置算
let noiseScale = 0.005;
let angle = noise(p.x * noiseScale, p.y * noiseScale, frameCount * 0.004) * TWO_PI * 2;

p.x += cos(angle) * p.speed;
p.y += sin(angle) * p.speed;

// 從左邊出去的從右邊回來
if (p.x < 0) p.x = width;
if (p.x > width) p.x = 0;
if (p.y < 0) p.y = height;
if (p.y > height) p.y = 0;

// 日系啞色(低對比、灰藍調)
let n = noise(p.x * 0.01, p.y * 0.01, frameCount * 0.008);
let c = 90 + n * 70;
fill(c + 10, c + 30, c + 60, 120);
noStroke();

// 大小也呼吸
let sz = 3 + sin(frameCount * 0.03 + p.x * 0.1) * 1.5;
ellipse(p.x, p.y, sz, sz);
}
}

function mouseMoved() {
for (let p of particles) {
let d = dist(mouseX, mouseY, p.x, p.y);
if (d < 120) {
let angle = atan2(p.y - mouseY, p.x - mouseX);
let force = (120 - d) * 0.04;
p.x += cos(angle) * force;
p.y += sin(angle) * force;
}
}
}









為什麼這個做起來「貴」?





  1. 視覺幻覺:300 個各自輕微不同步的粒子 = 大腦說「這是活的」


  2. 日系啞光:不是RGB(0,0,255),是 RGB(90,120,180) 這種「看得到情緒」的藍


  3. 讓變化有節奏:大小變化用 sin(),不是線性——看起來像呼吸,不像閃爍


  4. 滑鼠存在:不是點擊,是「靠近就離開」的空間感






下一步



想更有 Fu?試試:




  1. 把 NUM 從 300 改成 800——數量多到一個程度,視覺會從「一群點」變成「一種物質」

  2. 把顏色從「灰藍」改成「暖橙→深褐」漸層——馬上從「北歐極簡」變成「昭和復古」

  3. 加入超聲波感測器——讓實際的「人在空間中移動」驅動粒子方向



最後一個方向,就是我們下一篇文章的主題。

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Communitydiscussie & reacties

🌐 Naar de hoofdchat

Start de discussie in de Social Chat broadcaststream of dien hierboven een vakbijdrage in via het aanvulformulier.

Community Rating &amp; Social Proof
⭐ Lezersbeoordeling
–
Ø / 5.0
Nog geen recensies van lezers
Was dit artikel nuttig?
0
Geef uw beoordeling
Detailbeoordeling (optioneel)
Inhoud & Kwaliteit
Bron & Geloofwaardigheid
Actualiteit
Security Briefing Gratis · 1-klik uitschrijven

Intelligence Digest gratis

Dagelijks het belangrijkste beveiligingsnieuws · kan op elk moment worden opgehaald

Verwant Story Cluster & Sources (vector AI)

6 Cluster
41 Bronnen
Best Black Friday MacBook Air deals: biggest discounts on Apple's thin and light laptop range
Latest from TechRadar 44 min. geleden
40 andere bronnen
Latest from TechRadar34 min. geledenProton VPN vs ExpressVPN – which secure VPN should you pick this Black Friday? WIRED9 uur geledenThe 108 Best Black Friday Deals Are Now Live: Our Expert Picks for 2026 WIRED40 min. geleden20 Best Black Friday Tech Deals (2026) WIRED39 min. geledenThe 10 Best Black Friday TV Deals (2026): Save Up to 53% Off Giga.de30 min. geledenBlack Friday 2026 bei Back Market: Dyson, Ninja und GoPro jetzt deutlich günstiger Cyber Security News1 uur geledenBlack Friday or Black Fraud Day? 7 Cyber Traps to Watch Out for Before You Click ‘Buy’ CNET2 dagen geledenLive: Black Friday Is Here. Shop Our Favorite Deals and Save Up to 60% Apple, Anker, Bose and More WIRED53 min. geleden22 Best Black Friday Deals Under $100 (2026) WIRED52 min. geledenBest Black Friday Phone Deals (2026): iPhone, Pixel, and More The Verge59 min. geledenThe absolute best Black Friday deals we’ve found (so far) Giga.de51 min. geledenAirPods Pro 3 im Black-Friday-Sturzflug: So günstig waren Apples Top-In-Ears noch nie PC-WELT49 min. geledenBlack Friday bei Amazon Haul: 20 Prozent Rabatt auf Powerbanks, Batterieprüfer, Speichersticks und mehr PC-WELT49 min. geledenBlack Friday bei Amazon Haul: 20 Prozent Rabatt auf Powerbanks, Batterieprüfer, Speichersticks und mehr t3n.de1 uur geledenKindle, Echo Dot, Fire TV: Diese neuen Amazon-Geräte sind zum Black Friday stark reduziert Macerkopf.de1 uur geledenAmazon Black Friday Woche: iPad Air, iPhone 18 Cases, AirTag 2, Fire TV Sticks, Echo Dot und mehr appgefahren.de1 uur geledenJMGO mit Black Friday-Deals: Heimkino-Bundles bis zu 60 Prozent günstiger PC-WELT1 uur geledenGoogle Pixel 11 jetzt unglaubliche 430 Euro günstiger im Black-Friday-Deal: Tiefstpreis bei Amazon PC-WELT1 uur geledenNorton 360 Premium-Security an Black Friday nur 19,99 Euro statt 100 Euro Latest from TechRadar1 uur geledenThe best Black Friday headphone deals: Sony, AirPods and more Latest from TechRadar1 uur geledenBest Black Friday mini PC deals 2026 live: Save on desktops from Apple, Geekom, GMKtec, Minisforum, and more Golem.de1 uur geledenAnzeige: Amazon startet mit Glücksrad-Gewinnspiel in den Black Friday Latest from TechRadar1 uur geledenThese smart and polished backpacks have accompanied me to events all over the world — and they're now 30% for Black Friday PC-WELT1 uur geledenRiesiger 75 Zoll 4K-QLED-Fernseher fällt bei Amazon auf nur 469 Eur im Black-Friday-Angebot PC-WELT1 uur geledenBlack Friday: Beliebte Mähroboter von Mammotion jetzt ab 599 Euro Latest from TechRadar1 uur geledenSave up to around £200 on these top mini PCs for Black Friday — with multiple options and configurations available for your exact needs or preferences Caschys Blog3 uur geledenFlexiSpot Black Friday 2026: Bis zu 40 % Rabatt auf Bestseller bei Amazon Golem.de1 uur geledenBlack Friday: Verdi mobilisiert bei Amazon in Gera nur wenige PC-WELT1 uur geledenNotebooksbilliger Black Friday: 150 Euro Extra-Rabatt – Laptops unter 300 Euro appgefahren.de1 uur geledentink.de bietet bis zu 50 Euro Extra-Rabatt auf Black-Friday-Angebote PC-WELT1 uur geledenNotebooksbilliger Black Friday: 150 Euro Extra-Rabatt – Laptops unter 300 Euro Latest from TechRadar2 uur geledenWhich all-in-one Black Friday VPN bundle is really worth it? I compared NordVPN Prime, ExpressVPN Pro, and Proton Unlimited — all under $7 a month — to decide PC-WELT2 uur geledenAmazon verlost an Black Friday Einkaufsgutscheine im Wert von 2.000 Euro PC-WELT2 uur geledenAmazon verlost an Black Friday Einkaufsgutscheine im Wert von 2.000 Euro t3n.de2 uur geledenZum Black Friday bei Ecoflow den Heimspeicher fürs Frühjahr sichern PC-WELT2 uur geledenBlack Friday ist da! Die besten Technik-Deals bei Amazon am 27.11. GamingOnLinux Latest Articl…2 uur geledenValve update the Discounts & Events page for Black Friday sales Latest from TechRadar2 uur geledenI'm an Audio Editor and these are the only cheap hi-fi and headphone deals I want you to see this Black Friday t3n.de2 uur geledenFritzbox am Black Friday: 9 gute Angebote rund um Router und Repeater PC-WELT2 uur geledenBlack Friday bei Amazon Haul: Bis zu 20 Prozent Rabatt auf Powerbanks, Bosch-Produkte und mehr PC-WELT2 uur geledenBlack Friday bei Amazon Haul: Bis zu 20 Prozent Rabatt auf Powerbanks, Bosch-Produkte und mehr
17 Bronnen
Google will soon share Android developers' addresses publicly
Engadget - Technology News & Expert Reviews 55 min. geleden
16 andere bronnen
VulDB Updates1 uur geledenCVE-2026-95429 | Google Android BrEdrDynamicChannel bredr_dynamic_channel.cc resource consumption VulDB Updates1 uur geledenCVE-2026-95434 | Google Android LowEnergyScanner low_energy_scanner.cc NotifyPeerFound resource consumption VulDB Updates1 uur geledenCVE-2026-95441 | Google Android Bluetooth connection.cc OnDisconnectionComplete denial of service VulDB Updates1 uur geledenCVE-2026-95422 | Google Android periodic_advertising_synchronizer.cc OnSyncEstablished assertion VulDB Updates1 uur geledenCVE-2026-95423 | Google Android local_service_manager.cc OnWriteCCC null pointer dereference VulDB Updates1 uur geledenCVE-2026-95447 | Google Android SDP Client client.cc OnRxFrame memory corruption VulDB Updates1 uur geledenCVE-2026-95421 | Google Android Command Processing bredr_signaling_channel.cc DecodeRxUnit use after free VulDB Updates1 uur geledenCVE-2026-95435 | Google Android advertising_data.cc FromBytes out-of-bounds VulDB Updates1 uur geledenCVE-2026-95446 | Google Android credit_based_flow_control_rx_engine.cc ProcessPdu input validation VulDB Updates1 uur geledenCVE-2026-95420 | Google Android Pairing security_manager.cc OnEncryptionChange privileges management VulDB Updates1 uur geledenCVE-2026-95419 | Google Android Bluetooth Security Manager security_manager.cc OnPairingRequest unusual condition VulDB Updates1 uur geledenCVE-2026-95416 | Google Android Link Encryption Key security_manager.cc OnPairingFailed denial of service VulDB Updates1 uur geledenCVE-2026-95415 | Google Android RemoteCharacteristic remote_characteristic.cc denial of service VulDB Updates1 uur geledenCVE-2026-95417 | Google Android remote_characteristic.cc ResolvePendingNotifyRequests use after free VulDB Updates1 uur geledenCVE-2026-95414 | Google Android http_file_request_handler.cc GetFilePath path traversal VulDB Updates1 uur geledenCVE-2026-95418 | Google Android logical_link.cc LogicalLink::SignalError use after free
Soortgelijke bijdragen
🔍 Verwandte News

Auch interessante Nachrichten 同樣是 50 行程式碼,為什麼做出來的東西像藝術品?

Thematisch verwandte Begriffe: 行程式碼為什麼做出來的東西像藝術品 · 6 Treffer

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

💬 Reacties worden geladen…
Trek om te vernieuwen
Widgets & Topics
Loading widgets…
Nächster Beitrag