Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-2-capstone-design2
/
2017110275
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
이한솔
2020-10-27 18:03:49 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e55ee541c40c3077ba3e4e83dc5b730fd843a3a6
e55ee541
1 parent
bcd4ec5e
주간보고서
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
.DS_Store
Code/detection/Hop Count Filtering/Server.py
Docs/캡스톤디자인2 주간보고서_1023.docx
.DS_Store
View file @
e55ee54
No preview for this file type
Code/detection/Hop Count Filtering/Server.py
View file @
e55ee54
#from hopCountFiltering import HCFStateManager
from
HCF
import
*
from
struct
import
*
import
sys
import
socket
def
PacketMonitoring
():
def
DetectingPacket
():
IP
=
[]
for
i
in
range
(
1
,
10
):
ip
=
'10.0.'
+
str
(
i
+
1
)
+
'.100'
IP
.
append
(
ip
)
packet
Manager
=
HCF
(
IP
)
packet
HCF
=
HCF
(
IP
)
# set up the socket
try
:
sock
=
socket
.
socket
(
socket
.
AF_PACKET
,
socket
.
SOCK_RAW
,
socket
.
ntohs
(
0x0003
))
...
...
@@ -44,10 +42,10 @@ def PacketMonitoring():
print
(
"TTL: "
,
ttl
)
try
:
packetTest
=
packetManager
.
IsSpoofed
({
'ttl'
:
ttl
,
'src'
:
source_addr
})
packetTest
=
packetManager
HCF
.
IsSpoofed
({
'ttl'
:
ttl
,
'src'
:
source_addr
})
except
Exception
as
e
:
print
(
e
)
continue
if
__name__
==
"__main__"
:
PacketMonitoring
()
DetectingPacket
()
...
...
Docs/캡스톤디자인2 주간보고서_1023.docx
0 → 100644
View file @
e55ee54
No preview for this file type
Please
register
or
login
to post a comment