Browse Source

working map

System Administrator 6 years ago
parent
commit
4d783290ab

+ 36
- 0
.idea/inspectionProfiles/Project_Default.xml View File

@@ -0,0 +1,36 @@
1
+<component name="InspectionProjectProfileManager">
2
+  <profile version="1.0">
3
+    <option name="myName" value="Project Default" />
4
+    <inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
5
+      <option name="TOP_LEVEL_CLASS_OPTIONS">
6
+        <value>
7
+          <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
8
+          <option name="REQUIRED_TAGS" value="" />
9
+        </value>
10
+      </option>
11
+      <option name="INNER_CLASS_OPTIONS">
12
+        <value>
13
+          <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
14
+          <option name="REQUIRED_TAGS" value="" />
15
+        </value>
16
+      </option>
17
+      <option name="METHOD_OPTIONS">
18
+        <value>
19
+          <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
20
+          <option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
21
+        </value>
22
+      </option>
23
+      <option name="FIELD_OPTIONS">
24
+        <value>
25
+          <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
26
+          <option name="REQUIRED_TAGS" value="" />
27
+        </value>
28
+      </option>
29
+      <option name="IGNORE_DEPRECATED" value="false" />
30
+      <option name="IGNORE_JAVADOC_PERIOD" value="true" />
31
+      <option name="IGNORE_DUPLICATED_THROWS" value="false" />
32
+      <option name="IGNORE_POINT_TO_ITSELF" value="false" />
33
+      <option name="myAdditionalJavadocTags" value="param" />
34
+    </inspection_tool>
35
+  </profile>
36
+</component>

+ 222
- 97
.idea/workspace.xml View File

@@ -2,13 +2,25 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="a2cd3f2a-ecd9-43c0-a5b7-6ff3b5edd4e5" name="Default" comment="">
5
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__io_pkts_pkts_core_3_0_2.xml" afterDir="false" />
6
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__io_pkts_pkts_sdp_3_0_2.xml" afterDir="false" />
7
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__io_pkts_pkts_sip_3_0_2.xml" afterDir="false" />
8
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__javax_sip_jain_sip_ri_1_2_159.xml" afterDir="false" />
5
+      <change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/wyds/packets/yourPacket.java" afterDir="false" />
9 7
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/output.pcap" beforeDir="false" afterPath="$PROJECT_DIR$/output.pcap" afterDir="false" />
10 9
       <change beforePath="$PROJECT_DIR$/pcap.iml" beforeDir="false" afterPath="$PROJECT_DIR$/pcap.iml" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java" afterDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java" afterDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java" afterDir="false" />
11 13
       <change beforePath="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java" afterDir="false" />
14
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java" beforeDir="false" />
15
+      <change beforePath="$PROJECT_DIR$/target/classes/com/wyds/PacketRepo/packetRepository.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/wyds/PacketRepo/packetRepository.class" afterDir="false" />
16
+      <change beforePath="$PROJECT_DIR$/target/classes/com/wyds/PacketTracker.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/wyds/PacketTracker.class" afterDir="false" />
17
+      <change beforePath="$PROJECT_DIR$/target/classes/com/wyds/packets/Capture.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/wyds/packets/Capture.class" afterDir="false" />
18
+      <change beforePath="$PROJECT_DIR$/target/classes/com/wyds/packets/PacketParserEntity.class" beforeDir="false" />
19
+      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" afterDir="false" />
20
+      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" afterDir="false" />
21
+      <change beforePath="$PROJECT_DIR$/target/original-uber-pcap-1.0.0.jar" beforeDir="false" afterPath="$PROJECT_DIR$/target/original-uber-pcap-1.0.0.jar" afterDir="false" />
22
+      <change beforePath="$PROJECT_DIR$/target/pcap-1.0.0.jar" beforeDir="false" afterPath="$PROJECT_DIR$/target/pcap-1.0.0.jar" afterDir="false" />
23
+      <change beforePath="$PROJECT_DIR$/target/uber-pcap-1.0.0.jar" beforeDir="false" afterPath="$PROJECT_DIR$/target/uber-pcap-1.0.0.jar" afterDir="false" />
12 24
     </list>
13 25
     <ignored path="$PROJECT_DIR$/target/" />
14 26
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -37,7 +49,7 @@
37 49
       <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
38 50
         <entry file="file://$PROJECT_DIR$/pom.xml">
39 51
           <provider selected="true" editor-type-id="text-editor">
40
-            <state relative-caret-position="503">
52
+            <state relative-caret-position="930">
41 53
               <caret line="62" selection-start-line="62" selection-end-line="62" />
42 54
             </state>
43 55
           </provider>
@@ -46,8 +58,8 @@
46 58
       <file leaf-file-name="application.properties" pinned="false" current-in-tab="false">
47 59
         <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
48 60
           <provider selected="true" editor-type-id="text-editor">
49
-            <state relative-caret-position="405">
50
-              <caret line="27" column="33" selection-start-line="27" selection-start-column="33" selection-end-line="27" selection-end-column="33" />
61
+            <state relative-caret-position="195">
62
+              <caret line="13" column="33" selection-start-line="13" selection-start-column="33" selection-end-line="13" selection-end-column="33" />
51 63
             </state>
52 64
           </provider>
53 65
         </entry>
@@ -55,33 +67,36 @@
55 67
       <file leaf-file-name="PacketTracker.java" pinned="false" current-in-tab="false">
56 68
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
57 69
           <provider selected="true" editor-type-id="text-editor">
58
-            <state relative-caret-position="285">
59
-              <caret line="19" column="8" selection-start-line="19" selection-start-column="8" selection-end-line="19" selection-end-column="8" />
70
+            <state relative-caret-position="390">
71
+              <caret line="26" selection-start-line="26" selection-end-line="26" />
60 72
               <folding>
61 73
                 <element signature="imports" expanded="true" />
62
-                <element signature="e#761#762#0" expanded="true" />
63
-                <element signature="e#796#797#0" expanded="true" />
64 74
               </folding>
65 75
             </state>
66 76
           </provider>
67 77
         </entry>
68 78
       </file>
69
-      <file leaf-file-name="PacketParserEntity.java" pinned="false" current-in-tab="false">
70
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java">
79
+      <file leaf-file-name="yourPacket.java" pinned="false" current-in-tab="true">
80
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/yourPacket.java">
71 81
           <provider selected="true" editor-type-id="text-editor">
72
-            <state relative-caret-position="105">
73
-              <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
82
+            <state relative-caret-position="357">
83
+              <caret line="47" column="8" selection-start-line="47" selection-start-column="8" selection-end-line="47" selection-end-column="8" />
84
+              <folding>
85
+                <element signature="imports" expanded="true" />
86
+              </folding>
74 87
             </state>
75 88
           </provider>
76 89
         </entry>
77 90
       </file>
78
-      <file leaf-file-name="PacketParser.java" pinned="false" current-in-tab="true">
91
+      <file leaf-file-name="PacketParser.java" pinned="false" current-in-tab="false">
79 92
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java">
80 93
           <provider selected="true" editor-type-id="text-editor">
81
-            <state relative-caret-position="495">
82
-              <caret line="33" column="51" selection-start-line="33" selection-start-column="51" selection-end-line="33" selection-end-column="51" />
94
+            <state relative-caret-position="-153">
95
+              <caret line="25" lean-forward="true" selection-start-line="25" selection-end-line="25" />
83 96
               <folding>
84 97
                 <element signature="imports" expanded="true" />
98
+                <element signature="e#1768#1769#0" expanded="true" />
99
+                <element signature="e#1801#1802#0" expanded="true" />
85 100
               </folding>
86 101
             </state>
87 102
           </provider>
@@ -90,8 +105,8 @@
90 105
       <file leaf-file-name="Capture.java" pinned="false" current-in-tab="false">
91 106
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
92 107
           <provider selected="true" editor-type-id="text-editor">
93
-            <state relative-caret-position="373">
94
-              <caret line="42" column="31" selection-start-line="42" selection-start-column="31" selection-end-line="42" selection-end-column="31" />
108
+            <state relative-caret-position="-618">
109
+              <caret line="12" column="34" lean-forward="true" selection-start-line="12" selection-start-column="34" selection-end-line="12" selection-end-column="34" />
95 110
               <folding>
96 111
                 <element signature="imports" expanded="true" />
97 112
               </folding>
@@ -102,8 +117,8 @@
102 117
       <file leaf-file-name="packetRepository.java" pinned="false" current-in-tab="false">
103 118
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java">
104 119
           <provider selected="true" editor-type-id="text-editor">
105
-            <state relative-caret-position="105">
106
-              <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
120
+            <state relative-caret-position="135">
121
+              <caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="9" />
107 122
               <folding>
108 123
                 <element signature="imports" expanded="true" />
109 124
               </folding>
@@ -139,14 +154,15 @@
139 154
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/CoinMiner.java" />
140 155
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/SpringAppStarter.java" />
141 156
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketTracker.java" />
142
-        <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java" />
143 157
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java" />
144 158
         <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
145 159
         <option value="$PROJECT_DIR$/pom.xml" />
146 160
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java" />
147 161
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java" />
148
-        <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java" />
162
+        <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java" />
149 163
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java" />
164
+        <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java" />
165
+        <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/yourPacket.java" />
150 166
       </list>
151 167
     </option>
152 168
   </component>
@@ -165,14 +181,19 @@
165 181
   </component>
166 182
   <component name="MavenProjectNavigator">
167 183
     <treeState>
168
-      <expand />
184
+      <expand>
185
+        <path>
186
+          <item name="" type="16c1761:MavenProjectsStructure$RootNode" />
187
+          <item name="pcap" type="9519ce18:MavenProjectsStructure$ProjectNode" />
188
+        </path>
189
+      </expand>
169 190
       <select />
170 191
     </treeState>
171 192
   </component>
172 193
   <component name="NodePackageJsonFileManager">
173 194
     <packageJsonPaths />
174 195
   </component>
175
-  <component name="ProjectFrameBounds" fullScreen="true">
196
+  <component name="ProjectFrameBounds">
176 197
     <option name="x" value="51" />
177 198
     <option name="y" value="22" />
178 199
     <option name="width" value="1629" />
@@ -278,11 +299,14 @@
278 299
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
279 300
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
280 301
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
281
-    <property name="project.structure.last.edited" value="Modules" />
302
+    <property name="project.structure.last.edited" value="Project" />
282 303
     <property name="project.structure.proportion" value="0.15" />
283 304
     <property name="project.structure.side.proportion" value="0.2" />
284 305
   </component>
285 306
   <component name="RecentsManager">
307
+    <key name="CreateClassDialog.RecentsKey">
308
+      <recent name="com.wyds.packets" />
309
+    </key>
286 310
     <key name="CopyFile.RECENT_KEYS">
287 311
       <recent name="$PROJECT_DIR$/src/main" />
288 312
     </key>
@@ -311,6 +335,17 @@
311 335
         </pattern>
312 336
       </extension>
313 337
     </configuration>
338
+    <configuration name="PacketParser" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
339
+      <option name="MAIN_CLASS_NAME" value="com.wyds.packets.PacketParser" />
340
+      <module name="pcap" />
341
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
342
+      <extension name="coverage">
343
+        <pattern>
344
+          <option name="PATTERN" value="com.wyds.packets.*" />
345
+          <option name="ENABLED" value="true" />
346
+        </pattern>
347
+      </extension>
348
+    </configuration>
314 349
     <configuration name="PacketParserEntity" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
315 350
       <option name="MAIN_CLASS_NAME" value="com.wyds.packets.PacketParserEntity" />
316 351
       <module name="pcap" />
@@ -390,11 +425,13 @@
390 425
       <item itemvalue="Application.CoinMiner" />
391 426
       <item itemvalue="Application.SpringAppStarter" />
392 427
       <item itemvalue="Application.PacketParserEntity" />
428
+      <item itemvalue="Application.PacketParser" />
393 429
     </list>
394 430
     <recent_temporary>
395 431
       <list>
396
-        <item itemvalue="Application.PacketTracker" />
397 432
         <item itemvalue="Application.PacketParserEntity" />
433
+        <item itemvalue="Application.PacketTracker" />
434
+        <item itemvalue="Application.PacketParser" />
398 435
         <item itemvalue="Application.SpringAppStarter" />
399 436
         <item itemvalue="Application.CoinMiner" />
400 437
       </list>
@@ -412,19 +449,19 @@
412 449
       <updated>1531775306742</updated>
413 450
       <workItem from="1531775309911" duration="2309000" />
414 451
       <workItem from="1531779911018" duration="35716000" />
452
+      <workItem from="1532125318831" duration="29642000" />
415 453
     </task>
416 454
     <servers />
417 455
   </component>
418 456
   <component name="TimeTrackingManager">
419
-    <option name="totallyTimeSpent" value="38025000" />
457
+    <option name="totallyTimeSpent" value="67667000" />
420 458
   </component>
421 459
   <component name="ToolWindowManager">
422
-    <frame x="0" y="0" width="1680" height="1050" extended-state="0" />
423
-    <editor active="true" />
460
+    <frame x="51" y="22" width="1629" height="970" extended-state="0" />
424 461
     <layout>
425 462
       <window_info anchor="right" id="Palette" order="3" />
426 463
       <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
427
-      <window_info anchor="right" id="Maven Projects" order="3" visible="true" weight="0.32967034" />
464
+      <window_info anchor="right" id="Maven Projects" order="3" weight="0.34026465" />
428 465
       <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
429 466
       <window_info id="Capture Tool" order="2" />
430 467
       <window_info id="Designer" order="2" />
@@ -434,26 +471,26 @@
434 471
       <window_info id="UI Designer" order="2" />
435 472
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
436 473
       <window_info anchor="bottom" id="TODO" order="6" />
437
-      <window_info anchor="bottom" id="Messages" order="7" weight="0.32923076" />
474
+      <window_info anchor="bottom" id="Messages" order="7" weight="0.3676976" />
438 475
       <window_info anchor="right" id="Palette&#9;" order="3" />
439 476
       <window_info id="Image Layers" order="2" />
440
-      <window_info anchor="bottom" id="Java Enterprise" />
477
+      <window_info anchor="bottom" id="Java Enterprise" order="8" />
441 478
       <window_info anchor="right" id="Capture Analysis" order="3" />
442
-      <window_info anchor="bottom" id="Run" order="2" weight="0.32923076" />
443 479
       <window_info anchor="bottom" id="Version Control" order="7" />
444
-      <window_info anchor="bottom" id="Spring" weight="0.32923076" />
445
-      <window_info active="true" anchor="bottom" id="Terminal" order="7" visible="true" weight="0.29538462" />
446
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.16971917" />
447
-      <window_info anchor="right" id="Bean Validation" />
448
-      <window_info id="Web" side_tool="true" />
449
-      <window_info anchor="bottom" id="Find" order="1" weight="0.32935324" />
480
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32923076" />
481
+      <window_info anchor="bottom" id="Spring" order="8" weight="0.32923076" />
482
+      <window_info active="true" anchor="bottom" id="Terminal" order="7" visible="true" weight="0.36540663" />
483
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.17706364" />
484
+      <window_info anchor="right" id="Bean Validation" order="4" />
485
+      <window_info id="Web" order="3" side_tool="true" />
486
+      <window_info anchor="bottom" id="Find" order="1" weight="0.32875144" />
450 487
       <window_info anchor="right" id="Theme Preview" order="3" />
451 488
       <window_info id="Favorites" order="2" side_tool="true" />
452
-      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
453 489
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
454 490
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
455
-      <window_info anchor="bottom" id="Message" order="0" />
456 491
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
492
+      <window_info anchor="bottom" id="Message" order="0" />
493
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
457 494
     </layout>
458 495
   </component>
459 496
   <component name="TypeScriptGeneratedFilesManager">
@@ -463,6 +500,79 @@
463 500
     <option name="myLimit" value="2678400000" />
464 501
   </component>
465 502
   <component name="editorHistoryManager">
503
+    <entry file="file://$PROJECT_DIR$/pom.xml">
504
+      <provider selected="true" editor-type-id="text-editor">
505
+        <state relative-caret-position="930">
506
+          <caret line="62" selection-start-line="62" selection-end-line="62" />
507
+        </state>
508
+      </provider>
509
+    </entry>
510
+    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
511
+      <provider selected="true" editor-type-id="text-editor">
512
+        <state relative-caret-position="405">
513
+          <caret line="27" column="33" selection-start-line="27" selection-start-column="33" selection-end-line="27" selection-end-column="33" />
514
+        </state>
515
+      </provider>
516
+    </entry>
517
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
518
+      <provider selected="true" editor-type-id="text-editor">
519
+        <state relative-caret-position="285">
520
+          <caret line="19" column="8" selection-start-line="19" selection-start-column="8" selection-end-line="19" selection-end-column="8" />
521
+          <folding>
522
+            <element signature="imports" expanded="true" />
523
+          </folding>
524
+        </state>
525
+      </provider>
526
+    </entry>
527
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java">
528
+      <provider selected="true" editor-type-id="text-editor">
529
+        <state relative-caret-position="105">
530
+          <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
531
+          <folding>
532
+            <element signature="imports" expanded="true" />
533
+          </folding>
534
+        </state>
535
+      </provider>
536
+    </entry>
537
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
538
+      <provider selected="true" editor-type-id="text-editor">
539
+        <state relative-caret-position="585">
540
+          <caret line="42" column="31" selection-start-line="42" selection-start-column="31" selection-end-line="42" selection-end-column="31" />
541
+          <folding>
542
+            <element signature="imports" expanded="true" />
543
+          </folding>
544
+        </state>
545
+      </provider>
546
+    </entry>
547
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java">
548
+      <provider selected="true" editor-type-id="text-editor">
549
+        <state relative-caret-position="75">
550
+          <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
551
+          <folding>
552
+            <element signature="imports" expanded="true" />
553
+          </folding>
554
+        </state>
555
+      </provider>
556
+    </entry>
557
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java">
558
+      <provider selected="true" editor-type-id="text-editor">
559
+        <state relative-caret-position="120">
560
+          <caret line="8" selection-start-line="8" selection-end-line="8" />
561
+        </state>
562
+      </provider>
563
+    </entry>
564
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java">
565
+      <provider selected="true" editor-type-id="text-editor">
566
+        <state relative-caret-position="420">
567
+          <caret line="33" column="50" lean-forward="true" selection-start-line="33" selection-start-column="50" selection-end-line="33" selection-end-column="50" />
568
+          <folding>
569
+            <element signature="imports" expanded="true" />
570
+            <element signature="e#1768#1769#0" expanded="true" />
571
+            <element signature="e#1801#1802#0" expanded="true" />
572
+          </folding>
573
+        </state>
574
+      </provider>
575
+    </entry>
466 576
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
467 577
       <provider selected="true" editor-type-id="text-editor">
468 578
         <state relative-caret-position="345">
@@ -480,13 +590,6 @@
480 590
         </state>
481 591
       </provider>
482 592
     </entry>
483
-    <entry file="jar://$MAVEN_REPOSITORY$/org/pcap4j/pcap4j-core/1.7.3/pcap4j-core-1.7.3.jar!/org/pcap4j/packet/Packet.class">
484
-      <provider selected="true" editor-type-id="text-editor">
485
-        <state relative-caret-position="-1">
486
-          <caret line="9" column="17" selection-start-line="9" selection-start-column="17" selection-end-line="9" selection-end-column="17" />
487
-        </state>
488
-      </provider>
489
-    </entry>
490 593
     <entry file="file://$PROJECT_DIR$/.idea/uiDesigner.xml">
491 594
       <provider selected="true" editor-type-id="text-editor" />
492 595
     </entry>
@@ -497,34 +600,60 @@
497 600
         </state>
498 601
       </provider>
499 602
     </entry>
500
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/CoinMiner.java">
603
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/CoinMiner.java" />
604
+    <entry file="file://$PROJECT_DIR$/config.xml" />
605
+    <entry file="file://$PROJECT_DIR$/.gitignore" />
606
+    <entry file="file://$PROJECT_DIR$/src/main/java/resources.properties" />
607
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/SpringAppStarter.java" />
608
+    <entry file="file://$PROJECT_DIR$/pcap.txt">
609
+      <provider selected="true" editor-type-id="text-editor" />
610
+    </entry>
611
+    <entry file="file://$PROJECT_DIR$/output.pcap">
501 612
       <provider selected="true" editor-type-id="text-editor">
502
-        <state relative-caret-position="555">
503
-          <caret line="37" column="39" lean-forward="true" selection-start-line="37" selection-start-column="39" selection-end-line="37" selection-end-column="39" />
613
+        <state relative-caret-position="-33">
614
+          <caret column="21" selection-start-column="21" selection-end-column="21" />
504 615
         </state>
505 616
       </provider>
506 617
     </entry>
507
-    <entry file="file://$PROJECT_DIR$/config.xml">
508
-      <provider selected="true" editor-type-id="text-editor" />
509
-    </entry>
510
-    <entry file="file://$PROJECT_DIR$/.gitignore">
511
-      <provider selected="true" editor-type-id="text-editor" />
618
+    <entry file="file://$PROJECT_DIR$/pom.xml">
619
+      <provider selected="true" editor-type-id="text-editor">
620
+        <state relative-caret-position="930">
621
+          <caret line="62" selection-start-line="62" selection-end-line="62" />
622
+        </state>
623
+      </provider>
512 624
     </entry>
513
-    <entry file="file://$PROJECT_DIR$/src/main/java/resources.properties">
514
-      <provider selected="true" editor-type-id="text-editor" />
625
+    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
626
+      <provider selected="true" editor-type-id="text-editor">
627
+        <state relative-caret-position="195">
628
+          <caret line="13" column="33" selection-start-line="13" selection-start-column="33" selection-end-line="13" selection-end-column="33" />
629
+        </state>
630
+      </provider>
515 631
     </entry>
516
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/SpringAppStarter.java">
632
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/src.zip!/java/io/ByteArrayOutputStream.java">
517 633
       <provider selected="true" editor-type-id="text-editor">
518
-        <state relative-caret-position="150">
519
-          <caret line="10" column="60" lean-forward="true" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="60" />
634
+        <state relative-caret-position="545">
635
+          <caret line="60" column="11" selection-start-line="60" selection-start-column="11" selection-end-line="60" selection-end-column="11" />
520 636
           <folding>
521
-            <element signature="imports" expanded="true" />
522
-            <element signature="e#226#227#0" expanded="true" />
523
-            <element signature="e#293#294#0" expanded="true" />
637
+            <element signature="e#1176#1177#0" expanded="true" />
638
+            <element signature="e#1200#1201#0" expanded="true" />
524 639
           </folding>
525 640
         </state>
526 641
       </provider>
527 642
     </entry>
643
+    <entry file="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-core/3.0.2/pkts-core-3.0.2.jar!/io/pkts/Pcap.class">
644
+      <provider selected="true" editor-type-id="text-editor">
645
+        <state relative-caret-position="137">
646
+          <caret line="51" column="16" selection-start-line="51" selection-start-column="16" selection-end-line="51" selection-end-column="16" />
647
+        </state>
648
+      </provider>
649
+    </entry>
650
+    <entry file="jar://$MAVEN_REPOSITORY$/org/pcap4j/pcap4j-core/1.7.3/pcap4j-core-1.7.3.jar!/org/pcap4j/packet/Packet.class">
651
+      <provider selected="true" editor-type-id="text-editor">
652
+        <state relative-caret-position="90">
653
+          <caret line="9" column="17" selection-start-line="9" selection-start-column="17" selection-end-line="9" selection-end-column="17" />
654
+        </state>
655
+      </provider>
656
+    </entry>
528 657
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java">
529 658
       <provider selected="true" editor-type-id="text-editor">
530 659
         <state relative-caret-position="120">
@@ -532,73 +661,69 @@
532 661
         </state>
533 662
       </provider>
534 663
     </entry>
535
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java">
664
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java">
536 665
       <provider selected="true" editor-type-id="text-editor">
537
-        <state relative-caret-position="105">
538
-          <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
666
+        <state relative-caret-position="120">
667
+          <caret line="8" column="12" selection-start-line="8" selection-end-line="9" />
539 668
           <folding>
540 669
             <element signature="imports" expanded="true" />
541 670
           </folding>
542 671
         </state>
543 672
       </provider>
544 673
     </entry>
545
-    <entry file="file://$PROJECT_DIR$/pcap.txt">
546
-      <provider selected="true" editor-type-id="text-editor" />
547
-    </entry>
548
-    <entry file="file://$PROJECT_DIR$/output.pcap">
674
+    <entry file="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-core/3.0.2/pkts-core-3.0.2.jar!/io/pkts/PacketHandler.class">
549 675
       <provider selected="true" editor-type-id="text-editor">
550
-        <state relative-caret-position="-33">
551
-          <caret column="21" selection-start-column="21" selection-end-column="21" />
676
+        <state relative-caret-position="105">
677
+          <caret line="11" column="12" selection-start-line="11" selection-start-column="12" selection-end-line="11" selection-end-column="12" />
552 678
         </state>
553 679
       </provider>
554 680
     </entry>
555
-    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
681
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java">
556 682
       <provider selected="true" editor-type-id="text-editor">
557
-        <state relative-caret-position="405">
558
-          <caret line="27" column="33" selection-start-line="27" selection-start-column="33" selection-end-line="27" selection-end-column="33" />
683
+        <state relative-caret-position="135">
684
+          <caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="9" />
685
+          <folding>
686
+            <element signature="imports" expanded="true" />
687
+          </folding>
559 688
         </state>
560 689
       </provider>
561 690
     </entry>
562
-    <entry file="file://$PROJECT_DIR$/pom.xml">
691
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java">
563 692
       <provider selected="true" editor-type-id="text-editor">
564
-        <state relative-caret-position="503">
565
-          <caret line="62" selection-start-line="62" selection-end-line="62" />
693
+        <state relative-caret-position="-153">
694
+          <caret line="25" lean-forward="true" selection-start-line="25" selection-end-line="25" />
695
+          <folding>
696
+            <element signature="imports" expanded="true" />
697
+            <element signature="e#1768#1769#0" expanded="true" />
698
+            <element signature="e#1801#1802#0" expanded="true" />
699
+          </folding>
566 700
         </state>
567 701
       </provider>
568 702
     </entry>
569 703
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
570 704
       <provider selected="true" editor-type-id="text-editor">
571
-        <state relative-caret-position="285">
572
-          <caret line="19" column="8" selection-start-line="19" selection-start-column="8" selection-end-line="19" selection-end-column="8" />
705
+        <state relative-caret-position="390">
706
+          <caret line="26" selection-start-line="26" selection-end-line="26" />
573 707
           <folding>
574 708
             <element signature="imports" expanded="true" />
575
-            <element signature="e#761#762#0" expanded="true" />
576
-            <element signature="e#796#797#0" expanded="true" />
577 709
           </folding>
578 710
         </state>
579 711
       </provider>
580 712
     </entry>
581 713
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
582 714
       <provider selected="true" editor-type-id="text-editor">
583
-        <state relative-caret-position="373">
584
-          <caret line="42" column="31" selection-start-line="42" selection-start-column="31" selection-end-line="42" selection-end-column="31" />
715
+        <state relative-caret-position="-618">
716
+          <caret line="12" column="34" lean-forward="true" selection-start-line="12" selection-start-column="34" selection-end-line="12" selection-end-column="34" />
585 717
           <folding>
586 718
             <element signature="imports" expanded="true" />
587 719
           </folding>
588 720
         </state>
589 721
       </provider>
590 722
     </entry>
591
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java">
592
-      <provider selected="true" editor-type-id="text-editor">
593
-        <state relative-caret-position="105">
594
-          <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
595
-        </state>
596
-      </provider>
597
-    </entry>
598
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java">
723
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/yourPacket.java">
599 724
       <provider selected="true" editor-type-id="text-editor">
600
-        <state relative-caret-position="495">
601
-          <caret line="33" column="51" selection-start-line="33" selection-start-column="51" selection-end-line="33" selection-end-column="51" />
725
+        <state relative-caret-position="357">
726
+          <caret line="47" column="8" selection-start-line="47" selection-start-column="8" selection-end-line="47" selection-end-column="8" />
602 727
           <folding>
603 728
             <element signature="imports" expanded="true" />
604 729
           </folding>

BIN
output.pcap View File


+ 1
- 0
pcap.iml View File

@@ -14,6 +14,7 @@
14 14
       <configuration>
15 15
         <fileset id="fileset" name="PacketTracker" removed="false">
16 16
           <file>file://$MODULE_DIR$/src/main/java/com/wyds/packets/PacketTracker.java</file>
17
+          <file>file://$MODULE_DIR$/src/main/java/com/wyds/PacketTracker.java</file>
17 18
         </fileset>
18 19
       </configuration>
19 20
     </facet>

+ 2
- 2
src/main/java/com/wyds/PacketRepo/packetRepository.java View File

@@ -1,9 +1,9 @@
1 1
 package com.wyds.PacketRepo;
2 2
 
3
-import org.pcap4j.packet.Packet;
4 3
 import org.springframework.data.jpa.repository.JpaRepository;
5 4
 import org.springframework.stereotype.Repository;
6 5
 
7 6
 @Repository
8
-public interface packetRepository extends JpaRepository<Packet, Long> {
7
+public interface packetRepository extends JpaRepository<String, Long> {
8
+    // String save(String p);
9 9
 }

+ 18
- 13
src/main/java/com/wyds/PacketTracker.java View File

@@ -1,33 +1,38 @@
1 1
 package com.wyds;
2 2
 
3
+import com.wyds.PacketRepo.packetRepository;
3 4
 import com.wyds.packets.Capture;
5
+import com.wyds.packets.PacketParser;
6
+import com.wyds.packets.yourPacket;
4 7
 import org.pcap4j.core.*;
5
-import org.pcap4j.util.NifSelector;
6
-import org.pcap4j.core.PcapNetworkInterface.PromiscuousMode;
7
-import java.io.IOException;
8 8
 
9
+import java.io.IOException;
9 10
 
10
-import org.pcap4j.core.BpfProgram.BpfCompileMode;
11
-import org.springframework.boot.SpringApplication;
11
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
12 12
 import org.springframework.boot.autoconfigure.SpringBootApplication;
13
-import org.springframework.web.bind.annotation.RequestMapping;
14
-
15 13
 
14
+@EnableAutoConfiguration
16 15
 @SpringBootApplication
17 16
 public class PacketTracker {
18
-    public static void main(String[] args) throws PcapNativeException, NotOpenException {
17
+    public static void main(String[] args) throws PcapNativeException, NotOpenException, IOException {
19 18
 
20
-        SpringApplication.run(PacketTracker.class, args);
19
+       // SpringApplication.run(PacketTracker.class, args);
21 20
         Capture c = new Capture();
21
+        PacketParser parser = new PacketParser();
22
+        yourPacket packet = new yourPacket();
23
+
24
+        //runners
22 25
         c.capturePack();
26
+        parser.parseUDP();
27
+        packet.packet();
23 28
 
24 29
 
25 30
 
26
-    }
31
+       //<------------------------------------------------------>
32
+        //mvn package
33
+        //sudo java -jar target/uber-pcap-1.0.0.jar
34
+        //mvn spring-boot:run
27 35
 
28
-    @RequestMapping(value="/")
29
-    public String register(){
30
-        return "login here";
31 36
     }
32 37
 
33 38
 

+ 11
- 13
src/main/java/com/wyds/packets/Capture.java View File

@@ -7,6 +7,7 @@ import java.io.IOException;
7 7
 
8 8
 public class Capture {
9 9
 
10
+
10 11
     public void capturePack() throws PcapNativeException, NotOpenException {
11 12
 
12 13
         int snapShotLength = 65536;
@@ -22,37 +23,34 @@ public class Capture {
22 23
 
23 24
         PcapDumper dumper = handle.dumpOpen("output.pcap");
24 25
 
25
-        //anonymous class
26
+        /**
27
+           @param anonymous class
28
+         */
26 29
         PacketListener listener = packet -> {
27 30
 
28
-            System.out.println(handle.getTimestamp());
29
-            System.out.println(packet);
30
-            //System.out.println(packet.toString());
31
-
32
-
33
-
34 31
             try {
35 32
                 dumper.dump(packet, handle.getTimestamp());
36 33
             } catch (NotOpenException e) {
37
-                e.printStackTrace();
34
+               e.printStackTrace();
38 35
             }
39 36
 
40 37
 
41 38
         };
39
+
40
+        /**
41
+         * @param maxPackets, change this to desired amount. maybe a while loop?
42
+         */
42 43
         try {
43
-            int maxPackets = 10;
44
+            int maxPackets = 20;
44 45
             handle.loop(maxPackets, listener);
45 46
         } catch (InterruptedException e) {
46
-            e.printStackTrace();
47
+           e.printStackTrace();
47 48
         }
48 49
 
49 50
 
50 51
         PcapStat stats = handle.getStats();
51 52
 
52 53
         System.out.println("Packets received: " + stats.getNumPacketsReceived());
53
-        System.out.println("Packets dropped: " + stats.getNumPacketsDropped());
54
-        System.out.println("Packets captured: "+ stats.getNumPacketsCaptured());
55
-
56 54
 
57 55
         dumper.close();
58 56
         handle.close();

+ 34
- 19
src/main/java/com/wyds/packets/PacketParser.java View File

@@ -2,47 +2,62 @@ package com.wyds.packets;
2 2
 
3 3
 import io.pkts.PacketHandler;
4 4
 import io.pkts.Pcap;
5
+import io.pkts.PcapOutputStream;
6
+import io.pkts.buffer.Buffer;
5 7
 import io.pkts.packet.Packet;
8
+import io.pkts.packet.TCPPacket;
9
+import io.pkts.packet.UDPPacket;
6 10
 import io.pkts.protocol.Protocol;
7 11
 
12
+import javax.persistence.*;
13
+import java.io.ByteArrayOutputStream;
8 14
 import java.io.IOException;
15
+import java.util.ArrayList;
16
+import java.util.HashMap;
17
+import java.util.List;
18
+import java.util.Map;
19
+
9 20
 
10 21
 public class PacketParser {
11 22
 
12
-    public static void main(String[] args) throws IOException {
13 23
 
14
-        final Pcap pcap = Pcap.openStream("output.pcap");
15 24
 
16
-        pcap.loop(new PacketHandler() {
17
-            @Override
18
-            public boolean nextPacket(Packet packet) throws IOException {
19
-                if(packet.hasProtocol(Protocol.ARP)){
20 25
 
21
-                }
22
-                if(packet.hasProtocol(Protocol.TCP)){
23 26
 
24
-                }
25
-                if(packet.hasProtocol(Protocol.UDP)){
27
+    /**
28
+     * @param arrayList for storing udp packet buffers
29
+     */
30
+     private List<String> packetList;
26 31
 
27
-                }
28
-                if(packet.hasProtocol(Protocol.TLS)){
32
+    public List<String> parseUDP() throws IOException {
29 33
 
30
-                }
31
-                if(packet.hasProtocol(Protocol.IPv4)){
34
+        final Pcap pcap = Pcap.openStream("output.pcap");
35
+        packetList = new ArrayList<>();
32 36
 
33
-                }
34
-                if(packet.hasProtocol(Protocol.)){
35 37
 
36
-                }
38
+        pcap.loop(packet -> {
37 39
 
38 40
 
41
+            if (packet.hasProtocol(Protocol.UDP)) {
39 42
 
40
-                return false;
43
+                UDPPacket udpPacket = (UDPPacket) packet.getPacket(Protocol.UDP);
44
+                Buffer buffer = udpPacket.getPayload();
45
+                if (buffer != null) {
46
+                    packetList.add(buffer.toString());
47
+                }
41 48
             }
49
+
50
+            return true;
42 51
         });
43 52
 
53
+        return packetList;
44 54
     }
45 55
 
46
-
56
+    /**
57
+     * @return packet list of decrypted UDP packets
58
+     */
59
+    public List<String> getPacketList() {
60
+        return packetList;
61
+    }
47 62
 
48 63
 }

+ 0
- 11
src/main/java/com/wyds/packets/PacketParserEntity.java View File

@@ -1,11 +0,0 @@
1
-package com.wyds.packets;
2
-
3
-
4
-import javax.persistence.Entity;
5
-
6
-@Entity
7
-public class PacketParserEntity {
8
-
9
-
10
-
11
-}

+ 58
- 0
src/main/java/com/wyds/packets/yourPacket.java View File

@@ -0,0 +1,58 @@
1
+package com.wyds.packets;
2
+
3
+
4
+import com.wyds.PacketRepo.packetRepository;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+
7
+import javax.persistence.*;
8
+import java.io.IOException;
9
+import java.util.HashMap;
10
+import java.util.Map;
11
+
12
+@Entity
13
+@Table(name = "pcap")
14
+public class yourPacket {
15
+
16
+    PacketParser parser = new PacketParser();
17
+    Map<Integer,String> packetMap = new HashMap<>();
18
+
19
+    @Autowired
20
+    packetRepository packetRepository;
21
+
22
+    @Id
23
+    @GeneratedValue(strategy = GenerationType.AUTO)
24
+    @Column(name = "id")
25
+    private Long id;
26
+
27
+    @Column(name = "packet")
28
+    String packet;
29
+
30
+    @Column(name = "packetID")
31
+    private Integer packetID;
32
+
33
+    public yourPacket(Long id, Integer packetID, String packet) {
34
+        this.id = id;
35
+        this.packetID= packetID;
36
+        this.packet = packet;
37
+    }
38
+
39
+    public yourPacket() { }
40
+
41
+
42
+    public Map<Integer, String> packet() throws IOException {
43
+        parser.parseUDP();
44
+
45
+        for (int i = 0; i < parser.getPacketList().size(); i++) {
46
+            /*for (String p : parser.getPacketList()) {
47
+                packetMap.put(i, p);
48
+                System.out.println(p);
49
+                //packetRepository.save(p);
50
+            }*/
51
+            packetMap.put(i,parser.getPacketList().get(i));
52
+
53
+        }
54
+        System.out.println(packetMap);
55
+        return packetMap;
56
+    }
57
+
58
+}

BIN
target/classes/com/wyds/PacketRepo/packetRepository.class View File


BIN
target/classes/com/wyds/PacketTracker.class View File


BIN
target/classes/com/wyds/packets/Capture.class View File


BIN
target/classes/com/wyds/packets/PacketParser.class View File


BIN
target/classes/com/wyds/packets/PacketParserEntity.class View File


BIN
target/classes/com/wyds/packets/yourPacket.class View File


+ 3
- 2
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst View File

@@ -1,4 +1,5 @@
1
-com/wyds/PacketRepo/packetRepository.class
2
-com/wyds/packets/PacketParserEntity.class
3 1
 com/wyds/packets/Capture.class
4 2
 com/wyds/PacketTracker.class
3
+com/wyds/packets/PacketParser.class
4
+com/wyds/packets/yourPacket.class
5
+com/wyds/PacketRepo/packetRepository.class

+ 1
- 0
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst View File

@@ -1,4 +1,5 @@
1 1
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/packets/Capture.java
2
+/Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/packets/yourPacket.java
2 3
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/PacketRepo/packetRepository.java
3 4
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/PacketController/PacketController.java
4 5
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/packets/PacketParser.java

BIN
target/original-uber-pcap-1.0.0.jar View File


BIN
target/pcap-1.0.0.jar View File


BIN
target/uber-pcap-1.0.0.jar View File