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;
}
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
Atualizar Debian Online de uma Versão para outra
Instalando Discord no Debian 13
Instalar driver Nvidia no Debian 13
Redimensionando, espelhando, convertendo e rotacionando imagens com script
Software livre - será que eu estou tão errado assim? (9)
Boot do PosRog so funciona em notebook (1)