forked from scriptbaby/CTF-Writeups
-
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
Showing
10 changed files
with
66,570 additions
and
0 deletions.
There are no files selected for viewing
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,2 @@ | ||
# EasyCtf_IV | ||
This repo contains the scripts used for Easyctf IV |
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 @@ | ||
Contains the python file for the Zippity Challenge |
Large diffs are not rendered by default.
Oops, something went wrong.
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,42 @@ | ||
#!/usr/bin/env python3 | ||
#Done by ScriptBaby | ||
#EasyCTF IV | ||
|
||
from pwn import * | ||
|
||
f = open("zipcode.txt","r") | ||
content = f.read() | ||
content = content.replace("VM78:2","") | ||
content = content.split("\n ") | ||
|
||
def sendResponse(type,zipcode): | ||
for line in content: | ||
line = line.split("/") | ||
if(zipcode == line[0]): | ||
return(line[type]) | ||
|
||
p = remote("c1.easyctf.com", 12483) | ||
|
||
p.recvuntil('Go!') | ||
for x in range(50): | ||
p.recvuntil("What is the ") | ||
datatype = p.recv(10) | ||
p.recvuntil("zip code ") | ||
zipcode = p.recv(5) | ||
p.recv(1) | ||
print("Round: %r, %r, %r"%(x+1,datatype, zipcode)) | ||
if ("land area" in datatype): | ||
print(sendResponse(1,zipcode)) | ||
p.sendline(sendResponse(1,zipcode)) | ||
elif ("water area" in datatype): | ||
print(sendResponse(2,zipcode)) | ||
p.sendline(sendResponse(2,zipcode)) | ||
elif ("latitude" in datatype): | ||
print(sendResponse(3,zipcode)) | ||
p.sendline(sendResponse(3,zipcode)) | ||
elif ("longitude" in datatype): | ||
print(sendResponse(4,zipcode)) | ||
p.sendline(sendResponse(4,zipcode)) | ||
p.recv() | ||
print(p.recv()) | ||
|
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,2 @@ | ||
# NeverLanCTF-2018 | ||
This repo contains the scripts used for NeverLanCTF 2018 |
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 @@ | ||
Here is the script used to solve the challenge |
Oops, something went wrong.