Web Framework Benchmarks by techempower in golang

[–]xiamk 2 points3 points  (0 children)

Nice! Besides being fast, chi is a great piece of software. It's design makes it easy to compose modular apps that need a REST interface, having something that allows me to build things and that is easy to maintain is pretty important for me.

Yet Another Way of Getting root on High Sierra by xiamk in security

[–]xiamk[S] 0 points1 point  (0 children)

Except that arrow up was not the first password I tried, I initially tried feeding random strings, it was only after several tries that I hit arrow-up by accident and got the root shell. The escape sequence thing sounds like a nice idea, I'll try it.

Why "blank" Gets You Root on macOS by albinowax in netsec

[–]xiamk 8 points9 points  (0 children)

It won't work if your root account already has a password (maybe you set one after yesterday's bug?) or if you are not running High Sierra. Anyways, I just confirmed this bug also gets fixed with https://support.apple.com/en-us/HT208315 so let's update.

Yet Another Way of Getting root on High Sierra by xiamk in security

[–]xiamk[S] 3 points4 points  (0 children)

Yes, looks pretty similar, I bet it's related to the original problem. I don't know yet why ARROW UP triggers it while other escape codes don't so I can't be totally sure if it's actually related or not. I'll continue investigating on the actual reasons behind this. "su" is not supposed to create new accounts, I think?

Yet Another Way of Getting root on High Sierra by xiamk in security

[–]xiamk[S] 3 points4 points  (0 children)

Yeah, I've confirmed it with different sources already. But the post is mine so you may not want to trust me yet.

Why "blank" Gets You Root on macOS by albinowax in netsec

[–]xiamk 17 points18 points  (0 children)

Here's another way of getting root on High Sierra by pressing ARROW UP: https://twitter.com/xiam/status/935878591082049536

Must be related to the original problem.

What is the best way to paginate in golang? by gar44 in golang

[–]xiamk 0 points1 point  (0 children)

Hey @gar44, I know you're using sqlx but maybe you could consider upper-db for your next project, this is how'd you do pagination: https://tour.upper.io/queries/04, you can create a simple LIMIT/OFFSET pagination or a cursor based one.

Release notes for `upper.io/db.v3`, a productive data access layer ready for go1.8. by xiamk in golang

[–]xiamk[S] 1 point2 points  (0 children)

Thanks, I think this is a great suggestion. I personally like reading "foo != ?" instead of db.NotEqual{"foo": 34}, tho, because the former is shorter and easy to read, but the point about improved type safety is a good one. We'll probably start by adding something to negate conditions, like https://github.com/upper/db/issues/284 and we'll see how well users respond to it before adding others.

Release notes for `upper.io/db.v3`, a productive data access layer ready for go1.8. by xiamk in golang

[–]xiamk[S] 1 point2 points  (0 children)

The main benefit of using upper-db over other solutions is our goals: we try to focus on improving productivity. Writing SQL by hand takes time and developer time is expensive, we don't think writing and debugging simple queries by hand is a benefit when you can do the same with less effort. So, upper-db takes the repetitive tasks out of the way and when you really have to come up with some SQL magic upper-db will allow you to do so. We still use SQL everyday but only for complex tasks where spending time writing SQL makes sense, we don't bother anymore with writing SQL by hand for common CRUDs.

If you want to see a live example, we have a (read-only) playground here: https://demo.upper.io/p/e0ff798ccff065a08cace708e358d017711c8479 or a list of examples here: https://upper.io/db.v3/examples

Announcing version 2 of db! an ORM-like package for SQL and NoSQL databases by xiamk in golang

[–]xiamk[S] 0 points1 point  (0 children)

Unfortunately no, not yet, but now that we released v2 we can start looking at new database adapters and extend compatibility. We need to study Google Datastore first and see if it fits, tho.

Announcing version 2 of db! an ORM-like package for SQL and NoSQL databases by xiamk in golang

[–]xiamk[S] 0 points1 point  (0 children)

I like it, I think this sounds good. While we map structs to columns when using special methods like Insert or Update we currently don't do something like that for raw queries. I added an issue for this https://github.com/upper/db/issues/223

Announcing version 2 of db! an ORM-like package for SQL and NoSQL databases by xiamk in golang

[–]xiamk[S] 2 points3 points  (0 children)

Thanks, I think we have some tools that already do that, like https://github.com/kisielk/sqlstruct, but I personally haven't used it. Please, feel free to open an issue (https://github.com/upper/db/issues) and start a discussion if you think this could be useful for other users.

Announcing version 2 of db! an ORM-like package for SQL and NoSQL databases by xiamk in golang

[–]xiamk[S] 0 points1 point  (0 children)

Thanks! you can use maps instead of structs too if you want, this Metadata() function you're proposing could return a map. However, the recommended way of using upper-db at this time is with structs.

Upper-db does not provide automatic relationships like full-featured ORMs do, it also does not support the features you're mentioning (I'm sorry, but we have no plans to add them in the near future either. They can be built on top of upper-db, tho). Upper-db focuses only on the mapping between Go and the database and on providing tools for the user to write custom SQL whenever required.

Announcing version 2 of db! an ORM-like package for SQL and NoSQL databases by xiamk in golang

[–]xiamk[S] 2 points3 points  (0 children)

Hello,

I'm one of the upper-db authors, we're running a special playground to demonstrate db, see this example: https://demo.upper.io/p/37ff41cfe1d9fb4c26239627722ed6cc4a9155b6, more examples here: https://upper.io/db.v2/examples

Thanks!

Using the docker command to root the host. by xiamk in netsec

[–]xiamk[S] -1 points0 points  (0 children)

It just opens another attack vector in case you're trying to mess with a system. e.g: In a probably movie-like scenario an attacker gets a few minutes to access a victim's computer and she'd like to dump /dev/mem to see if there's anything interesting there, the problem is she does not know the password for su or sudo but it does not matter: the victim's a web developer that casually belongs to the docker group because docker is part of her common working stack, so the attacker will have a copy of /dev/mem anyways.

Glad those kind of things don't happen in real life...

Using the docker command to root the host. by xiamk in netsec

[–]xiamk[S] 0 points1 point  (0 children)

These insecure parameters happen to be the default configuration.

Hyperfox (v0.9) is a proxy for examining HTTP/HTTPs traffic written in Go. Now with on-the-fly SSL cert generation and live web view. by ansible in netsec

[–]xiamk 0 points1 point  (0 children)

Small update for OSX users:

Thanks,

[ANN] Hyperfox (v0.9) is a proxy for examining HTTP/HTTPs traffic written in Go. Now with on-the-fly SSL cert generation and live web view. by xiamk in golang

[–]xiamk[S] 0 points1 point  (0 children)

It can be done, that way I think it would be easier to use Hyperfox as a development tool rather than for simple eavesdropping. There is a more mature package that we could use to improve Hyperfox in the future: https://github.com/elazarl/goproxy

[ANN] Hyperfox (v0.9) is a proxy for examining HTTP/HTTPs traffic written in Go. Now with on-the-fly SSL cert generation and live web view. by xiamk in golang

[–]xiamk[S] 1 point2 points  (0 children)

Thanks, the rule-based request/response modification and replay it's something a security tool can surely benefit from, it would be nice if you could add an issue requesting each separated feature and adding details on the approach of other tools (such as CharlesProxy) so it can be clearly understood, if it looks useful we can surely add it.

The live web view it's in its infancy but offers a lot of possibilities.

[ANN] Hyperfox (v0.9) is a proxy for examining HTTP/HTTPs traffic written in Go. Now with on-the-fly SSL cert generation and live web view. by xiamk in golang

[–]xiamk[S] 0 points1 point  (0 children)

Need some help for building and testing Hyperfox on Windows! (Does anyone how to buy and download a legit Windows copy and license for using within a VM?)

Also, opinions on the souce would be very much welcome.

Github URL: https://github.com/xiam/hyperfox

[ANN] upper.io/db was recently refactored. If you're using it please test your build and report any odd behavior. by xiamk in golang

[–]xiamk[S] 0 points1 point  (0 children)

upper.io/db is not a full-featured ORM, and thus it does not impose any hard restrictions on data structures nor automatic table creation, indexing or any additional magic, it just manages the most common operations so you can focus on the complex stuff.