Skip to content

Instantly share code, notes, and snippets.

@mnathani
mnathani / dns-investigate.php
Created March 9, 2018 02:33
dns-investigate.php
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
if(isset( $_GET["Domain"])){
$domain=$_GET["Domain"];
@mnathani
mnathani / rc.conf
Created March 9, 2018 02:26
Working FreeBSD Network config with ARP Networks Routed /48 IPv6 Space /etc/rc.conf
[root@fire ~]# cat /etc/rc.conf
hostname="fire.winvive.com"
ifconfig_vtnet0="inet 206.162.242.66 netmask 255.255.255.252"
defaultrouter="206.162.242.65"
#ipv6_activate_all_interfaces="YES"
ifconfig_vtnet0_ipv6="inet6 FE80::2 prefixlen 64"
ifconfig_vtnet0_alias0_ipv6="inet6 2607:f2f8:ac88::/64"
ipv6_defaultrouter="FE80::1%vtnet0"
sshd_enable="YES"
local_unbound_enable="YES"
[root@fire ~]# cat /etc/rc.conf
hostname="fire.winvive.com"
ifconfig_vtnet0="inet 206.162.242.66 netmask 255.255.255.252"
defaultrouter="206.162.242.65"
ipv6_activate_all_interfaces="YES"
ifconfig_vtnet0_alias0="inet6 2607:f2f8:ac88:: prefixlen 64"
ifconfig_vtnet0_alias1="inet6 FE80::2 prefixlen 64"
ipv6_defaultrouter="FE80::1%vtnet0"
sshd_enable="YES"
local_unbound_enable="YES"
@mnathani
mnathani / gist:33d95483fa406c9ee64ae68aac1067c1
Created February 25, 2018 05:03
Proxmox etc/network/interfaces
auto lo
iface lo inet loopback
iface enp1s0f0 inet manual
iface enp1s0f1 inet manual
auto vmbr0
iface vmbr0 inet static
address 206.162.242.67
@mnathani
mnathani / gist:b085ff53118b5c10249b6ea9c784c09c
Created January 13, 2018 03:06
Eyes please php cli first attempt
<?php
//stream_set_blocking(STDIN, 0);
//$f = fgets(STDIN);
//var_dump($f);
echo "Domain,A Record,PTR Record of A,WWW Record,Nameservers,MX Records,A Record of MX,PTR Record of A of MX\n";
while (($ind = fgets(STDIN)) !== false) {
$ind=trim($ind);
@mnathani
mnathani / gist:13425d3927bc43eb7a92ccfea7ba9034
Created December 25, 2017 00:26
Proxmox Install Errors:
Errors were encountered while processing:
pve-firewall
qemu-server
proxmox-ve
pve-manager
pve-ha-manager
pve-container
E: Sub-process /usr/bin/dpkg returned an error code (1)
@mnathani
mnathani / gist:5d989d5fc1db6be58f728919c12e102d
Created December 10, 2017 14:28
sysbench Liquidweb Dedicated box
[root@ether ~]# sysbench --num-threads=1 --test=memory --memory-total-size=2G run
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
sysbench 1.0.9 (using system LuaJIT 2.0.4)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Running memory speed test with the following options:
root@fire:/home # sysbench --num-threads=1 --test=memory --memory-total-size=2G run
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
sysbench 1.0.9 (using system LuaJIT 2.0.5)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Running memory speed test with the following options:
@mnathani
mnathani / gist:ae9dacf7a09296dc86ea94fa5e8076ec
Created September 14, 2017 02:39
Full code PHP csv / bulk DNS
<?php
set_time_limit(-1);
if (isset($_POST['outputkind']))
{
if($_POST['outputkind']=="screen")
{
//echo "screen";
@mnathani
mnathani / gist:15ff1250cdc6cf5e496f66361788346e
Created September 14, 2017 02:27
Strange String behavior
$inmxaptrhtml="";
foreach($mxip as $mxipline2)
{
exec("/usr/bin/dig -x ".escapeshellarg($mxipline2)." +short", $inmxip);
$inmxaptrhtml.=$inmxip[0]."<br/>";
unset($inmxip);
}