Last active
April 20, 2021 14:34
-
-
Save jnovikov/0bdcdd4816334a062937f7d41907c321 to your computer and use it in GitHub Desktop.
Simple script to send flag to the ForcAD jury system
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
import socket | |
# Jury IP | |
IP = "192.168.88.252" | |
# Your team token | |
TOKEN = "" | |
# send one flag | |
def send_flag(flag): | |
s = socket.socket() | |
s.connect((IP, 31337)) | |
s.recv(1024) | |
s.send((TOKEN + "\n").encode()) | |
s.recv(1024) | |
s.send((flag + "\n").encode()) | |
print(s.recv(1024)) | |
s.close() | |
# send list of flags | |
def send_flags(flags): | |
s = socket.socket() | |
s.connect((IP, 31337)) | |
s.recv(1024) | |
s.send((TOKEN + "\n").encode()) | |
s.recv(1024) | |
for flag in flags: | |
s.send((flag + "\n").encode()) | |
print(s.recv(1024)) | |
s.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment