I-JavaScript PasteJacking

Iziphequluli zesimanje zingasebenzisa iJavaScript ukufunda nokubhala ebhodini lokunamathisela lomsebenzisi, okusho ukuthi nazo zingayisebenzisa. Ubuchwepheshe obuyisisekelo vele yisigqoko esidala, kepha muva nje lapho ukuhlaselwa okuningi (ngaphansi kwegama le- "PasteJacking") bekusakazeka ku-Intanethi, okusebenzisa leli thuba kumsebenzisi ongenalwazi. Ukuqaliswa kweJavaScript yi-banal.


Umbhalo olandelayo kuphela ohlanganiswe ohlangothini olunonya:

27670b8ba9840e688369822a3fcfb2d9

Uma ukopisha noma imuphi umbhalo ovela ekhasini elinjalo, intambo engafuneki igcina iphela ebhodini lokunamathisela (kulokhu kusetshenziswa kungakhathalekile umbhalo okopishiwe). Esikhundleni se- "umyalo omubi" manje usungaqhamuka nezinto eziningi ezimbi. Yonke le nto iba yingozi uma ukuhlukaniswa kolayini ekugcineni kolayini kusetshenziselwa ukwenza ikhodi ngokushesha:

27670b8ba9840e688369822a3fcfb2d9

Kulula futhi ukusetha kabusha okukhiphayo kwekhonsoli ukuze umsebenzisi angaboni ngokushesha lokho akufakile. Isibonelo, kucatshangwa ukuthi lapho ukopisha amazwibela ekhodi angenabungozi, ungadubula ukwahlukanisa kwakho ngokudlula.

27670b8ba9840e688369822a3fcfb2d9

Ibhodi lokunameka lingasetshenziswa (ngendlela ehlukile) noma ngaphandle kweJavaScript:

27670b8ba9840e688369822a3fcfb2d9

Uma ukhetha umbhalo owuthandayo, kwiFirefox yakamuva (v. 45.0), isibonelo, akuwona lo mbhalo kepha umbhalo osemuva kwawo ogcina kubhodi yokunameka.

Zombili izindlela zingazanywa bukhoma lapha. Lapha ukwahluka kwe-JS:

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

Kanye nokuhluka kwe-CSS:

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

Emuva