lexi

i like breaking computers

  • it/its, #[deprecated] she/her
  • ./a.out

i like rust, nix, linux, infosec, webdev and i shitpost a lot. ctf player and so-called "security researcher". aroace, agender, nb, nd, disabled, &, ΘΔ :3 🏳️‍⚧️ 🟨⬜️🟪⬛️

picrew: #1322863


so if you're running your own linux server you probably know this problem: which ports do i use for the three billion things that want one. you can choose a random one, but remembering it is hard. here's how i do it:

  • take the name of the service, eg "cohost"
  • only look at the first four/five/six letters, eg "coho"
  • look at your keyboard and go up from each letter until you reach a number

  • now you know that cohost should be on port 3969!

also, if you do stuff on localhost a lot i have another hack for you: you can use the .localhost TLD which always resolves to 127.0.0.1 to your advantage. if you type cohost.localhost:3969 into your browser, it will remember it, and if you type cohost.lo it will suggest the correct port! also, if you need to test on multiple origins .localhost is nice too because each domain on there has its own origin :)


You must log in to comment.

in reply to @lexi's post:

That one's really nice.

I personally take the first 2 letters and read them as a 16 bit integer (Network byte order) but I guess it only works if you know your ASCII.

e.g. the git server is at gi → 0x6769 → 26473