News for hackers. Stuff that matters.
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by franky47 on Friday May 03, 2024 @05:52PM (#40252820)
This quickly turned from a lightsaber battle into an XSS battle. Negotiations were short.
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by 082349872349872 on Friday May 03, 2024 @07:35PM (#40253476)
To avoid XSS, try physical lightsabers: https://www.youtube.com/watch?v=NyLSZee1uN8&t=202s
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by franky47 on Saturday May 04, 2024 @12:22AM (#40254791)
I've been part of a dueling club before the pandemic, it was a very fun way of keeping in shape.
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by ravroid on Friday May 03, 2024 @08:04PM (#40253663)
I got way too much amusement out of turning all of the lightsabers into hot dogs.
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by jeanmayer on Friday May 03, 2024 @07:30PM (#40253452)
That was fun
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by FranchuFranchu on Friday May 03, 2024 @08:48PM (#40253886)
I wrote an XSS worm that turns people's names into "yay" (and the worm code) but made myself immune to it. Now someone will have to figure out how to write a counter-worm to remove the worm from the lightsaber population. Until then, the "name" feature will be permanently held hostage (by the yay worm)
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by jeanmayer on Saturday May 04, 2024 @08:38AM (#40257201)
Ok, you took it to the next level. This is amazing
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by FranchuFranchu on Saturday May 04, 2024 @02:10PM (#40259288)
You might find this interesting, if you didn't know about it already: https://en.wikipedia.org/wiki/Samy_(computer_worm) . In 2005 someone wrote an XSS worm in MySpace that made everyone follow a single person. It worked by injecting itself in the victim's profile description. It quickly reached more than a million people.
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by yunruse on Saturday May 04, 2024 @11:59AM (#40258548)
Toying with #name-input and setName() was quite fun; I wish I was there to see this part happen! What `onerror` did you end up using to make it recursive?
Re:Show HN: Lightsaber Battle – May the Fourth Be with You by FranchuFranchu on Saturday May 04, 2024 @02:01PM (#40259232)
This was the injected JS code:

    document.getElementById('name-input').value = document.getElementById('yay').outerHTML; setName(); console.log('yay')
The `<img>` tag I used was wrapped around a `div` element that had the `yay` id. I used `onload` instead of `onerror`, with an image link from Wikipedia.