HNHacker News
TopNewBestAskShowJobs

tshadwell

798 karma · joined April 17, 2012

Infosec @Twitch twitter.com/zemnmez

I can be contacted at my gmail: thomas.shadwell

submissionscomments
tshadwell··on OS X Screencast to animated GIF
byzanz was created for this purpose.
tshadwell··on Why I sometimes hate JavaScript
Honestly, there should have been a loop there. The author introduced un-necessary complexity and a bug appeared. Not that Javascript is a great language.
tshadwell··on Python Social Auth
A nice product, but it should be noted that every additional authorization method you add to your product is a very high value and often mis-implemented weak point!
tshadwell··on Go concurrency isn't parallelism: Real world lessons with Monte Carlo sims
Isn't this a misleading title? The article is essentially the author forgetting to set GOMAXPROCS, not really a lack of parallelism in Go.
tshadwell··on Matrix Digital Rain – Written in GopherJS
It's very nice, but the Javascript is 475KB mainly because it's written in poorly compiled Go; something like this could be written in 100x less vanilla Javascript.

What implementation of compile-to-javascript Go is this? They should add tags for closure compiler optimization, just simple optimisations (without type annotations, which are present, usefully in go) cuts the filesize by half.

tshadwell··on Single-Tag Website
You can do this /without/ a link tag in Firefox by using a link header. Syntax is:

Link:<[filename]>;rel=stylesheet

It's fun to use:

Link:<.>;rel=stylesheet

and detect the Accept: text/css header to serve a css file conditionally, too.

tshadwell··on Antha – A high-level language for biology
I was looking into who this was funded by, and Synthace who are listed in the footer have this page:

http://www.synthace.com/investors/

Amusingly, the link for their main sponsor's website goes to: "file:///C:/Users/sward/Downloads/www.sofinnova.fr"

tshadwell··on Hacking PayPal Accounts with one click
Pivotal paragraph: "We have found out that an Attacker can obtain the CSRF Auth which can be valid for ALL users, by intercepting the POST request from a page that provide an Auth Token before the Logging-in process, check this page for the magical CSRF Auth “https://www.paypal.com/eg/cgi-bin/webscr?cmd=_send-money”. At this point the attacker Can CSRF “almost” any request on behave of this user."

He captured a cross-site request forgery token which was valid for all users.

tshadwell··on Website with 1000s of live baby monitors, web cams and CCTV feeds has shut down
I was amazed when I was watching BBC News and this came on. I remember Google dorking webcams when I was 12 and the BBC were playing it up like some prodigal hacker had tapped into the matrix to produce these webcams or something.
tshadwell··on BitQuest – Minecraft server with Bitcoin-denominated economy
This would be great if the primary demographic for Minecraft didn't become almost entirely children.
tshadwell··on Foobar
It mystifies me especially that the logout URL for the login call is chained a number of times.

logoutUrl: 'https://foobar.withgoogle.com/_ah/logout?continue=https://ww...

tshadwell··on Firefox Developer Edition
I noticed the logo loads slowly and it actually loads a huge x1024 image https://mdn.mozillademos.org/files/9069/firefox-dev-ed_logo-...
tshadwell··on Reflected File Download: A New Web Attack Vector
The important point to me is "some web services", which translates to 'some web servers', but which? Through a cursory browse I can't find one.

Correction: this seems to rely almost entirely on the content-type sniffing of the client-side, provided the content-disposition is 'attachment'.

tshadwell··on Study finds reduced brain volume in expert chess players
"bees have tiny brains and are very smart". Smart in what sense, exactly?
tshadwell··on A replacement for JavaScript's “alert”
Though the alert may look nice, the actual JS behind it is hugely wanting for several reasons: - 690 LOC to produce an alert dialog

- Heavy use of Javascript for what CSS is designed for: https://github.com/t4t5/sweetalert/blob/master/lib/sweet-ale...

- Inconsistent between function spacing followed by mixed tabs and spaces

- Odd use of DOM based attributes to pass configuration options

- Colourspace manipulation on each call where SASS would be effective https://github.com/t4t5/sweetalert/blob/master/lib/sweet-ale...

- Includes jquery, but uses it very little, instead opting to re-invent the wheel in most cases.

- Strange click event firing, gratuitous use of magic key code numbers https://github.com/t4t5/sweetalert/blob/master/lib/sweet-ale...

etc...

tshadwell··on Show HN: GoldenLayout – JavaScript Layout Manager
Usually I work to prevent problems rather than create them but hey I could be the antagonist in someone's novel. I doubt that's not the only exploit in the library either. I could go through it with a finer toothed comb if you wanted.
tshadwell··on Show HN: GoldenLayout – JavaScript Layout Manager
I edited my original post to include a working XSS exploit.
tshadwell··on Show HN: GoldenLayout – JavaScript Layout Manager
I realise that, but unless every piece of information in the JSON is dealt with caution (which I doubt from experience) it could be possible to put together an attack. Well, I should probably verify that myself.
tshadwell··on Show HN: GoldenLayout – JavaScript Layout Manager
I've not looked in detail, but I'm not so sure about the security of generating windows via URL parameters. I feel like there's an XSS in that for sure.

Edit: there is https://golden-layout.com/?gl-window=%7B%22g%22%3A%5B%7B%22o...

Please don't chastise me for disclosure ethics, this one was low-hanging fruit.

tshadwell··on Show HN: I built an extension of JavaScript in a day
if you're that determined to shoot yourself in the foot you might as well rebind valueOf
tshadwell··on A URL shortener service in 45 lines of Scala
As far as I am aware, the standard implementation of a URL shortening algorithm is to convert the number to a higher base, not to generate a random string. This has the advantages of greater loading speed, and smaller storage size.

Here is one I wrote long enough ago for me to be divorced from its implementation flaws: https://github.com/TShadwell/go-shorten/blob/master/shorten/...

tshadwell··on Show HN: I built an extension of JavaScript in a day
By the way, `typeof X === 'undefined'` doesn't need to be used for variable names that exist such as arguments, you can use X == undefined without opportunity for failure.
tshadwell··on A new set of Firefox Developer Tools features
Ah, yes that's great!
tshadwell··on A new set of Firefox Developer Tools features
As usual, the event listeners shown are just jQuery making the binding. It would be really great if it actually stepped back through the stack to see what initially called jQuery's bind. I can't think of any general solution to the problem that covers all libraries, but jQuery is so ubiquitous it should be worthwhile.
tshadwell··on Aspects of Plant Intelligence (2003)
https://en.wikipedia.org/wiki/Plant_intelligence#Plant_intel...

There is a Wikipedia article on this which may provide some wider information.

tshadwell··on Arrays in Go
I've been using a pattern like this for my more complex initialisations:

s, i := make([]T, 0, 6), 0

s = append(s, 1, 2, 3)

//[1 2 3]

fmt.Println(s[i:])

i += 3

s = append(s, 4, 5, 6)

//[4 5 6]

fmt.Println(s[i:])

i += 3 // [etc...]

//[1 2 3 4 5 6]

fmt.Println(s[:])

You can easily make references to each chunk of the slice you append without much difficulty or any re-sizing (the first s[:] will remain a slice of the first 3 items).

tshadwell··on Paris syndrome
https://en.wikipedia.org/wiki/Culture-bound_syndrome Many of these are also just as interesting
tshadwell··on Why blurring sensitive information is a bad idea (2007)
And when you colour in the picture always use a pen of 100% opacity or the colour can be removed from the image to reveal the data underneath!
tshadwell··on Timing attack, 6.66% faster
Perhaps another reason to use a fixed time string equality function
tshadwell··on Lego-like bricks for full-sized buildings
This doesn't seem very realistic. Looking at the tires of they're robot, it would be almost impossible to manoeuvre on that kind of surface.

If you look at Lego vehicles for example, they all have to have disproportionately wide wheels to be able to navigate the studs on the bricks without getting caught.

In addition, there are the problems of forming non-rectangular and non 90 degree walls anywhere in the house, the problem of recognising and targeting the bricks correctly with the robot, the 'spray on' cement that seems a fantasy.

← PreviousPage 3 of 6Next →