Ukuncamathelisa kwiJavaScript

Ngoncedo lweJavaScript, izikhangeli zangoku zingafunda kwaye zibhalele kwibhodi eqhotyoshwayo yomsebenzisi, okt banokuyisebenzisa. Itekhnoloji esisiseko sisigqoko esidala, kodwa kutsha nje ukuba uhlaselo ngakumbi nangakumbi (phantsi kwegama elithi "ColaJacking") sele lujikeleza kwinethiwekhi elisebenzisa eli thuba lomsebenzisi ongenamava. Ukuphunyezwa kweJavaScript yi-banal.


Iskripthi esilandelayo kuphela esidityaniswe kwicala elingalunganga:

27670b8ba9840e688369822a3fcfb2d9

Ukuba ukopa nasiphi na isicatshulwa esikwelo phepha, umtya ongafunekiyo uhlala uphelela kwibhodi eqhotyoshwayo (kolu phumezo ngaphandle kokubhaliweyo). Endaweni "yomyalelo ombi" ngoku unokuza nezinto ezininzi ezimbi. Yonke le nto iyabulala ukuba umgca wophele ekupheleni komgca usetyenziselwa ukwenza ikhowudi kwangoko:

27670b8ba9840e688369822a3fcfb2d9

Kulula kwakhona ukuseta kwakhona imveliso yeconsole ukuze umsebenzisi angakuqapheli kwangoko oko akufakileyo. Umzekelo, kunokwenzeka ukuba xa ukopa ikhowudi engenabungozi, umntu angadubula izahlulelo zakhe xa edlula.

27670b8ba9840e688369822a3fcfb2d9

Ibhodi eqhotyoshwayo inokusetyenziswa ngobuwena (ngendlela eyahlukileyo) nangaphandle kweJavaScript:

27670b8ba9840e688369822a3fcfb2d9

Ukuba ukhetha isicatshulwa osifunayo, umzekelo kwiFirefox yangoku (v. 45.0) ayisiyiyo le nto kodwa isicatshulwa esingasemva kwayo esiphelela kwibhodi eqhotyoshwayo.

Zombini ezi ndlela zinokulingwa phila apha. Nantsi umahluko weJS:

See the Pen Pastejacking #1 by David Vielhuber (@vielhuber) on CodePen.

Kunye nokwahluka kweCSS:

See the Pen Pastejacking #2 by David Vielhuber (@vielhuber) on CodePen.

Emva