Hacker News new | past | comments | ask | show | jobs | submit login

Before I click:

    $ echo 'obase=16; 1195725856' | bc | xxd -r -ps | od -cb
    0000000    G   E   T                                                    
              107 105 124 040                                                
    0000004
    $ 
Looks like HTTP.





Impressive! Before I clicked I thought this was going to be an(other) article about number theory!

printf "%x" 1195725856 will save you one bc process.

even better, thanks

  $ printf '%032x\n' 1213486160 542393671 | xxd -r -ps | xxd -g4 -c16
  00000000: 00000000 00000000 00000000 48545450  ............HTTP 
  00000010: 00000000 00000000 00000000 20544547  ............ TEG
  $

Python

  >>> 1195725856 .to_bytes(4, 'big')
  b'GET '



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: