File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/python
2
+
3
+ #Author: Suraj Patil
4
+ #Version: 1.0
5
+ #Date: 26th March 2014
6
+
1
7
'''
2
8
this file won't execute, you will have to type this all into the python prompt, which is the appropriate way of
3
9
doing programming, as it allows the programmer to have an interactive output
4
10
5
- http://standards.ieee.org/develop/regauth/ethertype/eth.txt
6
- this is the etherType text file we are going to use
7
- there are 43 lines, each one has a hex number, I have to convert
8
- all those hex numbers into decimal, and then print them back to the text file
9
-
10
- NO way I am going to do that by hand. simple, use python!
11
-
12
- we have to convert the EtherType file to this
11
+ output:
13
12
0x0800 2048 Internet Protocol version 4 (IPv4)
14
13
0x0806 2054 Address Resolution Protocol (ARP)
15
14
0x0842 2114 Wake-on-LAN[3]
15
+ ... any number of entries
16
+
17
+ input:
18
+ 0x0800 Internet Protocol version 4 (IPv4)
19
+ 0x0806 Address Resolution Protocol (ARP)
20
+ 0x0842 Wake-on-LAN[3]
21
+ ...any number of entries
16
22
23
+ 0x0800 = hexadecimal of 2048
17
24
'''
18
25
19
26
You can’t perform that action at this time.
0 commit comments