Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.119.28.173
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
stph /
libgd-gd-2.2.3 /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
msinttypes
[ DIR ]
drwxr-xr-x
CMakeLists.txt
3.23
KB
-rwxr-xr-x
COPYING
2.25
KB
-rwxr-xr-x
Makefile.am
1.96
KB
-rwxr-xr-x
annotate.c
4.38
KB
-rwxr-xr-x
bdftogd
3.91
KB
-rwxr-xr-x
bmp.h
2.39
KB
-rwxr-xr-x
circletexttest.c
1.49
KB
-rwxr-xr-x
config.h.cmake
3.58
KB
-rwxr-xr-x
demoin.png
9.79
KB
-rwxr-xr-x
depcomp
11.84
KB
-rwxr-xr-x
entities.h
4.81
KB
-rwxr-xr-x
entities.html
41.11
KB
-rwxr-xr-x
entities.tcl
1.35
KB
-rwxr-xr-x
fontconfigtest.c
1.34
KB
-rwxr-xr-x
fontsizetest.c
2.3
KB
-rwxr-xr-x
fontwheeltest.c
3.23
KB
-rwxr-xr-x
gd.c
89.58
KB
-rwxr-xr-x
gd.h
50.14
KB
-rwxr-xr-x
gd2copypal.c
1.25
KB
-rwxr-xr-x
gd2time.c
1.19
KB
-rwxr-xr-x
gd2togif.c
939
B
-rwxr-xr-x
gd2topng.c
1.38
KB
-rwxr-xr-x
gd_bmp.c
25.78
KB
-rwxr-xr-x
gd_color.c
798
B
-rwxr-xr-x
gd_color.h
189
B
-rwxr-xr-x
gd_color_map.c
22.71
KB
-rwxr-xr-x
gd_color_map.h
478
B
-rwxr-xr-x
gd_color_map_test.c
570
B
-rwxr-xr-x
gd_color_match.c
1.49
KB
-rwxr-xr-x
gd_crop.c
5.75
KB
-rwxr-xr-x
gd_errors.h
1.47
KB
-rwxr-xr-x
gd_filename.c
6.41
KB
-rwxr-xr-x
gd_filter.c
21
KB
-rwxr-xr-x
gd_gd.c
7.1
KB
-rwxr-xr-x
gd_gd2.c
25.85
KB
-rwxr-xr-x
gd_gif_in.c
14.79
KB
-rwxr-xr-x
gd_gif_out.c
41
KB
-rwxr-xr-x
gd_intern.h
1.95
KB
-rwxr-xr-x
gd_interpolation.c
59.19
KB
-rwxr-xr-x
gd_io.c
3.42
KB
-rwxr-xr-x
gd_io.h
3.05
KB
-rwxr-xr-x
gd_io_dp.c
7.95
KB
-rwxr-xr-x
gd_io_file.c
2.41
KB
-rwxr-xr-x
gd_io_ss.c
2.66
KB
-rwxr-xr-x
gd_io_stream.cxx
4.11
KB
-rwxr-xr-x
gd_io_stream.h
3.63
KB
-rwxr-xr-x
gd_jpeg.c
34.5
KB
-rwxr-xr-x
gd_matrix.c
7.93
KB
-rwxr-xr-x
gd_nnquant.c
15
KB
-rwxr-xr-x
gd_nnquant.h
527
B
-rwxr-xr-x
gd_png.c
30.58
KB
-rwxr-xr-x
gd_rotate.c
12.25
KB
-rwxr-xr-x
gd_security.c
692
B
-rwxr-xr-x
gd_ss.c
1.27
KB
-rwxr-xr-x
gd_tga.c
8.61
KB
-rwxr-xr-x
gd_tga.h
1.66
KB
-rwxr-xr-x
gd_tiff.c
25.85
KB
-rwxr-xr-x
gd_topal.c
55.18
KB
-rwxr-xr-x
gd_transform.c
1.48
KB
-rwxr-xr-x
gd_version.c
827
B
-rwxr-xr-x
gd_wbmp.c
6.54
KB
-rwxr-xr-x
gd_webp.c
4.25
KB
-rwxr-xr-x
gd_xbm.c
5.68
KB
-rwxr-xr-x
gdcache.c
5.14
KB
-rwxr-xr-x
gdcache.h
2.83
KB
-rwxr-xr-x
gdcmpgif.c
1.86
KB
-rwxr-xr-x
gddemo.c
5.42
KB
-rwxr-xr-x
gdfontg.c
109.84
KB
-rwxr-xr-x
gdfontg.h
553
B
-rwxr-xr-x
gdfontl.c
104.83
KB
-rwxr-xr-x
gdfontl.h
551
B
-rwxr-xr-x
gdfontmb.c
76.33
KB
-rwxr-xr-x
gdfontmb.h
519
B
-rwxr-xr-x
gdfonts.c
66.55
KB
-rwxr-xr-x
gdfonts.h
515
B
-rwxr-xr-x
gdfontt.c
36.82
KB
-rwxr-xr-x
gdfontt.h
546
B
-rwxr-xr-x
gdft.c
49.23
KB
-rwxr-xr-x
gdfx.c
13.52
KB
-rwxr-xr-x
gdfx.h
2.34
KB
-rwxr-xr-x
gdhelpers.c
1.51
KB
-rwxr-xr-x
gdhelpers.h
2.31
KB
-rwxr-xr-x
gdkanji.c
11.97
KB
-rwxr-xr-x
gdparttopng.c
1.23
KB
-rwxr-xr-x
gdpp.cxx
6.43
KB
-rwxr-xr-x
gdpp.h
50.94
KB
-rwxr-xr-x
gdtables.c
4.67
KB
-rwxr-xr-x
gdtest.c
10.27
KB
-rwxr-xr-x
gdtestft.c
5.54
KB
-rwxr-xr-x
gdtopng.c
1.01
KB
-rwxr-xr-x
gdxpm.c
4.64
KB
-rwxr-xr-x
gifanimtest.c
682
B
-rwxr-xr-x
giftogd2.c
1.12
KB
-rwxr-xr-x
jisx0208.h
73.71
KB
-rwxr-xr-x
pngtogd.c
1.03
KB
-rwxr-xr-x
pngtogd2.c
1.23
KB
-rwxr-xr-x
snprintf.c
585
B
-rwxr-xr-x
testac.c
4.14
KB
-rwxr-xr-x
testtr.c
1.33
KB
-rwxr-xr-x
wbmp.c
6.18
KB
-rwxr-xr-x
wbmp.h
1.2
KB
-rwxr-xr-x
webpng.c
6.44
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : webpng.c
#ifdef HAVE_CONFIG_H #include "config.h" #endif /* Bring in standard I/O and string manipulation functions */ #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #include <stdio.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_STRING_H #include <string.h> #endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #ifdef __clang__ /* Workaround broken clang behavior: https://llvm.org/bugs/show_bug.cgi?id=20144 */ #undef strcmp #endif /* Bring in the gd library functions */ #include "gd.h" static const char argv0[] = "webpng"; static void usage(const char *msg) { /* If the command failed, output an explanation. */ fprintf(msg == NULL ? stdout : stderr, "Usage: %s [-i y|n] [-l] [-t index|none] [-d] [-a] pngname.png\n" " -i <y|n> Turns on/off interlace\n" " -l Prints the table of color indexes\n" " -t <index> Set the transparent color to the specified index (0-255 or \"none\")\n" " -d Reports the dimensions and other characteristics of the image\n" " -a Prints all alpha channels that are not 100%% opaque\n" "\n" "If you specify '-' as the input file, stdin/stdout will be used as input/output.\n", argv0); if (msg) fprintf(stderr, "\nError: %s\n", msg); exit(msg == NULL ? 0 : 1); } static void err(const char *fmt, ...) { va_list ap; int e = errno; fprintf(stderr, "%s: error: ", argv0); va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); if (e) fprintf(stderr, ": %s", strerror(e)); fputs("\n", stderr); exit(1); } int main(int argc, char **argv) { FILE *in; FILE *out; const char *infile; char *tmpfile; int i; int use_stdin_stdout = 0; int interlace = -100; int list_color_table = 0; int trans_col = -1; int report_details = 0; int print_alpha = 0; /* Declare our image pointer */ gdImagePtr im = 0; /* We'll set 'write' once we know the user's request requires that the image be written back to disk. */ int write = 0; int got_a_flag = 0; /* Consider each argument in turn. */ opterr = 0; while ((i = getopt(argc, argv, "i:lt:da")) != -1) { got_a_flag = 1; switch (i) { case 'i': /* -i turns on and off interlacing. */ if (strcmp(optarg, "y") == 0) interlace = 1; else if (strcmp(optarg, "n") == 0) interlace = 0; else usage("-i specified without y or n"); write = 1; break; case 'l': /* List the colors in the color table. */ list_color_table = 1; break; case 't': /* Set transparent index (or none). */ if (strcmp(optarg, "none") == 0) { /* -1 means not transparent. */ trans_col = -1; } else { /* XXX: Should check for errors. */ trans_col = atoi(optarg); if (trans_col < 0 || trans_col > 255) err("-t has to be in the range of 0 and 255 (inclusive)"); } write = 1; break; case 'd': /* Output dimensions, etc. */ report_details = 1; break; case 'a': /* Alpha channel info -- thanks to Wez Furlong */ print_alpha = 1; break; case 'h': usage(NULL); break; default: case '?': if (optind < argc && strcmp(argv[optind], "--help") == 0) usage(NULL); usage("unknown option"); break; } } if (got_a_flag == 0) usage("missing operation flag"); if (argc == optind) usage("missing filename"); else if (argc != optind + 1) usage("can only specify one file"); infile = argv[optind]; if (strcmp(infile, "-") == 0) { /* - is synonymous with STDIN */ use_stdin_stdout = 1; in = stdin; } else in = fopen(infile, "rb"); if (!in) err("can't open file %s", infile); /* Now load the image. */ im = gdImageCreateFromPng(in); fclose(in); /* If the load failed, it must not be a PNG file. */ if (!im) err("%s is not a valid PNG file", infile); if (list_color_table) { /* List the colors in the color table. */ if (!im->trueColor) { int j; /* Tabs used below. */ printf("Index Red Green Blue Alpha\n"); for (j = 0; j < gdImageColorsTotal(im); ++j) { /* Use access macros to learn colors. */ printf("%d %d %d %d %d\n", j, gdImageRed(im, j), gdImageGreen(im, j), gdImageBlue(im, j), gdImageAlpha(im, j)); } } else printf("Truecolor image, no palette entries to list.\n"); } if (report_details) { /* Output dimensions, etc. */ int t; printf("Width: %d Height: %d Colors: %d\n", gdImageSX(im), gdImageSY(im), gdImageColorsTotal(im)); /* -1 means the image is not transparent. */ t = gdImageGetTransparent(im); if (t != -1) printf("First 100%% transparent index: %d\n", t); else printf("First 100%% transparent index: none\n"); if (gdImageGetInterlaced(im)) printf("Interlaced: yes\n"); else printf("Interlaced: no\n"); } if (print_alpha) { /* Alpha channel info -- thanks to Wez Furlong */ int maxx, maxy, x, y, alpha, pix, nalpha = 0; maxx = gdImageSX(im); maxy = gdImageSY(im); printf("alpha channel information:\n"); if (im->trueColor) { for (y = 0; y < maxy; y++) { for (x = 0; x < maxx; x++) { pix = gdImageGetPixel(im, x, y); alpha = gdTrueColorGetAlpha(pix); if (alpha > gdAlphaOpaque) { /* Use access macros to learn colors. */ printf("%d %d %d %d\n", gdTrueColorGetRed(pix), gdTrueColorGetGreen(pix), gdTrueColorGetBlue(pix), alpha); nalpha++; } } } } else printf("NOT a true color image\n"); printf("%d alpha channels\n", nalpha); } /* If no modifications requested, break out. */ if (write == 0) { gdImageDestroy(im); return 0; } if (interlace == 1) gdImageInterlace(im, 1); else if (interlace == 0) gdImageInterlace(im, 0); if (trans_col != -100) gdImageColorTransparent(im, trans_col); if (use_stdin_stdout) { out = stdout; } else { /* Open a temporary file. */ size_t filelen = strlen(infile); size_t len = filelen + 8; int outfd; tmpfile = malloc(len); if (tmpfile == NULL) err("could not create a tempfile"); memcpy(tmpfile, infile, filelen); strcpy(tmpfile + filelen, ".XXXXXX"); outfd = mkstemp(tmpfile); if (outfd == -1) err("could not open %s", tmpfile); out = fdopen(outfd, "wb"); if (!out) err("could not open %s", tmpfile); } /* Write the new PNG. */ gdImagePng(im, out); if (!use_stdin_stdout) { fclose(out); /* Erase the old PNG. */ unlink(infile); /* Rename the new to the old. */ if (rename(tmpfile, infile) != 0) err("unable to rename %s to %s", infile, tmpfile); } /* Delete the image from memory. */ gdImageDestroy(im); /* All's well that ends well. */ return 0; }
Close