Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
//More examples - https://github.com/metalx1000/C-Code-with-embedded-files /* * Copyright (c) 2017 Kris Occhipint. * http://filmsbykris.com * * Embed text files in a C program * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see
. */ #include
//create object file -- architecture may very //objcopy --input binary --output elf64-x86-64 --binary-architecture i386 file.txt file.o //compile: gcc textfile_3_obj.c file.o -o textfile_3_obj //for windows/mingw remove underscores extern char _binary_file_txt_start; extern char _binary_file_txt_end; int main(){ char* p = &_binary_file_txt_start; while ( p != &_binary_file_txt_end ) putchar(*p++); return 0; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)