Go Simple Binary View

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

My Linux Fedora does not have a Chinese Input Bus. So you know

First Generate a Binary file

[Jjy@localhost binary]$ dd if=/dev/urandom of=testdata count=1

Go Code:

Package Mainimport (        "FMT"        //"bytes",        "OS"        "IO") func main () {        buffer: = make ([]byte,512)        file , _: = OS. Open ("TestData")        fileinfo,_:= file. Stat ()        filesize: = FileInfo. Size ()        loop: = filesize/512        fmt. PRINTLN (Loop,filesize,len (buffer))        var i int64 for        i=0;i<loop;i++{            io. Readatleast (file,buffer,512) for            j:=0;j<32;j++{for                k:=0;k<16;k++{                        FMT. Printf ("%02x", Buffer[16*j+k])                }                fmt. Printf ("\ T") for                k:=0;k<16;k++{                        FMT. Printf ("%c", Buffer[16*j+k])                }                fmt. Println ()}}}                                                


Result:

58 B1 E2 EB FD CD A1 C4 A7 DF FA x±âbëýíq¡ä§xcßúea B3 (9C) CB CE E3 E A 4 a 5F 98ê³ "hœpëîãêjr_˜20 F3 D5 4 EE F7 b F0" 5B "6aó$õ8î÷gkð‰[" AjF2 "for the DB 3D 9A CE 7C 3C BC E8 F1 2F 1dò81û=pšî|<¼èñx/26 E8 1 7C 5A 4 a 8A DA F3 6B, ED &a ' è9| Zjšúókí95 1 A DA ED 4C 83 wª›¡ "' &! ' A1 úídlƒ0f D1 F7 C2 E6 5E B0 1 a 7C A8 DA 41 20ñ÷âæ†^°r|¨úa CF. B8 B6 (3F) 7E CA. B4 E3 72 29ï "? 6~êˆ& AMP;´ÃR) Nyéda 8C F8 F1 A3 DE 3 A, 4E 18úƒœøñ£þ: (Û '! NAD-A-CD FD 5D 6B E4-EE AD 1 b y† #ÍýwE]käwî579 FF 4C CE 2D BA DB (0E) F1 D8 ytÿlî-ºû$ñ& Amp ø48 ED 7E 1 a F9 94 B0 C3 94 DC 2D D0 D5 hí~gù "°ã" ü-ð&õw8a F9 E9 AE 0F 5F F0 E2 ðâx6þô¾4f 6F B2 $ DD B3 9A 3 FA A0 C1 A9 B9 9B oo²-ý³šfú á¹›g6c 4 b DA 2F F0 E3 Geneva CC D9 L ...: 6ðkú/ãù%ìæ 
Just for Fun

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.