Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 18.190.152.109
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
www /
server /
php /
81 /
src /
ext /
standard /
[ HOME SHELL ]
Name
Size
Permission
Action
html_tables
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
Makefile.frag
518
B
-rw-r--r--
Makefile.frag.w32
484
B
-rw-r--r--
array.c
171.38
KB
-rw-r--r--
assert.c
8.26
KB
-rw-r--r--
base64.c
30.55
KB
-rw-r--r--
base64.h
3.59
KB
-rw-r--r--
basic_functions.c
66.93
KB
-rw-r--r--
basic_functions.h
4.87
KB
-rw-r--r--
basic_functions.stub.php
48.85
KB
-rw-r--r--
basic_functions_arginfo.h
125.23
KB
-rw-r--r--
browscap.c
20.49
KB
-rw-r--r--
config.m4
10.98
KB
-rw-r--r--
config.w32
1.79
KB
-rw-r--r--
crc32.c
3.85
KB
-rw-r--r--
crc32.h
4.79
KB
-rw-r--r--
crc32_x86.c
11.99
KB
-rw-r--r--
crc32_x86.h
1.82
KB
-rw-r--r--
credits.c
5.71
KB
-rw-r--r--
credits.h
1.53
KB
-rw-r--r--
credits_ext.h
5.24
KB
-rw-r--r--
credits_sapi.h
835
B
-rw-r--r--
crypt.c
6.73
KB
-rw-r--r--
crypt_blowfish.c
30.75
KB
-rw-r--r--
crypt_blowfish.h
790
B
-rw-r--r--
crypt_freesec.c
21.52
KB
-rw-r--r--
crypt_freesec.h
662
B
-rw-r--r--
crypt_sha256.c
21.6
KB
-rw-r--r--
crypt_sha512.c
26.24
KB
-rw-r--r--
css.c
2.24
KB
-rw-r--r--
css.h
1.04
KB
-rw-r--r--
datetime.c
3.28
KB
-rw-r--r--
datetime.h
1.14
KB
-rw-r--r--
dir.c
14.04
KB
-rw-r--r--
dir.stub.php
528
B
-rw-r--r--
dir_arginfo.h
1.83
KB
-rw-r--r--
dl.c
8.18
KB
-rw-r--r--
dl.h
1.46
KB
-rw-r--r--
dl.stub.php
56
B
-rw-r--r--
dl_arginfo.h
269
B
-rw-r--r--
dns.c
29.37
KB
-rw-r--r--
dns_win32.c
15.09
KB
-rw-r--r--
exec.c
12.77
KB
-rw-r--r--
exec.h
1.27
KB
-rw-r--r--
file.c
65.14
KB
-rw-r--r--
file.h
3.93
KB
-rw-r--r--
filestat.c
28.38
KB
-rw-r--r--
filters.c
50.3
KB
-rw-r--r--
flock_compat.c
6
KB
-rw-r--r--
flock_compat.h
2.06
KB
-rw-r--r--
formatted_print.c
23.31
KB
-rw-r--r--
fsock.c
3.67
KB
-rw-r--r--
fsock.h
1.22
KB
-rw-r--r--
ftok.c
1.84
KB
-rw-r--r--
ftp_fopen_wrapper.c
31.54
KB
-rw-r--r--
head.c
10.66
KB
-rw-r--r--
head.h
1.53
KB
-rw-r--r--
hrtime.c
4.86
KB
-rw-r--r--
hrtime.h
2.31
KB
-rw-r--r--
html.c
44.9
KB
-rw-r--r--
html.h
2.34
KB
-rw-r--r--
html_tables.h
472.26
KB
-rw-r--r--
http.c
6.99
KB
-rw-r--r--
http_fopen_wrapper.c
32.23
KB
-rw-r--r--
image.c
44.79
KB
-rw-r--r--
incomplete_class.c
4.95
KB
-rw-r--r--
info.c
40.74
KB
-rw-r--r--
info.h
22.94
KB
-rw-r--r--
iptc.c
9.11
KB
-rw-r--r--
lcg.c
2.8
KB
-rw-r--r--
levenshtein.c
2.57
KB
-rw-r--r--
link.c
5.45
KB
-rw-r--r--
mail.c
15.13
KB
-rw-r--r--
math.c
27.18
KB
-rw-r--r--
md5.c
10.66
KB
-rw-r--r--
md5.h
2.02
KB
-rw-r--r--
metaphone.c
11.53
KB
-rw-r--r--
microtime.c
4.01
KB
-rw-r--r--
mt_rand.c
10.67
KB
-rw-r--r--
net.c
8.97
KB
-rw-r--r--
pack.c
31.65
KB
-rw-r--r--
pack.h
1.05
KB
-rw-r--r--
pageinfo.c
3.23
KB
-rw-r--r--
pageinfo.h
1.15
KB
-rw-r--r--
password.c
19.17
KB
-rw-r--r--
php_array.h
2.24
KB
-rw-r--r--
php_assert.h
1.24
KB
-rw-r--r--
php_browscap.h
1.11
KB
-rw-r--r--
php_crypt.h
1.37
KB
-rw-r--r--
php_crypt_r.c
5.74
KB
-rw-r--r--
php_crypt_r.h
1.64
KB
-rw-r--r--
php_dir.h
1.28
KB
-rw-r--r--
php_dns.h
2.58
KB
-rw-r--r--
php_ext_syslog.h
1.25
KB
-rw-r--r--
php_filestat.h
2.1
KB
-rw-r--r--
php_fopen_wrapper.c
11.47
KB
-rw-r--r--
php_fopen_wrappers.h
1.79
KB
-rw-r--r--
php_http.h
1.33
KB
-rw-r--r--
php_image.h
2.17
KB
-rw-r--r--
php_incomplete_class.h
2.15
KB
-rw-r--r--
php_lcg.h
1.31
KB
-rw-r--r--
php_mail.h
2.16
KB
-rw-r--r--
php_math.h
3.55
KB
-rw-r--r--
php_mt_rand.h
1.81
KB
-rw-r--r--
php_net.h
1.14
KB
-rw-r--r--
php_password.h
2.76
KB
-rw-r--r--
php_rand.h
3
KB
-rw-r--r--
php_random.h
1.86
KB
-rw-r--r--
php_smart_string.h
1.13
KB
-rw-r--r--
php_smart_string_public.h
1.14
KB
-rw-r--r--
php_standard.h
1.91
KB
-rw-r--r--
php_string.h
3.95
KB
-rw-r--r--
php_uuencode.h
1.18
KB
-rw-r--r--
php_var.h
3.41
KB
-rw-r--r--
php_versioning.h
1.18
KB
-rw-r--r--
proc_open.c
35.65
KB
-rw-r--r--
proc_open.h
1.67
KB
-rw-r--r--
quot_print.c
7
KB
-rw-r--r--
quot_print.h
1.23
KB
-rw-r--r--
rand.c
2.22
KB
-rw-r--r--
random.c
7.33
KB
-rw-r--r--
scanf.c
28.32
KB
-rw-r--r--
scanf.h
1.95
KB
-rw-r--r--
sha1.c
11.22
KB
-rw-r--r--
sha1.h
1.62
KB
-rw-r--r--
soundex.c
2.94
KB
-rw-r--r--
streamsfuncs.c
43.35
KB
-rw-r--r--
streamsfuncs.h
1.11
KB
-rw-r--r--
string.c
143.34
KB
-rw-r--r--
strnatcmp.c
4.28
KB
-rw-r--r--
syslog.c
6.02
KB
-rw-r--r--
type.c
10.77
KB
-rw-r--r--
uniqid.c
2.62
KB
-rw-r--r--
url.c
18.08
KB
-rw-r--r--
url.h
2.08
KB
-rw-r--r--
url_scanner_ex.c
38.41
KB
-rw-r--r--
url_scanner_ex.h
2.32
KB
-rw-r--r--
url_scanner_ex.re
27.63
KB
-rw-r--r--
user_filters.c
15.39
KB
-rw-r--r--
user_filters.stub.php
541
B
-rw-r--r--
user_filters_arginfo.h
2.45
KB
-rw-r--r--
uuencode.c
6.35
KB
-rw-r--r--
var.c
40.96
KB
-rw-r--r--
var_unserializer.c
42.18
KB
-rw-r--r--
var_unserializer.re
34.43
KB
-rw-r--r--
versioning.c
5.69
KB
-rw-r--r--
winver.h
6.23
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : net.c
/* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | https://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ #include "php.h" #include "php_network.h" #if HAVE_ARPA_INET_H # include <arpa/inet.h> #endif #if HAVE_NET_IF_H # include <net/if.h> #endif #if HAVE_GETIFADDRS # include <ifaddrs.h> #elif defined(__PASE__) /* IBM i implements getifaddrs, but under its own name */ #include <as400_protos.h> #define getifaddrs Qp2getifaddrs #define freeifaddrs Qp2freeifaddrs #define ifaddrs ifaddrs_pase #endif #ifdef PHP_WIN32 # ifndef __clang__ # include <intrin.h> # endif # include <winsock2.h> # include <ws2ipdef.h> # include <Ws2tcpip.h> # include <iphlpapi.h> #else # include <netdb.h> #endif PHPAPI zend_string* php_inet_ntop(const struct sockaddr *addr) { socklen_t addrlen = sizeof(struct sockaddr_in); if (!addr) { return NULL; } /* Prefer inet_ntop() as it's more task-specific and doesn't have to be demangled */ #if HAVE_INET_NTOP switch (addr->sa_family) { #ifdef AF_INET6 case AF_INET6: { zend_string *ret = zend_string_alloc(INET6_ADDRSTRLEN, 0); if (inet_ntop(AF_INET6, &(((struct sockaddr_in6*)addr)->sin6_addr), ZSTR_VAL(ret), INET6_ADDRSTRLEN)) { ZSTR_LEN(ret) = strlen(ZSTR_VAL(ret)); return ret; } zend_string_efree(ret); break; } #endif case AF_INET: { zend_string *ret = zend_string_alloc(INET_ADDRSTRLEN, 0); if (inet_ntop(AF_INET, &(((struct sockaddr_in*)addr)->sin_addr), ZSTR_VAL(ret), INET_ADDRSTRLEN)) { ZSTR_LEN(ret) = strlen(ZSTR_VAL(ret)); return ret; } zend_string_efree(ret); break; } } #endif /* Fallback on getnameinfo() */ switch (addr->sa_family) { #ifdef AF_INET6 case AF_INET6: addrlen = sizeof(struct sockaddr_in6); ZEND_FALLTHROUGH; #endif case AF_INET: { zend_string *ret = zend_string_alloc(NI_MAXHOST, 0); if (getnameinfo(addr, addrlen, ZSTR_VAL(ret), NI_MAXHOST, NULL, 0, NI_NUMERICHOST) == SUCCESS) { /* Also demangle numeric host with %name suffix */ char *colon = strchr(ZSTR_VAL(ret), '%'); if (colon) { *colon = 0; } ZSTR_LEN(ret) = strlen(ZSTR_VAL(ret)); return ret; } zend_string_efree(ret); break; } } return NULL; } #if defined(PHP_WIN32) || HAVE_GETIFADDRS || defined(__PASE__) static void iface_append_unicast(zval *unicast, zend_long flags, struct sockaddr *addr, struct sockaddr *netmask, struct sockaddr *broadcast, struct sockaddr *ptp) { zend_string *host; zval u; array_init(&u); add_assoc_long(&u, "flags", flags); if (addr) { add_assoc_long(&u, "family", addr->sa_family); if ((host = php_inet_ntop(addr))) { add_assoc_str(&u, "address", host); } } if ((host = php_inet_ntop(netmask))) { add_assoc_str(&u, "netmask", host); } if ((host = php_inet_ntop(broadcast))) { add_assoc_str(&u, "broadcast", host); } if ((host = php_inet_ntop(ptp))) { add_assoc_str(&u, "ptp", host); } add_next_index_zval(unicast, &u); } /* {{{ Returns an array in the form: array( 'ifacename' => array( 'description' => 'Awesome interface', // Win32 only 'mac' => '00:11:22:33:44:55', // Win32 only 'mtu' => 1234, // Win32 only 'unicast' => array( 0 => array( 'family' => 2, // e.g. AF_INET, AF_INET6, AF_PACKET 'address' => '127.0.0.1', 'netmnask' => '255.0.0.0', 'broadcast' => '127.255.255.255', // POSIX only 'ptp' => '127.0.0.2', // POSIX only ), // etc... ), ), // etc... ) */ PHP_FUNCTION(net_get_interfaces) { #ifdef PHP_WIN32 # define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x)) # define FREE(x) HeapFree(GetProcessHeap(), 0, (x)) ULONG family = AF_UNSPEC; ULONG flags = GAA_FLAG_INCLUDE_PREFIX; PIP_ADAPTER_ADDRESSES pAddresses = NULL, p; PIP_ADAPTER_UNICAST_ADDRESS u = NULL; ULONG outBufLen = 0; DWORD dwRetVal = 0; ZEND_PARSE_PARAMETERS_NONE(); // Make an initial call to GetAdaptersAddresses to get the // size needed into the outBufLen variable if (GetAdaptersAddresses(family, flags, NULL, pAddresses, &outBufLen) == ERROR_BUFFER_OVERFLOW) { FREE(pAddresses); pAddresses = (IP_ADAPTER_ADDRESSES *) MALLOC(outBufLen); } if (pAddresses == NULL) { zend_error(E_WARNING, "Memory allocation failed for IP_ADAPTER_ADDRESSES struct"); RETURN_FALSE; } dwRetVal = GetAdaptersAddresses(family, flags, NULL, pAddresses, &outBufLen); if (NO_ERROR != dwRetVal) { char *buf = php_win32_error_to_msg(GetLastError()); zend_error(E_WARNING, "GetAdaptersAddresses failed: %s", buf); php_win32_error_msg_free(buf); FREE(pAddresses); RETURN_FALSE; } array_init(return_value); for (p = pAddresses; p; p = p->Next) { zval iface, unicast; if ((IF_TYPE_ETHERNET_CSMACD != p->IfType) && (IF_TYPE_SOFTWARE_LOOPBACK != p->IfType)) { continue; } array_init(&iface); if (p->Description) { char tmp[256]; memset(tmp, 0, sizeof(tmp)); wcstombs(tmp, p->Description, sizeof(tmp)); add_assoc_string(&iface, "description", tmp); } if (p->PhysicalAddressLength > 0) { zend_string *mac = zend_string_alloc(p->PhysicalAddressLength * 3, 0); char *s = ZSTR_VAL(mac); ULONG i; for (i = 0; i < p->PhysicalAddressLength; ++i) { s += snprintf(s, 4, "%02X:", p->PhysicalAddress[i]); } *(--s) = 0; ZSTR_LEN(mac) = s - ZSTR_VAL(mac); add_assoc_str(&iface, "mac", mac); } /* Flags could be placed at this level, * but we repeat it in the unicast subarray * for consistency with the POSIX version. */ add_assoc_long(&iface, "mtu", p->Mtu); array_init(&unicast); for (u = p->FirstUnicastAddress; u; u = u->Next) { switch (u->Address.lpSockaddr->sa_family) { case AF_INET: { ULONG mask; struct sockaddr_in sin_mask; ConvertLengthToIpv4Mask(u->OnLinkPrefixLength, &mask); sin_mask.sin_family = AF_INET; sin_mask.sin_addr.s_addr = mask; iface_append_unicast(&unicast, p->Flags, (struct sockaddr*)u->Address.lpSockaddr, (struct sockaddr*)&sin_mask, NULL, NULL); break; } case AF_INET6: { ULONG i, j; struct sockaddr_in6 sin6_mask; memset(&sin6_mask, 0, sizeof(sin6_mask)); sin6_mask.sin6_family = AF_INET6; for (i = u->OnLinkPrefixLength, j = 0; i > 0; i -= 8, ++j) { sin6_mask.sin6_addr.s6_addr[j] = (i >= 8) ? 0xff : ((ULONG)((0xffU << (8 - i)) & 0xffU)); } iface_append_unicast(&unicast, p->Flags, (struct sockaddr*)u->Address.lpSockaddr, (struct sockaddr*)&sin6_mask, NULL, NULL); break; } } } add_assoc_zval(&iface, "unicast", &unicast); add_assoc_bool(&iface, "up", (p->OperStatus == IfOperStatusUp)); add_assoc_zval(return_value, p->AdapterName, &iface); } FREE(pAddresses); #undef MALLOC #undef FREE #elif HAVE_GETIFADDRS || defined(__PASE__) /* !PHP_WIN32 */ struct ifaddrs *addrs = NULL, *p; ZEND_PARSE_PARAMETERS_NONE(); if (getifaddrs(&addrs)) { php_error(E_WARNING, "getifaddrs() failed %d: %s", errno, strerror(errno)); RETURN_FALSE; } array_init(return_value); for (p = addrs; p; p = p->ifa_next) { zval *iface = zend_hash_str_find(Z_ARR_P(return_value), p->ifa_name, strlen(p->ifa_name)); zval *unicast, *status; if (!iface) { zval newif; array_init(&newif); iface = zend_hash_str_add(Z_ARR_P(return_value), p->ifa_name, strlen(p->ifa_name), &newif); } unicast = zend_hash_str_find(Z_ARR_P(iface), "unicast", sizeof("unicast") - 1); if (!unicast) { zval newuni; array_init(&newuni); unicast = zend_hash_str_add(Z_ARR_P(iface), "unicast", sizeof("unicast") - 1, &newuni); } iface_append_unicast(unicast, p->ifa_flags, p->ifa_addr, p->ifa_netmask, (p->ifa_flags & IFF_BROADCAST) ? p->ifa_broadaddr : NULL, (p->ifa_flags & IFF_POINTOPOINT) ? p->ifa_dstaddr : NULL); status = zend_hash_str_find(Z_ARR_P(iface), "up", sizeof("up") - 1); if (!status) { add_assoc_bool(iface, "up", ((p->ifa_flags & IFF_UP) != 0)); } } freeifaddrs(addrs); #else /* Should never happen as we never register the function */ ZEND_UNREACHABLE(); #endif } #endif /* }}} */
Close