Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Still assuming Linux users have gcc
- #Yo dawg I heard you like bash!
- echo -e "
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
- char *Cipher2Text(char *startup){
- int i = 0;
- int shift=3;
- char* plainText = (char*) malloc(strlen(startup) + 1);
- while (startup[i] != '\0'){
- if (startup[i] >= 'a' && startup[i] <= 'z')
- plainText[i] = 'a' + ((startup[i] - 'a' - shift + 26) % 26);
- else if (startup[i] >= 'A' && startup[i] <= 'Z')
- plainText[i] = 'A' + ((startup[i] - 'A' - shift + 26) % 26);
- else
- plainText[i] = startup[i];
- i++;
- }
- plainText[i] = '\0';
- return plainText;
- }
- int main(){
- char init[] = {\"Surmhfw Dgrqlv: Zulwlqj grsh frgh vlqfh \"};
- char *startup=Cipher2Text( init);
- usleep(10000);
- int size = sizeof(init);
- for (int a = 0; a < size; a++){
- setvbuf(stdout, NULL, _IONBF, 0);
- printf(\"%c\", startup[a]);
- usleep(50000);
- }
- //So we put a bash code in your C code
- system(\"stat \$HOME | awk 'FNR == 8 {print}' | awk '{print \$2}'\");
- //so you can have a bash while you C bash
- return 0;
- }" > cyphr.c
- gcc -g -Wall cyphr.c -o cyphr
- ./cyphr
- sleep 3
- pkill cyphr
- rm cyphr cyphr.c
Advertisement
Advertisement