!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/usr/src/linux-headers-5.15.0-151/scripts/dtc/   drwxr-xr-x
Free 28.8 GB of 117.98 GB (24.41%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     fstree.c (1.52 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation.  2005.
 */

#include "dtc.h"

#include <dirent.h>
#include <sys/stat.h>

static struct node *read_fstree(const char *dirname)
{
    DIR *d;
    struct dirent *de;
    struct stat st;
    struct node *tree;

    d = opendir(dirname);
    if (!d)
        die("Couldn't opendir() \"%s\": %s\n", dirname, strerror(errno));

    tree = build_node(NULL, NULL, NULL);

    while ((de = readdir(d)) != NULL) {
        char *tmpname;

        if (streq(de->d_name, ".")
            || streq(de->d_name, ".."))
            continue;

        tmpname = join_path(dirname, de->d_name);

        if (stat(tmpname, &st) < 0)
            die("stat(%s): %s\n", tmpname, strerror(errno));

        if (S_ISREG(st.st_mode)) {
            struct property *prop;
            FILE *pfile;

            pfile = fopen(tmpname, "rb");
            if (! pfile) {
                fprintf(stderr,
                    "WARNING: Cannot open %s: %s\n",
                    tmpname, strerror(errno));
            } else {
                prop = build_property(xstrdup(de->d_name),
                              data_copy_file(pfile,
                                     st.st_size),
                              NULL);
                add_property(tree, prop);
                fclose(pfile);
            }
        } else if (S_ISDIR(st.st_mode)) {
            struct node *newchild;

            newchild = read_fstree(tmpname);
            newchild = name_node(newchild, xstrdup(de->d_name));
            add_child(tree, newchild);
        }

        free(tmpname);
    }

    closedir(d);
    return tree;
}

struct dt_info *dt_from_fs(const char *dirname)
{
    struct node *tree;

    tree = read_fstree(dirname);
    tree = name_node(tree, "");

    return build_dt_info(DTSF_V1, NULL, tree, guess_boot_cpuid(tree));
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0037 ]--