Enviado em 11/02/2023 - 15:08h
Boa Tarde a todos!gcc test.c -o test -march=native -Ofast -Wextra -pedantic -pedantic-errors -Werror -Wwrite-strings
gcc test.c -o test -march=native -Ofast -Wall -Wextra -pedantic -pedantic-errors -Werror -Wwrite-strings
#include <stdio.h>
#include <string.h>
int main(void) {
char Text1[] = "4shared.com | user: blabla@email.com | pass: 123";
char Text2[] = "\x1F#imported #palemoon\x1F\x1F"; // \x1F | \(ESCAPE) x1F(31) Character 31 = US
//char text[] = {31, '#', 'i', 'm', 'p', 'o', 'r', 't', 'e', 'd', ' ', '#', 'p', 'a', 'l', 'e', 'm', 'o', 'o', 'n', 31, 31, '\0'}; // Other way
char *sub = strstr(Text1, " | ");
if(sub != NULL) {
int len1 = strlen(Text1);
int len2 = strlen(Text2);
int len = strlen(sub);
char temp[len1 + len2 - 3 + 1];
strncpy(temp, Text1, sub - Text1);
temp[sub - Text1] = '\0';
strcat(temp, Text2);
strcat(temp, sub + 3);
strcpy(Text1, temp);
}
printf("%s\n", Text1); // Não vai mostrar o caracter não imprimível, obviamente!
FILE *outFile = fopen("out.txt", "w");
fprintf(outFile, "%s", Text1);
fclose(outFile);
return 0;
}
Atualizando o Passado: Linux no Lenovo G460 em 2025
aaPanel - Um Painel de Hospedagem Gratuito e Poderoso
O macete do Warsaw no Linux Mint e cia
Visualizar arquivos em formato markdown (ex.: README.md) pelo terminal
Dando - teoricamente - um gás no Gnome-Shell do Arch Linux
Como instalar o Google Cloud CLI no Ubuntu/Debian
Mantenha seu Sistema Leve e Rápido com a Limpeza do APT!
Procurando vídeos de YouTube pelo terminal e assistindo via mpv (2025)
Pastas da raiz foram para a área de trabalho [RESOLVIDO] (10)
Será que eu deveria apreender C/C++ para desenvolver para Linux? (4)