This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php if (is_front_page() ) : ?> | |
| <h1>Hello World</h1> | |
| <?php endif; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // The name of the table | |
| $db_record = ''; | |
| // optional where query | |
| $where = 'WHERE 1 ORDER BY 1'; | |
| $csv_filename = 'db_export_'.$db_record.'_'.date('Y-m-d').'.csv'; | |
| $hostname = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Make a directory for global installations: | |
| mkdir ~/.npm-global | |
| #Configure npm to use the new directory path: | |
| npm config set prefix '~/.npm-global' | |
| # Open or create a ~/.profile file and add this line: | |
| export PATH=~/.npm-global/bin:$PATH | |
| # Back on the command line, update your system variables: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function getmalwaredata($s){ | |
| $movedSubstring = "301 Moved"; | |
| $url = 'www.' . $s; | |
| $ch = curl_init(); | |
| // Check for iframes | |
| $iframe = shell_exec("curl -s -X GET '{$url}' | grep iframe"); | |
| $iframeArray = explode(PHP_EOL, $iframe, -1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function getdnsdata( $x ){ | |
| $aRecords = shell_exec("dig +short {$x} a"); | |
| $aArray = explode(PHP_EOL, $aRecords,1); | |
| $mxRecords = shell_exec("dig +short {$x} mx"); | |
| $mxArray = explode(PHP_EOL, $mxRecords, -1); | |
| $txtRecords = shell_exec("dig +short {$x} txt"); | |
| $txtArray = explode(PHP_EOL, $txtRecords, -1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sed -i "s|export default {|export default {\nprops:['darkTheme'],|g" testfile.vue | |
| sed -i "s|<div class="notification is-dark">|<div v-bind:class="{'is-dark': !darkTheme}" class="notification has-text-centered">|g" testfile.vue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head></head> | |
| <body> | |
| <h2>Last 24</h2> | |
| <?php | |
| echo shell_exec("find /var/www -type f -mtime -1;"); | |
| ?> | |
| <h2>Last 48</h2> | |
| <?php | |
| echo shell_exec("find /var/www -type f -mtime -2;"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <select v-model="supervisorSelected"> | |
| <option v-for="sup in supervisors" v-bind:value="sup"> | |
| {{ sup.name }} | |
| </option> | |
| </select> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cleanUrl: function (dirtyURL){ | |
| var a = dirtyURL.toLowerCase(); | |
| if (a.startsWith("http") ) { | |
| a = a.split('/')[2]; | |
| a = a | |
| .replace('https', '') | |
| .replace('http', '') | |
| .replace('www.', '') | |
| .replace('://', '') | |
| .replace(/\/$/, '') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function getssldata( $d ){ | |
| $domain = $d; | |
| $url = "www." . $domain; | |
| $ip = gethostbyname($url); | |
| $commonName = shell_exec("openssl s_client -servername {$domain} -connect {$domain}:443 2>/dev/null | openssl x509 -noout -subject | sed -e 's/.*CN=\*.//'"); | |
| $sans = shell_exec("openssl s_client -servername {$domain} -connect {$domain}:443 2>/dev/null | openssl x509 -text | grep DNS | sed -e 's/DNS://g'"); | |
| $expireDate = shell_exec("openssl s_client -servername {$domain} -connect {$domain}:443 2>/dev/null | openssl x509 -noout -dates | grep notAfter | sed -e s#notAfter=##"); | |
| $issuer = shell_exec("openssl s_client -servername {$domain} -connect {$domain}:443 2>/dev/null | openssl x509 -noout -issuer | sed -e 's/.*CN=//' -e 's/\/OU.*//'"); | |
| $signatureAlgorith = shell_exec("openssl s_client -servername {$domain} -connect {$domain}:443 2>/dev/null | openssl x509 -noout -text | grep 'Signature Algorithm' | head -1 | sed -e 's/.*m://'"); |