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;
}
Comparação entre os escalonadores BFQ e MQ-Deadline (acesso a disco) no Arch e Debian
Conciliando o uso da ZRAM e SWAP em disco na sua máquina
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Como instalar o Telegram Desktop no Ubuntu 24.04
Overclocking Permanente para Drastic no Miyoo Mini Plus
Problemas de chaves (/usr/share/keyrings) no Debian
Converter os repositórios Debian para o novo formato com as chaves
Primeiras impressões do Debian 13 (8)
como resolver o problema de som do linux mint mate (4)