-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2abc62b
commit 81f9fa9
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
FROM alpine:3.13.5 | ||
|
||
RUN apk update | ||
RUN apk add scapy python3 && ln -sf python3 /usr/bin/python | ||
|
||
RUN mkdir /code | ||
WORKDIR /code | ||
ADD advertise.py /code/ | ||
|
||
CMD ["python", "-u", "/code/advertise.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: UTF-8 -*- | ||
from scapy.all import * | ||
import time | ||
import os | ||
|
||
hostip = os.environ['HOST_IP'] | ||
|
||
print("Container started") | ||
while True: | ||
send(IP(src=hostip, dst="8.8.8.8")/ICMP()) | ||
print("Sent from", hostip, "sleep 5 mins") | ||
time.sleep(300) |