System Administrator vor 6 Jahren
Ursprung
Commit
605d59b36d

+ 36
- 0
.idea/inspectionProfiles/Project_Default.xml Datei anzeigen

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 Datei anzeigen

2
 <project version="4">
2
 <project version="4">
3
   <component name="ChangeListManager">
3
   <component name="ChangeListManager">
4
     <list default="true" id="a2cd3f2a-ecd9-43c0-a5b7-6ff3b5edd4e5" name="Default" comment="">
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
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
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
       <change beforePath="$PROJECT_DIR$/pcap.iml" beforeDir="false" afterPath="$PROJECT_DIR$/pcap.iml" afterDir="false" />
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
       <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" />
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
     </list>
24
     </list>
13
     <ignored path="$PROJECT_DIR$/target/" />
25
     <ignored path="$PROJECT_DIR$/target/" />
14
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
26
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
37
       <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
49
       <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
38
         <entry file="file://$PROJECT_DIR$/pom.xml">
50
         <entry file="file://$PROJECT_DIR$/pom.xml">
39
           <provider selected="true" editor-type-id="text-editor">
51
           <provider selected="true" editor-type-id="text-editor">
40
-            <state relative-caret-position="503">
52
+            <state relative-caret-position="930">
41
               <caret line="62" selection-start-line="62" selection-end-line="62" />
53
               <caret line="62" selection-start-line="62" selection-end-line="62" />
42
             </state>
54
             </state>
43
           </provider>
55
           </provider>
46
       <file leaf-file-name="application.properties" pinned="false" current-in-tab="false">
58
       <file leaf-file-name="application.properties" pinned="false" current-in-tab="false">
47
         <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
59
         <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
48
           <provider selected="true" editor-type-id="text-editor">
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
             </state>
63
             </state>
52
           </provider>
64
           </provider>
53
         </entry>
65
         </entry>
55
       <file leaf-file-name="PacketTracker.java" pinned="false" current-in-tab="false">
67
       <file leaf-file-name="PacketTracker.java" pinned="false" current-in-tab="false">
56
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
68
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
57
           <provider selected="true" editor-type-id="text-editor">
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
               <folding>
72
               <folding>
61
                 <element signature="imports" expanded="true" />
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
               </folding>
74
               </folding>
65
             </state>
75
             </state>
66
           </provider>
76
           </provider>
67
         </entry>
77
         </entry>
68
       </file>
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
           <provider selected="true" editor-type-id="text-editor">
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
             </state>
87
             </state>
75
           </provider>
88
           </provider>
76
         </entry>
89
         </entry>
77
       </file>
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
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java">
92
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java">
80
           <provider selected="true" editor-type-id="text-editor">
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
               <folding>
96
               <folding>
84
                 <element signature="imports" expanded="true" />
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
               </folding>
100
               </folding>
86
             </state>
101
             </state>
87
           </provider>
102
           </provider>
90
       <file leaf-file-name="Capture.java" pinned="false" current-in-tab="false">
105
       <file leaf-file-name="Capture.java" pinned="false" current-in-tab="false">
91
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
106
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
92
           <provider selected="true" editor-type-id="text-editor">
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
               <folding>
110
               <folding>
96
                 <element signature="imports" expanded="true" />
111
                 <element signature="imports" expanded="true" />
97
               </folding>
112
               </folding>
102
       <file leaf-file-name="packetRepository.java" pinned="false" current-in-tab="false">
117
       <file leaf-file-name="packetRepository.java" pinned="false" current-in-tab="false">
103
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java">
118
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java">
104
           <provider selected="true" editor-type-id="text-editor">
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
               <folding>
122
               <folding>
108
                 <element signature="imports" expanded="true" />
123
                 <element signature="imports" expanded="true" />
109
               </folding>
124
               </folding>
139
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/CoinMiner.java" />
154
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/CoinMiner.java" />
140
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/SpringAppStarter.java" />
155
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/SpringAppStarter.java" />
141
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketTracker.java" />
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
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java" />
157
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java" />
144
         <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
158
         <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
145
         <option value="$PROJECT_DIR$/pom.xml" />
159
         <option value="$PROJECT_DIR$/pom.xml" />
146
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java" />
160
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java" />
147
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java" />
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
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java" />
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
       </list>
166
       </list>
151
     </option>
167
     </option>
152
   </component>
168
   </component>
165
   </component>
181
   </component>
166
   <component name="MavenProjectNavigator">
182
   <component name="MavenProjectNavigator">
167
     <treeState>
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
       <select />
190
       <select />
170
     </treeState>
191
     </treeState>
171
   </component>
192
   </component>
172
   <component name="NodePackageJsonFileManager">
193
   <component name="NodePackageJsonFileManager">
173
     <packageJsonPaths />
194
     <packageJsonPaths />
174
   </component>
195
   </component>
175
-  <component name="ProjectFrameBounds" fullScreen="true">
196
+  <component name="ProjectFrameBounds">
176
     <option name="x" value="51" />
197
     <option name="x" value="51" />
177
     <option name="y" value="22" />
198
     <option name="y" value="22" />
178
     <option name="width" value="1629" />
199
     <option name="width" value="1629" />
278
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
299
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
279
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
300
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
280
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
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
     <property name="project.structure.proportion" value="0.15" />
303
     <property name="project.structure.proportion" value="0.15" />
283
     <property name="project.structure.side.proportion" value="0.2" />
304
     <property name="project.structure.side.proportion" value="0.2" />
284
   </component>
305
   </component>
285
   <component name="RecentsManager">
306
   <component name="RecentsManager">
307
+    <key name="CreateClassDialog.RecentsKey">
308
+      <recent name="com.wyds.packets" />
309
+    </key>
286
     <key name="CopyFile.RECENT_KEYS">
310
     <key name="CopyFile.RECENT_KEYS">
287
       <recent name="$PROJECT_DIR$/src/main" />
311
       <recent name="$PROJECT_DIR$/src/main" />
288
     </key>
312
     </key>
311
         </pattern>
335
         </pattern>
312
       </extension>
336
       </extension>
313
     </configuration>
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
     <configuration name="PacketParserEntity" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
349
     <configuration name="PacketParserEntity" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
315
       <option name="MAIN_CLASS_NAME" value="com.wyds.packets.PacketParserEntity" />
350
       <option name="MAIN_CLASS_NAME" value="com.wyds.packets.PacketParserEntity" />
316
       <module name="pcap" />
351
       <module name="pcap" />
390
       <item itemvalue="Application.CoinMiner" />
425
       <item itemvalue="Application.CoinMiner" />
391
       <item itemvalue="Application.SpringAppStarter" />
426
       <item itemvalue="Application.SpringAppStarter" />
392
       <item itemvalue="Application.PacketParserEntity" />
427
       <item itemvalue="Application.PacketParserEntity" />
428
+      <item itemvalue="Application.PacketParser" />
393
     </list>
429
     </list>
394
     <recent_temporary>
430
     <recent_temporary>
395
       <list>
431
       <list>
396
-        <item itemvalue="Application.PacketTracker" />
397
         <item itemvalue="Application.PacketParserEntity" />
432
         <item itemvalue="Application.PacketParserEntity" />
433
+        <item itemvalue="Application.PacketTracker" />
434
+        <item itemvalue="Application.PacketParser" />
398
         <item itemvalue="Application.SpringAppStarter" />
435
         <item itemvalue="Application.SpringAppStarter" />
399
         <item itemvalue="Application.CoinMiner" />
436
         <item itemvalue="Application.CoinMiner" />
400
       </list>
437
       </list>
412
       <updated>1531775306742</updated>
449
       <updated>1531775306742</updated>
413
       <workItem from="1531775309911" duration="2309000" />
450
       <workItem from="1531775309911" duration="2309000" />
414
       <workItem from="1531779911018" duration="35716000" />
451
       <workItem from="1531779911018" duration="35716000" />
452
+      <workItem from="1532125318831" duration="29642000" />
415
     </task>
453
     </task>
416
     <servers />
454
     <servers />
417
   </component>
455
   </component>
418
   <component name="TimeTrackingManager">
456
   <component name="TimeTrackingManager">
419
-    <option name="totallyTimeSpent" value="38025000" />
457
+    <option name="totallyTimeSpent" value="67667000" />
420
   </component>
458
   </component>
421
   <component name="ToolWindowManager">
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
     <layout>
461
     <layout>
425
       <window_info anchor="right" id="Palette" order="3" />
462
       <window_info anchor="right" id="Palette" order="3" />
426
       <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
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
       <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
465
       <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
429
       <window_info id="Capture Tool" order="2" />
466
       <window_info id="Capture Tool" order="2" />
430
       <window_info id="Designer" order="2" />
467
       <window_info id="Designer" order="2" />
434
       <window_info id="UI Designer" order="2" />
471
       <window_info id="UI Designer" order="2" />
435
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
472
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
436
       <window_info anchor="bottom" id="TODO" order="6" />
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
       <window_info anchor="right" id="Palette&#9;" order="3" />
475
       <window_info anchor="right" id="Palette&#9;" order="3" />
439
       <window_info id="Image Layers" order="2" />
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
       <window_info anchor="right" id="Capture Analysis" order="3" />
478
       <window_info anchor="right" id="Capture Analysis" order="3" />
442
-      <window_info anchor="bottom" id="Run" order="2" weight="0.32923076" />
443
       <window_info anchor="bottom" id="Version Control" order="7" />
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
       <window_info anchor="right" id="Theme Preview" order="3" />
487
       <window_info anchor="right" id="Theme Preview" order="3" />
451
       <window_info id="Favorites" order="2" side_tool="true" />
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
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
489
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
454
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
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
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
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
     </layout>
494
     </layout>
458
   </component>
495
   </component>
459
   <component name="TypeScriptGeneratedFilesManager">
496
   <component name="TypeScriptGeneratedFilesManager">
463
     <option name="myLimit" value="2678400000" />
500
     <option name="myLimit" value="2678400000" />
464
   </component>
501
   </component>
465
   <component name="editorHistoryManager">
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
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
576
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
467
       <provider selected="true" editor-type-id="text-editor">
577
       <provider selected="true" editor-type-id="text-editor">
468
         <state relative-caret-position="345">
578
         <state relative-caret-position="345">
480
         </state>
590
         </state>
481
       </provider>
591
       </provider>
482
     </entry>
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
     <entry file="file://$PROJECT_DIR$/.idea/uiDesigner.xml">
593
     <entry file="file://$PROJECT_DIR$/.idea/uiDesigner.xml">
491
       <provider selected="true" editor-type-id="text-editor" />
594
       <provider selected="true" editor-type-id="text-editor" />
492
     </entry>
595
     </entry>
497
         </state>
600
         </state>
498
       </provider>
601
       </provider>
499
     </entry>
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
       <provider selected="true" editor-type-id="text-editor">
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
         </state>
615
         </state>
505
       </provider>
616
       </provider>
506
     </entry>
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
     </entry>
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
     </entry>
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
       <provider selected="true" editor-type-id="text-editor">
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
           <folding>
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
           </folding>
639
           </folding>
525
         </state>
640
         </state>
526
       </provider>
641
       </provider>
527
     </entry>
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
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java">
657
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java">
529
       <provider selected="true" editor-type-id="text-editor">
658
       <provider selected="true" editor-type-id="text-editor">
530
         <state relative-caret-position="120">
659
         <state relative-caret-position="120">
532
         </state>
661
         </state>
533
       </provider>
662
       </provider>
534
     </entry>
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
       <provider selected="true" editor-type-id="text-editor">
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
           <folding>
668
           <folding>
540
             <element signature="imports" expanded="true" />
669
             <element signature="imports" expanded="true" />
541
           </folding>
670
           </folding>
542
         </state>
671
         </state>
543
       </provider>
672
       </provider>
544
     </entry>
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
       <provider selected="true" editor-type-id="text-editor">
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
         </state>
678
         </state>
553
       </provider>
679
       </provider>
554
     </entry>
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
       <provider selected="true" editor-type-id="text-editor">
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
         </state>
688
         </state>
560
       </provider>
689
       </provider>
561
     </entry>
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
       <provider selected="true" editor-type-id="text-editor">
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
         </state>
700
         </state>
567
       </provider>
701
       </provider>
568
     </entry>
702
     </entry>
569
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
703
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
570
       <provider selected="true" editor-type-id="text-editor">
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
           <folding>
707
           <folding>
574
             <element signature="imports" expanded="true" />
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
           </folding>
709
           </folding>
578
         </state>
710
         </state>
579
       </provider>
711
       </provider>
580
     </entry>
712
     </entry>
581
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
713
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
582
       <provider selected="true" editor-type-id="text-editor">
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
           <folding>
717
           <folding>
586
             <element signature="imports" expanded="true" />
718
             <element signature="imports" expanded="true" />
587
           </folding>
719
           </folding>
588
         </state>
720
         </state>
589
       </provider>
721
       </provider>
590
     </entry>
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
       <provider selected="true" editor-type-id="text-editor">
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
           <folding>
727
           <folding>
603
             <element signature="imports" expanded="true" />
728
             <element signature="imports" expanded="true" />
604
           </folding>
729
           </folding>

BIN
output.pcap Datei anzeigen


+ 1
- 0
pcap.iml Datei anzeigen

14
       <configuration>
14
       <configuration>
15
         <fileset id="fileset" name="PacketTracker" removed="false">
15
         <fileset id="fileset" name="PacketTracker" removed="false">
16
           <file>file://$MODULE_DIR$/src/main/java/com/wyds/packets/PacketTracker.java</file>
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
         </fileset>
18
         </fileset>
18
       </configuration>
19
       </configuration>
19
     </facet>
20
     </facet>

+ 2
- 2
src/main/java/com/wyds/PacketRepo/packetRepository.java Datei anzeigen

1
 package com.wyds.PacketRepo;
1
 package com.wyds.PacketRepo;
2
 
2
 
3
-import org.pcap4j.packet.Packet;
4
 import org.springframework.data.jpa.repository.JpaRepository;
3
 import org.springframework.data.jpa.repository.JpaRepository;
5
 import org.springframework.stereotype.Repository;
4
 import org.springframework.stereotype.Repository;
6
 
5
 
7
 @Repository
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 Datei anzeigen

1
 package com.wyds;
1
 package com.wyds;
2
 
2
 
3
+import com.wyds.PacketRepo.packetRepository;
3
 import com.wyds.packets.Capture;
4
 import com.wyds.packets.Capture;
5
+import com.wyds.packets.PacketParser;
6
+import com.wyds.packets.yourPacket;
4
 import org.pcap4j.core.*;
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
 import org.springframework.boot.autoconfigure.SpringBootApplication;
12
 import org.springframework.boot.autoconfigure.SpringBootApplication;
13
-import org.springframework.web.bind.annotation.RequestMapping;
14
-
15
 
13
 
14
+@EnableAutoConfiguration
16
 @SpringBootApplication
15
 @SpringBootApplication
17
 public class PacketTracker {
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
         Capture c = new Capture();
20
         Capture c = new Capture();
21
+        PacketParser parser = new PacketParser();
22
+        yourPacket packet = new yourPacket();
23
+
24
+        //runners
22
         c.capturePack();
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 Datei anzeigen

7
 
7
 
8
 public class Capture {
8
 public class Capture {
9
 
9
 
10
+
10
     public void capturePack() throws PcapNativeException, NotOpenException {
11
     public void capturePack() throws PcapNativeException, NotOpenException {
11
 
12
 
12
         int snapShotLength = 65536;
13
         int snapShotLength = 65536;
22
 
23
 
23
         PcapDumper dumper = handle.dumpOpen("output.pcap");
24
         PcapDumper dumper = handle.dumpOpen("output.pcap");
24
 
25
 
25
-        //anonymous class
26
+        /**
27
+           @param anonymous class
28
+         */
26
         PacketListener listener = packet -> {
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
             try {
31
             try {
35
                 dumper.dump(packet, handle.getTimestamp());
32
                 dumper.dump(packet, handle.getTimestamp());
36
             } catch (NotOpenException e) {
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
         try {
43
         try {
43
-            int maxPackets = 10;
44
+            int maxPackets = 20;
44
             handle.loop(maxPackets, listener);
45
             handle.loop(maxPackets, listener);
45
         } catch (InterruptedException e) {
46
         } catch (InterruptedException e) {
46
-            e.printStackTrace();
47
+           e.printStackTrace();
47
         }
48
         }
48
 
49
 
49
 
50
 
50
         PcapStat stats = handle.getStats();
51
         PcapStat stats = handle.getStats();
51
 
52
 
52
         System.out.println("Packets received: " + stats.getNumPacketsReceived());
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
         dumper.close();
55
         dumper.close();
58
         handle.close();
56
         handle.close();

+ 34
- 19
src/main/java/com/wyds/packets/PacketParser.java Datei anzeigen

2
 
2
 
3
 import io.pkts.PacketHandler;
3
 import io.pkts.PacketHandler;
4
 import io.pkts.Pcap;
4
 import io.pkts.Pcap;
5
+import io.pkts.PcapOutputStream;
6
+import io.pkts.buffer.Buffer;
5
 import io.pkts.packet.Packet;
7
 import io.pkts.packet.Packet;
8
+import io.pkts.packet.TCPPacket;
9
+import io.pkts.packet.UDPPacket;
6
 import io.pkts.protocol.Protocol;
10
 import io.pkts.protocol.Protocol;
7
 
11
 
12
+import javax.persistence.*;
13
+import java.io.ByteArrayOutputStream;
8
 import java.io.IOException;
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
 public class PacketParser {
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 Datei anzeigen

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 Datei anzeigen

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 Datei anzeigen


BIN
target/classes/com/wyds/PacketTracker.class Datei anzeigen


BIN
target/classes/com/wyds/packets/Capture.class Datei anzeigen


BIN
target/classes/com/wyds/packets/PacketParser.class Datei anzeigen


BIN
target/classes/com/wyds/packets/PacketParserEntity.class Datei anzeigen


BIN
target/classes/com/wyds/packets/yourPacket.class Datei anzeigen


+ 3
- 2
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst Datei anzeigen

1
-com/wyds/PacketRepo/packetRepository.class
2
-com/wyds/packets/PacketParserEntity.class
3
 com/wyds/packets/Capture.class
1
 com/wyds/packets/Capture.class
4
 com/wyds/PacketTracker.class
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 Datei anzeigen

1
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/packets/Capture.java
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
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/PacketRepo/packetRepository.java
3
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/PacketRepo/packetRepository.java
3
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/PacketController/PacketController.java
4
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/PacketController/PacketController.java
4
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/packets/PacketParser.java
5
 /Users/shivamp/Desktop/wydsProject/pcap/src/main/java/com/wyds/packets/PacketParser.java

BIN
target/original-uber-pcap-1.0.0.jar Datei anzeigen


BIN
target/pcap-1.0.0.jar Datei anzeigen


BIN
target/uber-pcap-1.0.0.jar Datei anzeigen