Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #no need to make it executable, just run:
- #bash ./tuxLove.sh
- #dang we need some code everyone has gcc right?
- touch sysbanner.c
- echo "#include <stdio.h>
- #include <string.h> " > sysbanner.c
- echo "char *glyphs[] ={
- \" ### ### ### # # ##### ### # ## ### \",
- \" ### ### ### # # # # ## # # # # ### \",
- \" ### # # ######## # ### # ## # \",
- \" # # # ##### # ### # \",
- \" ####### # # # #### # # \",
- \" ### # # # # # # # ## # \",
- \" ### # # ##### # ### #### # \",
- \" ## ## #\",
- \" # # # # # # \",
- \" # # # # # # \",
- \" # # ### ### ##### ### ##### # \",
- \" # # # # # ### ### # \",
- \" # # # # # # ### # \",
- \" ## ## # ### # \",
- \" ### # ##### ##### # ####### ##### #######\",
- \" # # ## # ## ## # # # ## # \",
- \"# # # # # # ## # # # # \",
- \"# # # # ##### ##### ####### ##### ###### # \",
- \"# # # # # # # ## # # \",
- \" # # # # # # # # ## # # \",
- \" ### ##### ####### ##### # ##### ##### # \",
- \" ##### ##### # ### # # ##### \",
- \"# ## # # # ### # # # #\",
- \"# ## # # # ##### # #\",
- \" ##### ###### ### # # ## \",
- \"# # # # ### # ##### # # \",
- \"# ## # # # # # # \",
- \" ##### ##### # # # # # \",
- \" ##### # ###### ##### ###### ############## ##### \",
- \"# # # # # ## ## ## # # #\",
- \"# ### # # # # ## # ## # # \",
- \"# # # ## ####### # # ###### ##### # ####\",
- \"# #### ######## ## # ## # # #\",
- \"# ## ## ## ## ## # # #\",
- \" ##### # ####### ##### ###### ######## ##### \",
- \"# # ### ## # # # ## ########\",
- \"# # # ## # # ## #### ## #\",
- \"# # # ## # # # # # ## # ## #\",
- \"####### # #### # # # ## # ## #\",
- \"# # # # ## # # # ## # ## #\",
- \"# # # # ## # # # ## ### #\",
- \"# # ### ##### # # ######## ## ########\",
- \"###### ##### ###### ##### ######## ## ## #\",
- \"# ## ## ## # # # ## ## # #\",
- \"# ## ## ## # # ## ## # #\",
- \"###### # ####### ##### # # ## ## # #\",
- \"# # # ## # # # # # # # # # #\",
- \"# # # # # # # # # # # # # # #\",
- \"# #### ## # ##### # ##### # ## ## \",
- \"# ## ######## ##### # ##### # \",
- \" # # # # # # # # # # \",
- \" # # # # # # # # # # \",
- \" # # # # # # \",
- \" # # # # # # # \",
- \" # # # # # # # \",
- \"# # # ####### ##### # ##### #######\",
- \" ### \",
- \" ### ## ##### #### ##### ###### ###### #### \",
- \" # # # # # # # # # # # # #\",
- \" # # # ##### # # # ##### ##### # \",
- \" ###### # # # # # # # # ###\",
- \" # # # # # # # # # # # #\",
- \" # # ##### #### ##### ###### # #### \",
- \" \",
- \" # # # # # # # # # # # #### \",
- \" # # # # # # # ## ## ## # # #\",
- \" ###### # # #### # # ## # # # # # #\",
- \" # # # # # # # # # # # # # #\",
- \" # # # # # # # # # # # ## # #\",
- \" # # # #### # # ###### # # # # #### \",
- \" \",
- \" ##### #### ##### #### ##### # # # # # #\",
- \" # # # # # # # # # # # # # #\",
- \" # # # # # # #### # # # # # # #\",
- \" ##### # # # ##### # # # # # # # ## #\",
- \" # # # # # # # # # # # # ## ##\",
- \" # ### # # # #### # #### ## # #\",
- \" ### # ### ## # # # #\",
- \" # # # # ###### # # # # # # # # # \",
- \" # # # # # # # # ## # # # #\",
- \" ## # # ## ## # # # \",
- \" ## # # # # # # # # #\",
- \" # # # # # # # # # # \",
- \" # # # ###### ### # ### # # # #\"};
- int main(int argc, char **argv){
- int a, b, c, len, ind;
- char line[80];
- for (argv++; --argc; argv++) {
- len = strlen(*argv);
- if (len > 10)
- len = 10;
- for (a = 0; a < 7; a++) {
- for (b = 0; b < len; b++) {
- if ((ind = (*argv)[b] - ' ') < 0)
- ind = 0;
- for (c = 0; c < 7; c++) {
- line[b * 8 + c] = glyphs[(ind / 8 * 7) + a][(ind % 8 * 7) + c];
- }
- line[b * 8 + 7] = ' ';
- }
- for (b = len * 8 - 1; b >= 0; b--) {
- if (line[b] != ' ')
- break;
- line[b] = '\0';
- }
- puts(line);
- }
- puts(\"\");
- }
- return 0;
- }">> sysbanner.c
- gcc -g -Wall sysbanner.c
- ./a.out $USER LOVES LINUX
- #clean up files
- echo "we built some code for this, if you want to delete it press y [ENTER]
- otherwise press n [ENTER]"
- rm -i sysbanner.c a.out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement