File tree Expand file tree Collapse file tree 11 files changed +22
-0
lines changed Expand file tree Collapse file tree 11 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ extension_loaded pcap
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810var_dump (extension_loaded ('pcap ' ));
911
1012print "done! " ;
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ stream_get_wrappers pcap
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810var_dump (in_array ('pcap ' , stream_get_wrappers ()));
911
1012print "done! " ;
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ fopen devices from net_get_interfaces
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810$ devs = 0 ;
911
1012foreach (array_keys (net_get_interfaces ()) as $ dev ) {
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ fopen against bogus devices
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810$ fp = fopen ('pcap:// ' . uniqid ('bogus ' ), 'r ' );
911var_dump ($ fp );
1012
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ fopen against bogus URLs
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810$ dev = current (array_keys (net_get_interfaces ()));
911if (!$ dev ) {
1012 die ('Cannot find any viable network devices ' );
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ fopen without privileges
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810$ dev = current (array_keys (net_get_interfaces ()));
911if (!$ dev ) {
1012 die ('Cannot find any viable network devices ' );
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ fread ICMP ping traffic
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810require ('helpers.php ' );
911
1012$ ip = gethostbyname ('example.com ' );
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ fread UDP DNS traffic
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810require ('helpers.php ' );
911
1012// Use OpenDNS public nameservers
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ fread TCP HTTP traffic
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810require ('helpers.php ' );
911
1012$ ip = gethostbyname ('example.com ' );
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ fwrite/fread ARP to IPv4 gateway
55--FILE--
66<?php
77
8+ declare (strict_types = 1 );
9+
810require ('helpers.php ' );
911
1012$ dev = $ gw = null ;
You can’t perform that action at this time.
0 commit comments