This file contains hidden or 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
| #!/usr/bin/python3 | |
| import json | |
| import requests as req | |
| from time import sleep | |
| from datetime import datetime | |
| def get_public_ip(): | |
| try: | |
| status = json.loads(req.get('https://wtfismyip.com/json').text) |
This file contains hidden or 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
| echo "["$(echo $(cat ips|head -n -3|awk '{print $3}'|sort|uniq|xargs -I% curl -s "https://freegeoip.app/json/%"|sed "s/\}/\},/")|rev|cut -c2-|rev)"]">ips.json |
This file contains hidden or 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 requests as req;print(f'\033[92m[+]\033[39m Public IP: \033[96m{req.get("https://wtfismyip.com/text").text.strip()}\033[39m') |
This file contains hidden or 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 json, datetime | |
| import requests as req | |
| from tabulate import tabulate | |
| CTFURL=input('CTF-URL (e.g.: ctf.csaw.io): ') | |
| SESSCOOKIE=input('Session-Cookie: ') | |
| CHID=input('Challenge-ID: ') | |
| print(tabulate([(e['name'], datetime.datetime.fromisoformat(e['date'][:-1]).strftime('%d.%m.%Y %H:%M:%S')) for e in json.loads(req.get(f'https://{CTFURL}/api/v1/challenges/{CHID}/solves',cookies=dict(session=SESSCOOKIE)).text)['data']], headers=('User', 'Timestamp',))) |
NewerOlder