home *** CD-ROM | disk | FTP | other *** search
MacBinary | 2001-08-22 | 4.1 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Wed Aug 22 13:32:12 2001, modified Wed Aug 22 13:32:12 2001, creator 'CWIE', type ASCII, 3578 bytes "nmfinger.c" , at 0xe7a 393 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 6e 6d 66 69 6e 67 | 65 72 2e 63 00 00 00 00 |..nmfing|er.c....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 0d fa 00 | 00 01 89 b7 a9 9d 1c b7 |........|........|
|00000060| a9 9d 1c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ae b3 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 20 53 69 | 6d 70 6c 69 66 69 65 64 |/*. * Si|mplified|
|00000090| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 74 68 65 20 | version| of the |
|000000a0| 73 74 61 6e 64 61 72 64 | 20 49 6e 74 65 72 6e 65 |standard| Interne|
|000000b0| 74 20 22 66 69 6e 67 65 | 72 22 20 70 72 6f 67 72 |t "finge|r" progr|
|000000c0| 61 6d 2e 0d 20 2a 20 49 | 74 20 66 69 6e 67 65 72 |am.. * I|t finger|
|000000d0| 73 20 74 68 65 20 73 70 | 65 63 69 61 6c 20 70 75 |s the sp|ecial pu|
|000000e0| 72 70 6f 73 65 20 75 73 | 65 72 20 22 6e 6d 5f 6e |rpose us|er "nm_n|
|000000f0| 6f 74 69 66 79 75 73 65 | 72 22 20 6f 6e 20 74 68 |otifyuse|r" on th|
|00000100| 65 20 63 6f 6d 70 75 74 | 65 72 0d 20 2a 20 67 69 |e comput|er. * gi|
|00000110| 76 65 6e 20 61 73 20 74 | 68 65 20 6f 6e 6c 79 20 |ven as t|he only |
|00000120| 61 72 67 75 6d 65 6e 74 | 2e 0d 20 2a 0d 20 2a 20 |argument|.. *. * |
|00000130| 54 68 69 73 20 70 72 6f | 67 72 61 6d 20 69 73 20 |This pro|gram is |
|00000140| 6d 65 61 6e 74 20 74 6f | 20 62 65 20 63 61 6c 6c |meant to| be call|
|00000150| 65 64 20 62 79 20 74 68 | 65 20 6d 61 69 6c 20 64 |ed by th|e mail d|
|00000160| 65 6c 69 76 65 72 79 20 | 70 72 6f 67 72 61 6d 20 |elivery |program |
|00000170| 6f 6e 0d 20 2a 20 61 20 | 50 4f 50 20 73 65 72 76 |on. * a |POP serv|
|00000180| 65 72 2e 20 53 65 65 20 | 62 65 6c 6f 77 20 66 6f |er. See |below fo|
|00000190| 72 20 68 6f 77 20 74 6f | 20 69 6e 76 6f 6b 65 20 |r how to| invoke |
|000001a0| 69 74 2e 0d 20 2a 20 57 | 68 65 6e 20 66 69 6e 67 |it.. * W|hen fing|
|000001b0| 65 72 65 64 20 77 69 74 | 68 20 74 68 65 20 75 73 |ered wit|h the us|
|000001c0| 65 72 20 6e 61 6d 65 20 | 22 6e 6d 5f 6e 6f 74 69 |er name |"nm_noti|
|000001d0| 66 79 75 73 65 72 22 2c | 20 4e 6f 74 69 66 79 4d |fyuser",| NotifyM|
|000001e0| 61 69 6c 20 77 69 6c 6c | 0d 20 2a 20 74 65 6c 6c |ail will|. * tell|
|000001f0| 20 74 68 65 20 50 4f 50 | 20 63 6c 69 65 6e 74 20 | the POP| client |
|00000200| 74 6f 20 66 65 74 63 68 | 20 6d 61 69 6c 20 66 72 |to fetch| mail fr|
|00000210| 6f 6d 20 74 68 65 20 50 | 4f 50 20 73 65 72 76 65 |om the P|OP serve|
|00000220| 72 2e 0d 20 2a 0d 20 2a | 0d 20 2a 20 49 74 20 69 |r.. *. *|. * It i|
|00000230| 73 20 28 6e 6f 72 6d 61 | 6c 6c 79 29 20 69 6e 76 |s (norma|lly) inv|
|00000240| 6f 6b 65 64 20 61 73 20 | 66 6f 6c 6c 6f 77 73 3a |oked as |follows:|
|00000250| 0d 20 2a 20 20 20 20 20 | 20 20 6e 6d 66 69 6e 67 |. * | nmfing|
|00000260| 65 72 20 3c 6d 61 63 68 | 69 6e 65 6e 61 6d 65 3e |er <mach|inename>|
|00000270| 0d 20 2a 20 77 68 65 72 | 65 20 6d 61 63 68 69 6e |. * wher|e machin|
|00000280| 65 6e 61 6d 65 20 69 73 | 20 72 65 70 6c 61 63 65 |ename is| replace|
|00000290| 64 20 62 79 20 74 68 65 | 20 49 50 20 61 64 64 72 |d by the| IP addr|
|000002a0| 65 73 73 20 6f 72 20 44 | 4e 53 20 6e 61 6d 65 20 |ess or D|NS name |
|000002b0| 6f 66 20 74 68 65 0d 20 | 2a 20 6d 61 63 68 69 6e |of the. |* machin|
|000002c0| 65 20 72 75 6e 6e 69 6e | 67 20 4e 6f 74 69 66 79 |e runnin|g Notify|
|000002d0| 4d 61 69 6c 2e 0d 20 2a | 20 0d 20 2a 20 49 66 20 |Mail.. *| . * If |
|000002e0| 4e 6f 74 69 66 79 4d 61 | 69 6c 20 69 73 20 63 6f |NotifyMa|il is co|
|000002f0| 6e 66 69 67 75 72 65 64 | 20 74 6f 20 75 73 65 20 |nfigured| to use |
|00000300| 55 44 50 2c 20 74 68 69 | 73 20 70 72 6f 67 72 61 |UDP, thi|s progra|
|00000310| 6d 20 73 68 6f 75 6c 64 | 20 62 65 20 69 6e 76 6f |m should| be invo|
|00000320| 6b 65 64 0d 20 2a 20 61 | 73 20 66 6f 6c 6c 6f 77 |ked. * a|s follow|
|00000330| 73 3a 0d 20 2a 20 20 20 | 20 20 20 20 6e 6d 66 69 |s:. * | nmfi|
|00000340| 6e 67 65 72 20 3c 6d 61 | 63 68 69 6e 65 6e 61 6d |nger <ma|chinenam|
|00000350| 65 3e 20 55 44 50 0d 20 | 2a 0d 20 2a 0d 20 2a 20 |e> UDP. |*. *. * |
|00000360| 49 74 20 65 78 69 74 73 | 20 77 69 74 68 20 61 20 |It exits| with a |
|00000370| 72 65 73 75 6c 74 20 63 | 6f 64 65 20 6f 66 20 30 |result c|ode of 0|
|00000380| 20 77 65 74 68 65 72 20 | 6f 72 20 6e 6f 74 20 74 | wether |or not t|
|00000390| 68 65 20 63 6f 6d 70 75 | 74 65 72 0d 20 2a 20 72 |he compu|ter. * r|
|000003a0| 65 70 6c 69 65 73 2e 20 | 49 74 20 64 6f 65 73 6e |eplies. |It doesn|
|000003b0| 27 74 20 6c 69 73 74 65 | 6e 20 66 6f 72 20 61 6e |'t liste|n for an|
|000003c0| 79 20 61 6e 73 77 65 72 | 2e 0d 20 2a 0d 20 2a 20 |y answer|.. *. * |
|000003d0| 55 73 65 20 74 68 65 20 | 6f 70 74 69 6f 6e 73 20 |Use the |options |
|000003e0| 22 2d 44 5f 42 53 44 20 | 2d 6c 62 73 64 22 20 74 |"-D_BSD |-lbsd" t|
|000003f0| 6f 20 63 6f 6d 70 69 6c | 65 20 6f 6e 20 41 49 58 |o compil|e on AIX|
|00000400| 20 34 2e 31 2e 0d 20 2a | 20 50 41 54 48 3d 2f 75 | 4.1.. *| PATH=/u|
|00000410| 73 72 2f 62 69 6e 3a 2f | 75 73 72 2f 6c 6f 63 61 |sr/bin:/|usr/loca|
|00000420| 6c 2f 62 69 6e 20 67 63 | 63 20 2d 73 20 2d 4f 20 |l/bin gc|c -s -O |
|00000430| 6e 6d 66 69 6e 67 65 72 | 2e 63 20 2d 6f 20 6e 6d |nmfinger|.c -o nm|
|00000440| 66 69 6e 67 65 72 20 2d | 6c 73 6f 63 6b 65 74 20 |finger -|lsocket |
|00000450| 2d 6c 6e 73 6c 0d 20 2a | 0d 20 2a 20 43 6f 6e 63 |-lnsl. *|. * Conc|
|00000460| 65 70 74 20 66 6f 72 20 | 74 68 69 73 20 70 72 6f |ept for |this pro|
|00000470| 67 72 61 6d 20 61 6e 64 | 20 6f 72 69 67 69 6e 61 |gram and| origina|
|00000480| 6c 20 70 72 6f 74 6f 74 | 79 70 65 20 77 72 69 74 |l protot|ype writ|
|00000490| 74 65 6e 20 62 79 20 61 | 20 4e 6f 74 69 66 79 4d |ten by a| NotifyM|
|000004a0| 61 69 6c 20 75 73 65 72 | 0d 20 2a 20 4d 6f 64 69 |ail user|. * Modi|
|000004b0| 66 69 63 61 74 69 6f 6e | 73 20 61 6e 64 20 72 65 |fication|s and re|
|000004c0| 64 65 73 69 67 6e 20 62 | 79 20 53 41 47 0d 20 2a |design b|y SAG. *|
|000004d0| 2f 0d 20 0d 23 69 6e 63 | 6c 75 64 65 20 3c 73 79 |/. .#inc|lude <sy|
|000004e0| 73 2f 74 79 70 65 73 2e | 68 3e 0d 23 69 6e 63 6c |s/types.|h>.#incl|
|000004f0| 75 64 65 20 3c 73 79 73 | 2f 73 6f 63 6b 65 74 2e |ude <sys|/socket.|
|00000500| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |h>.#incl|ude <sys|
|00000510| 2f 65 72 72 6e 6f 2e 68 | 3e 0d 23 69 6e 63 6c 75 |/errno.h|>.#inclu|
|00000520| 64 65 20 3c 6e 65 74 69 | 6e 65 74 2f 69 6e 2e 68 |de <neti|net/in.h|
|00000530| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 75 6e 69 73 |>.#inclu|de <unis|
|00000540| 74 64 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |td.h>.#i|nclude <|
|00000550| 6e 65 74 64 62 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |netdb.h>|.#includ|
|00000560| 65 20 3c 73 74 64 69 6f | 2e 68 3e 0d 20 0d 23 64 |e <stdio|.h>. .#d|
|00000570| 65 66 69 6e 65 20 44 41 | 54 41 20 22 6e 6d 5f 6e |efine DA|TA "nm_n|
|00000580| 6f 74 69 66 79 75 73 65 | 72 5c 72 5c 6e 22 0d 23 |otifyuse|r\r\n".#|
|00000590| 64 65 66 69 6e 65 20 42 | 55 46 53 49 5a 45 20 32 |define B|UFSIZE 2|
|000005a0| 35 36 0d 20 0d 6d 61 69 | 6e 28 61 72 67 63 2c 20 |56. .mai|n(argc, |
|000005b0| 61 72 67 76 29 0d 69 6e | 74 20 61 72 67 63 3b 0d |argv).in|t argc;.|
|000005c0| 63 68 61 72 20 2a 61 72 | 67 76 5b 5d 3b 0d 7b 0d |char *ar|gv[];.{.|
|000005d0| 20 20 20 20 69 6e 74 20 | 73 6f 63 6b 2c 20 66 6c | int |sock, fl|
|000005e0| 61 67 3b 0d 20 20 20 20 | 73 74 72 75 63 74 20 73 |ag;. |struct s|
|000005f0| 6f 63 6b 61 64 64 72 5f | 69 6e 20 73 65 72 76 65 |ockaddr_|in serve|
|00000600| 72 3b 0d 20 20 20 20 73 | 74 72 75 63 74 20 68 6f |r;. s|truct ho|
|00000610| 73 74 65 6e 74 20 2a 68 | 70 3b 0d 20 20 20 20 63 |stent *h|p;. c|
|00000620| 68 61 72 20 62 75 66 66 | 65 72 5b 42 55 46 53 49 |har buff|er[BUFSI|
|00000630| 5a 45 5d 3b 0d 20 0d 20 | 20 20 20 2f 2a 20 52 65 |ZE];. . | /* Re|
|00000640| 61 64 20 61 6e 64 20 64 | 69 73 63 61 72 64 20 64 |ad and d|iscard d|
|00000650| 61 74 61 20 66 72 6f 6d | 20 73 74 61 6e 64 61 72 |ata from| standar|
|00000660| 64 20 69 6e 70 75 74 20 | 28 74 68 65 20 6d 61 69 |d input |(the mai|
|00000670| 6c 29 2e 20 2a 2f 0d 20 | 20 0d 20 20 20 20 2f 2a |l). */. | . /*|
|00000680| 20 55 6e 64 65 72 20 6d | 6f 73 74 20 63 69 72 63 | Under m|ost circ|
|00000690| 75 6d 73 74 61 6e 63 65 | 73 2c 20 79 6f 75 20 73 |umstance|s, you s|
|000006a0| 68 6f 75 6c 64 20 6c 65 | 61 76 65 20 74 68 65 20 |hould le|ave the |
|000006b0| 66 6f 6c 6c 6f 77 69 6e | 67 20 2a 2f 0d 20 20 20 |followin|g */. |
|000006c0| 20 2f 2a 20 6c 69 6e 65 | 20 75 6e 63 6f 6d 6d 65 | /* line| uncomme|
|000006d0| 6e 74 65 64 20 61 73 20 | 74 68 65 20 6d 61 69 6c |nted as |the mail|
|000006e0| 20 77 69 6c 6c 20 62 65 | 20 70 69 70 65 64 20 69 | will be| piped i|
|000006f0| 6e 74 6f 20 74 68 65 20 | 73 74 64 69 6e 20 6f 66 |nto the |stdin of|
|00000700| 20 74 68 69 73 20 2a 2f | 0d 20 20 20 20 2f 2a 20 | this */|. /* |
|00000710| 70 72 6f 67 72 61 6d 2e | 20 48 6f 77 65 76 65 72 |program.| However|
|00000720| 2c 20 69 66 20 79 6f 75 | 20 65 6e 63 6f 75 6e 74 |, if you| encount|
|00000730| 65 72 20 70 72 6f 62 6c | 65 6d 73 2c 20 63 6f 6d |er probl|ems, com|
|00000740| 6d 65 6e 74 20 6f 75 74 | 20 74 68 65 20 2a 2f 0d |ment out| the */.|
|00000750| 20 20 20 20 2f 2a 20 66 | 6f 6c 6c 6f 77 69 6e 67 | /* f|ollowing|
|00000760| 20 6c 69 6e 65 2e 20 2a | 2f 0d 20 20 0d 20 20 20 | line. *|/. . |
|00000770| 20 77 68 69 6c 65 20 28 | 67 65 74 63 28 73 74 64 | while (|getc(std|
|00000780| 69 6e 29 21 3d 45 4f 46 | 29 3b 0d 20 0d 20 0d 20 |in)!=EOF|);. . . |
|00000790| 20 20 20 2f 2a 20 43 72 | 65 61 74 65 20 61 20 73 | /* Cr|eate a s|
|000007a0| 6f 63 6b 65 74 2e 20 2a | 2f 0d 20 20 20 20 2f 2a |ocket. *|/. /*|
|000007b0| 20 4e 6f 72 6d 61 6c 6c | 79 20 63 72 65 61 74 65 | Normall|y create|
|000007c0| 20 61 20 54 43 50 20 73 | 6f 63 6b 65 74 2e 2e 2e | a TCP s|ocket...|
|000007d0| 69 66 20 69 74 20 69 73 | 20 69 6e 76 6f 6b 65 64 |if it is| invoked|
|000007e0| 20 66 6f 72 20 55 44 50 | 2c 20 63 72 65 61 74 65 | for UDP|, create|
|000007f0| 20 61 20 2a 2f 0d 20 20 | 20 20 2f 2a 20 55 44 50 | a */. | /* UDP|
|00000800| 20 73 6f 63 6b 65 74 2e | 20 2a 2f 0d 20 0d 20 20 | socket.| */. . |
|00000810| 20 20 73 6f 63 6b 20 3d | 20 73 6f 63 6b 65 74 28 | sock =| socket(|
|00000820| 41 46 5f 49 4e 45 54 2c | 20 53 4f 43 4b 5f 53 54 |AF_INET,| SOCK_ST|
|00000830| 52 45 41 4d 2c 20 30 29 | 3b 0d 20 0d 20 20 20 20 |REAM, 0)|;. . |
|00000840| 69 66 20 28 73 6f 63 6b | 20 3c 20 30 29 0d 20 20 |if (sock| < 0). |
|00000850| 20 20 7b 0d 20 20 20 20 | 20 20 20 20 65 78 69 74 | {. | exit|
|00000860| 28 30 29 3b 0d 20 20 20 | 20 7d 0d 20 0d 20 20 20 |(0);. | }. . |
|00000870| 20 2f 2a 20 4c 6f 6f 6b | 20 75 70 20 74 68 65 20 | /* Look| up the |
|00000880| 64 6f 6d 61 69 6e 20 6e | 61 6d 65 20 67 69 76 65 |domain n|ame give|
|00000890| 6e 20 61 73 20 61 72 67 | 75 6d 65 6e 74 2e 20 2a |n as arg|ument. *|
|000008a0| 2f 0d 20 20 20 20 68 70 | 20 3d 20 67 65 74 68 6f |/. hp| = getho|
|000008b0| 73 74 62 79 6e 61 6d 65 | 28 61 72 67 76 5b 31 5d |stbyname|(argv[1]|
|000008c0| 29 3b 0d 20 20 20 20 69 | 66 20 28 68 70 20 3d 3d |);. i|f (hp ==|
|000008d0| 20 30 29 0d 20 20 20 20 | 7b 0d 20 20 20 20 20 20 | 0). |{. |
|000008e0| 20 20 65 78 69 74 28 30 | 29 3b 0d 20 20 20 20 7d | exit(0|);. }|
|000008f0| 0d 20 0d 20 20 20 20 20 | 20 20 20 2f 2a 0d 20 20 |. . | /*. |
|00000900| 20 20 20 20 20 20 20 2a | 20 49 6e 20 6f 72 64 65 | *| In orde|
|00000910| 72 20 74 6f 20 72 65 64 | 75 63 65 20 74 68 65 20 |r to red|uce the |
|00000920| 74 69 6d 65 20 77 65 20 | 77 61 6e 74 20 74 6f 20 |time we |want to |
|00000930| 77 61 69 74 20 66 6f 72 | 20 74 68 65 0d 20 20 20 |wait for| the. |
|00000940| 20 20 20 20 20 20 2a 20 | 63 6f 6e 6e 65 63 74 69 | * |connecti|
|00000950| 6f 6e 20 74 6f 20 4e 6f | 74 69 66 79 4d 61 69 6c |on to No|tifyMail|
|00000960| 20 74 6f 20 74 69 6d 65 | 6f 75 74 2c 20 77 65 27 | to time|out, we'|
|00000970| 6c 6c 20 64 6f 20 61 6e | 20 66 70 69 6e 67 0d 20 |ll do an| fping. |
|00000980| 20 20 20 20 20 20 20 20 | 2a 20 74 6f 20 74 68 65 | |* to the|
|00000990| 20 68 6f 73 74 2e 20 49 | 66 20 74 68 65 20 70 69 | host. I|f the pi|
|000009a0| 6e 67 20 72 65 74 75 72 | 6e 73 20 76 65 72 79 20 |ng retur|ns very |
|000009b0| 71 75 69 63 6b 6c 79 2c | 20 74 68 65 6e 0d 20 20 |quickly,| then. |
|000009c0| 20 20 20 20 20 20 20 2a | 20 74 72 79 20 74 68 65 | *| try the|
|000009d0| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 2e 20 4d 61 6b | connect|ion. Mak|
|000009e0| 65 20 73 75 72 65 20 74 | 68 61 74 20 66 70 69 6e |e sure t|hat fpin|
|000009f0| 67 20 69 73 0d 20 20 20 | 20 20 20 20 20 20 2a 20 |g is. | * |
|00000a00| 70 72 6f 70 65 72 6c 79 | 20 69 6e 73 74 61 6c 6c |properly| install|
|00000a10| 65 64 0d 20 20 20 20 20 | 20 20 20 20 2a 2f 0d 20 |ed. | */. |
|00000a20| 20 20 20 20 20 20 20 73 | 74 72 63 70 79 28 62 75 | s|trcpy(bu|
|00000a30| 66 66 65 72 2c 22 77 68 | 69 63 68 20 66 70 69 6e |ffer,"wh|ich fpin|
|00000a40| 67 22 29 3b 0d 20 20 20 | 20 20 20 20 20 0d 20 20 |g");. | . |
|00000a50| 20 20 20 20 20 20 69 66 | 20 28 73 79 73 74 65 6d | if| (system|
|00000a60| 28 62 75 66 66 65 72 29 | 20 3d 3d 30 29 0d 20 20 |(buffer)| ==0). |
|00000a70| 20 20 20 20 20 20 7b 0d | 20 20 73 70 72 69 6e 74 | {.| sprint|
|00000a80| 66 28 62 75 66 66 65 72 | 2c 22 66 70 69 6e 67 20 |f(buffer|,"fping |
|00000a90| 2d 71 20 2d 74 20 32 35 | 30 20 25 73 22 2c 61 72 |-q -t 25|0 %s",ar|
|00000aa0| 67 76 5b 31 5d 29 3b 0d | 20 20 0d 20 20 69 66 20 |gv[1]);.| . if |
|00000ab0| 28 73 79 73 74 65 6d 28 | 62 75 66 66 65 72 29 20 |(system(|buffer) |
|00000ac0| 21 3d 20 30 29 0d 20 20 | 7b 0d 20 20 20 20 20 20 |!= 0). |{. |
|00000ad0| 20 20 20 20 65 78 69 74 | 28 30 29 3b 0d 20 20 7d | exit|(0);. }|
|00000ae0| 0d 20 20 20 20 20 20 20 | 20 7d 0d 20 0d 20 20 20 |. | }. . |
|00000af0| 20 2f 2a 20 42 75 69 6c | 64 20 61 64 64 72 65 73 | /* Buil|d addres|
|00000b00| 73 20 73 74 72 75 63 74 | 75 72 65 2e 20 2a 2f 0d |s struct|ure. */.|
|00000b10| 20 20 20 20 6d 65 6d 63 | 70 79 28 26 73 65 72 76 | memc|py(&serv|
|00000b20| 65 72 2e 73 69 6e 5f 61 | 64 64 72 2c 68 70 2d 3e |er.sin_a|ddr,hp->|
|00000b30| 68 5f 61 64 64 72 2c 68 | 70 2d 3e 68 5f 6c 65 6e |h_addr,h|p->h_len|
|00000b40| 67 74 68 29 3b 0d 20 0d | 20 20 20 20 73 65 72 76 |gth);. .| serv|
|00000b50| 65 72 2e 73 69 6e 5f 66 | 61 6d 69 6c 79 20 3d 20 |er.sin_f|amily = |
|00000b60| 41 46 5f 49 4e 45 54 3b | 0d 20 20 0d 20 20 20 20 |AF_INET;|. . |
|00000b70| 2f 2a 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |/* The f|ollowing|
|00000b80| 20 6c 69 6e 65 20 6d 61 | 79 20 6e 65 65 64 20 74 | line ma|y need t|
|00000b90| 6f 20 62 65 20 75 6e 63 | 6f 6d 6d 65 6e 74 65 64 |o be unc|ommented|
|00000ba0| 20 64 65 70 65 6e 64 69 | 6e 67 20 6f 6e 20 74 68 | dependi|ng on th|
|00000bb0| 65 20 4f 53 20 76 65 72 | 73 69 6f 6e 20 2d 53 41 |e OS ver|sion -SA|
|00000bc0| 47 20 2a 2f 0d 20 20 20 | 20 2f 2a 20 73 65 72 76 |G */. | /* serv|
|00000bd0| 65 72 2e 73 69 6e 5f 6c | 65 6e 20 3d 20 73 69 7a |er.sin_l|en = siz|
|00000be0| 65 6f 66 28 73 65 72 76 | 65 72 29 3b 20 2a 2f 0d |eof(serv|er); */.|
|00000bf0| 20 20 20 20 73 65 72 76 | 65 72 2e 73 69 6e 5f 70 | serv|er.sin_p|
|00000c00| 6f 72 74 20 3d 20 68 74 | 6f 6e 73 28 61 74 6f 69 |ort = ht|ons(atoi|
|00000c10| 28 22 37 39 22 29 29 3b | 0d 20 0d 20 20 20 20 2f |("79"));|. . /|
|00000c20| 2a 20 43 6f 6e 6e 65 63 | 74 20 74 6f 20 6d 61 63 |* Connec|t to mac|
|00000c30| 68 69 6e 65 20 72 75 6e | 6e 69 6e 67 20 4e 6f 74 |hine run|ning Not|
|00000c40| 69 66 79 4d 61 69 6c 2e | 20 2a 2f 0d 20 20 20 20 |ifyMail.| */. |
|00000c50| 69 66 20 28 63 6f 6e 6e | 65 63 74 28 73 6f 63 6b |if (conn|ect(sock|
|00000c60| 2c 20 28 73 74 72 75 63 | 74 20 73 6f 63 6b 61 64 |, (struc|t sockad|
|00000c70| 64 72 2a 29 26 73 65 72 | 76 65 72 2c 20 73 69 7a |dr*)&ser|ver, siz|
|00000c80| 65 6f 66 28 73 65 72 76 | 65 72 29 29 20 3c 20 30 |eof(serv|er)) < 0|
|00000c90| 29 0d 20 20 20 20 7b 0d | 20 20 20 20 20 20 20 20 |). {.| |
|00000ca0| 65 78 69 74 28 30 29 3b | 0d 20 20 20 20 7d 0d 20 |exit(0);|. }. |
|00000cb0| 0d 20 20 20 20 2f 2a 20 | 53 65 6e 64 20 66 69 6e |. /* |Send fin|
|00000cc0| 67 65 72 20 72 65 71 75 | 65 73 74 2e 20 2a 2f 0d |ger requ|est. */.|
|00000cd0| 20 20 20 20 69 66 20 28 | 77 72 69 74 65 28 73 6f | if (|write(so|
|00000ce0| 63 6b 2c 20 44 41 54 41 | 2c 20 73 69 7a 65 6f 66 |ck, DATA|, sizeof|
|00000cf0| 28 44 41 54 41 29 2d 31 | 29 20 3c 20 30 29 0d 20 |(DATA)-1|) < 0). |
|00000d00| 20 20 20 7b 0d 20 20 20 | 20 20 20 20 20 65 78 69 | {. | exi|
|00000d10| 74 28 30 29 3b 0d 20 20 | 20 20 7d 0d 20 0d 20 20 |t(0);. | }. . |
|00000d20| 20 20 2f 2a 20 52 65 63 | 69 76 65 20 61 6e 73 77 | /* Rec|ive answ|
|00000d30| 65 72 20 61 6e 64 20 74 | 68 72 6f 77 20 69 74 20 |er and t|hrow it |
|00000d40| 61 77 61 79 2e 20 2a 2f | 0d 20 20 20 20 2f 2a 20 |away. */|. /* |
|00000d50| 55 6e 64 65 72 20 6d 6f | 73 74 20 63 69 72 63 75 |Under mo|st circu|
|00000d60| 6d 73 74 61 6e 63 65 73 | 2c 20 79 6f 75 20 63 61 |mstances|, you ca|
|00000d70| 6e 20 6c 65 61 76 65 20 | 74 68 65 20 66 6f 6c 6c |n leave |the foll|
|00000d80| 6f 77 69 6e 67 20 62 6c | 6f 63 6b 20 63 6f 6d 6d |owing bl|ock comm|
|00000d90| 65 6e 74 65 64 20 2a 2f | 0d 20 20 20 20 2f 2a 20 |ented */|. /* |
|00000da0| 6f 75 74 3b 20 74 68 65 | 72 65 20 69 73 20 6e 6f |out; the|re is no|
|00000db0| 20 72 65 61 73 6f 6e 20 | 74 6f 20 72 65 61 64 20 | reason |to read |
|00000dc0| 74 68 65 20 72 65 73 70 | 6f 6e 73 65 20 28 69 66 |the resp|onse (if|
|00000dd0| 20 61 6e 79 29 20 66 72 | 6f 6d 20 4e 6f 74 69 66 | any) fr|om Notif|
|00000de0| 79 4d 61 69 6c 2e 20 2a | 2f 0d 20 20 20 20 2f 2a |yMail. *|/. /*|
|00000df0| 0d 20 20 20 20 69 66 20 | 28 72 65 61 64 28 73 6f |. if |(read(so|
|00000e00| 63 6b 2c 20 62 75 66 66 | 65 72 2c 20 42 55 46 53 |ck, buff|er, BUFS|
|00000e10| 49 5a 45 29 20 3c 20 30 | 29 0d 20 20 20 20 7b 0d |IZE) < 0|). {.|
|00000e20| 20 20 20 20 20 20 20 20 | 65 78 69 74 28 30 29 3b | |exit(0);|
|00000e30| 0d 20 20 20 20 7d 0d 20 | 20 20 20 2a 2f 0d 20 0d |. }. | */. .|
|00000e40| 20 20 20 20 2f 2a 20 43 | 6c 6f 73 65 20 73 6f 63 | /* C|lose soc|
|00000e50| 6b 65 74 2e 20 2a 2f 0d | 20 20 20 20 63 6c 6f 73 |ket. */.| clos|
|00000e60| 65 28 73 6f 63 6b 29 3b | 0d 20 0d 20 20 20 20 65 |e(sock);|. . e|
|00000e70| 78 69 74 28 30 29 3b 0d | 7d 0d 00 00 00 00 00 00 |xit(0);.|}.......|
|00000e80| 00 00 01 00 00 00 01 48 | 00 00 00 48 00 00 00 41 |.......H|...H...A|
|00000e90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f80| 00 00 00 44 78 49 e7 4e | 3f e5 32 30 00 04 00 00 |...DxI.N|?.20....|
|00000f90| 00 00 00 00 00 00 b7 a9 | 64 dc b7 a9 64 dc 00 00 |........|d...d...|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 05 73 |........|.......s|
|00000fb0| 63 6f 74 74 00 00 00 0a | 6e 6d 66 69 6e 67 65 72 |cott....|nmfinger|
|00000fc0| 2e 63 00 00 00 00 00 00 | 00 00 01 00 00 00 01 48 |.c......|.......H|
|00000fd0| 00 00 00 48 00 00 00 41 | 00 0c f0 90 02 45 00 00 |...H...A|.....E..|
|00000fe0| 00 1c 00 32 00 00 63 6b | 69 64 00 00 00 0a 00 80 |...2..ck|id......|
|00000ff0| 00 00 00 00 00 00 01 d0 | 9a 1c 0e 50 72 6f 6a 65 |........|...Proje|
|00001000| 63 74 6f 72 20 44 61 74 | 61 00 00 00 00 00 00 00 |ctor Dat|a.......|
|00001010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+