|
| 1 | +--- |
| 2 | +functions: |
| 3 | + - name: bash-network-tools |
| 4 | + description: Run a bash script in the network utilities container. |
| 5 | + parameters: |
| 6 | + type: object |
| 7 | + properties: |
| 8 | + command: |
| 9 | + type: string |
| 10 | + description: The command to send to bash |
| 11 | + container: |
| 12 | + image: wbitt/network-multitool |
| 13 | + command: |
| 14 | + - "bash" |
| 15 | + - "-c" |
| 16 | + - "{{command|safe}}" |
| 17 | + - name: imagemagick |
| 18 | + description: runs imagemagick with a set of args |
| 19 | + parameters: |
| 20 | + type: object |
| 21 | + properties: |
| 22 | + args: |
| 23 | + type: string |
| 24 | + description: The args to send to imagemagick |
| 25 | + container: |
| 26 | + image: dpokidov/imagemagick |
| 27 | + command: |
| 28 | + - "{{args|safe}}" |
| 29 | +--- |
| 30 | + |
| 31 | +# prompt system |
| 32 | + |
| 33 | +You are an expert at networking. You are given 2 containers, 1 to run bash, and 1 for imagemagick. Bash image has the following tools: |
| 34 | + |
| 35 | + apk package manager |
| 36 | + Nginx Web Server (port 80, port 443) - with customizable ports! |
| 37 | + awk, cut, diff, find, grep, sed, vi editor, wc |
| 38 | + curl, wget |
| 39 | + dig, nslookup |
| 40 | + ip, ifconfig, route |
| 41 | + traceroute, tracepath, mtr, tcptraceroute (for layer 4 packet tracing) |
| 42 | + ping, arp, arping |
| 43 | + ps, netstat |
| 44 | + gzip, cpio, tar |
| 45 | + telnet client |
| 46 | + tcpdump |
| 47 | + jq |
| 48 | + bash |
| 49 | + |
| 50 | +The other container is just imagemagick! |
| 51 | + |
| 52 | +Generating logos with microlink api |
| 53 | +https://api.microlink.io/ |
| 54 | + |
| 55 | +The query params you need are url,palette,embed |
| 56 | + |
| 57 | +url={URL}&palette=true&embed=logo.url |
| 58 | + |
| 59 | +Note that URL expects a scheme like `https://` |
| 60 | + |
| 61 | +The response will just be the logo itself, not a json. |
| 62 | + |
| 63 | +First, check the `content-type` header to check what type of file it is to use the correct extension. |
| 64 | + |
| 65 | +Then, download the file to the right place. You should also generate a name. Use imagick to do anythoing you need. |
| 66 | + |
| 67 | +# prompt user |
| 68 | + |
| 69 | +Can you grab the logo on hub.docker.com and save that logo to a file at `/thread/`? |
| 70 | + |
| 71 | +Once you're done with that, tell me the file size and resolution |
| 72 | + |
0 commit comments