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
| wget -O dbeaver.deb https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb | |
| chmod +x dbeaver.deb | |
| sudo dpkg -i dbeaver.deb | |
| rm dbeaver.deb |
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
| #!/bin/bash | |
| regex="def (.+)\(" | |
| while read -r line; do | |
| if [[ $line =~ $regex ]]; then | |
| function_name="${BASH_REMATCH[1]}"; | |
| touch "$function_name.py"; | |
| echo "from prefect import task" >> "$function_name.py"; | |
| echo "from projects.hybrid_cloud.deploy_edge_transport_node import payloads" >> "$function_name.py"; |
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
| #!/bin/bash | |
| RED='\033[0;31m' | |
| NO_COLOR='\033[0m' | |
| allowed_conflicts=0 | |
| # Check args | |
| while getopts 'a:' flag; do | |
| case "${flag}" in |
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
| # Passamos os valores pro python | |
| key = "110 157 167 040 155 165 143 150 040 144 151 144 040 115 141 147 147 151 145 040 157 162 151 147 151 156 141 154 154 171 040 143 157 163 164 077 040 050 104 151 166 151 144 145 144 040 142 171 040 070 054 040 164 157 040 164 150 145 040 156 145 141 162 145 163 164 040 151 156 164 145 147 145 162 054 040 141 156 144 040 164 150 145 156 040 160 154 165 163 040 146 157 165 162 051" | |
| # Transforma em uma lista | |
| list_key = key.split(' ') | |
| # Converte de octal para decimal | |
| decimal_key = [int(i, 8) for i in list_key] | |
| # E agora convertemos este número decimal para uma letra, a partir da função chr() | |
| asc_key = [chr(i) for i in decimal_key] | |
| # Transforma a lista de palavras em uma string só | |
| asc_key = ''.join(asc_key ) |
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
| # Passamos os valores pro python | |
| encoded = "152 162 152 145 162 167 150 172 153 162 145 170 141 162" | |
| # Transformamos a string em uma lista | |
| list_encoded = encoded.split(' ') | |
| # Convertemos cada valor octal para decimal | |
| decimal_encoded = [int(i, 8) for i in list_encoded] | |
| # Vamos transformar isso em um texto, pois cada numero decimal deve ser um caractere ASCII | |
| string_encoded = [chr(i) for i in decimal_encoded] | |
| # Juntando os caracteres em uma string única | |
| string_encoded = ''.join(string_encoded) |
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
| # Resolução do desafio: | |
| # https://ctflearn.com/challenge/174 | |
| with open('data.dat', 'r') as file: | |
| linhas = file.readlines() | |
| count = 0 | |
| for linha in linhas: | |
| zeros = linha.count('0') |
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
| # Este script resolve o seguinte challenge: | |
| # https://ctflearn.com/challenge/89 | |
| from PIL import Image | |
| FILE_NAME = 'image_magic.jpg' | |
| original_image = Image.open(FILE_NAME) | |
| rebuilded_image = Image.new(original_image.mode, (304, 92)) |
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 socket | |
| hostname = 'lab.shellterlabs.com' | |
| port = 35915 | |
| wordlist = 'rockyou.txt' | |
| file = open(wordlist, 'rb') | |
| passwords = file.readlines() | |
| file.close() |
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 re | |
| from PIL import Image | |
| FILE_NAME = "code.txt" | |
| file = open(FILE_NAME, 'r') | |
| lines = file.readlines() | |
| file.close() | |
| image = Image.new('RGB', (800, 600)) |
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 | |
| def post_hash(code, cookie): | |
| response = requests.post('http://docker.hackthebox.eu:30514/', data={'hash' : code}, cookies=cookie) | |
| return response.text |
NewerOlder