Skip to content

Instantly share code, notes, and snippets.

@netwons
netwons / cidr-whois.sh
Created January 16, 2022 20:48
Recon - CIDR with whois
# For every domain in file domains.txt, print CIDR and Organization (one-liner):
for DOMAIN in $(cat domains.txt);do echo $(for ip in $(dig a $DOMAIN +short); do whois $ip | grep -e "CIDR\|Organization" | tr -s " " | paste - -; d
one | uniq); done
@netwons
netwons / GoogleDriveServiceProvider.php
Created December 15, 2020 13:58 — forked from sergomet/GoogleDriveServiceProvider.php
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@netwons
netwons / index.html
Created April 7, 2019 15:08
InvalidHLS
<html>
<head>
<!-- Load dependent stylesheets. -->
<link href="//aws-cdn.terrafox.com/videojs/latest/video-js.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-ads/6.6.1/videojs-contrib-ads.css" />
<link rel="stylesheet" href="//googleads.github.io/videojs-ima/dist/videojs.ima.css" />
</head>
<body>
<video id="content_video" class="video-js vjs-default-skin"
Problem 1
- Installation request for calcinai/xero-php ^1.7 -> satisfiable by calcinai/xero-php[v1.7.0].
- calcinai/xero-php v1.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/15-xml.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
Problem 1
- Installation request for calcinai/xero-php ^1.7 -> satisfiable by calcinai/xero-php[v1.7.0].
- calcinai/xero-php v1.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/15-xml.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
<?php
$username=$_POST['username'];
$password=$_POST['password'];
//$d=encript($password);
$query=" SELECT * FROM register WHERE username='$username' AND password='$password'";
echo $query;
$result=mysqli_query($connection,$query);
$count=mysqli_num_rows($result);
if($count==1){
<?php
if(isset($_POST['login'])){
$username=mysqli_real_escape_string($connection,$_POST['username']);
$password=mysqli_real_escape_string($connection,$_POST['password']);
$query=" SELECT * FROM register WHERE username='$username' password='$password' ";
echo $query;
$result=mysqli_query($connection,$query);
$d=encript($password);
<?php
if(isset($_GET['idq'])){
$query=" SELECT * FROM m1 WHERE id=" .$_GET['idq'];
$result =mysqli_query($connection,$query);
$row=mysqli_fetch_assoc($result);
}
@netwons
netwons / edit.php
Last active January 18, 2018 09:10
<?php
if(isset($_POST['edit'])){ ///این دکمه edit است
$name=$_POST['name'];
$lastname=$_POST['lastname'];
$update=" UPDATE m1 SET name='$name', lastname='$lastname' WHERE id=" . $_GET['idq'];
$up=mysqli_query($connection,$update);
if($up){
header("Location: select.php");
}else{echo "error";}
<?php
function select(){
global $connection;
$query = " SELECT * ";
$query .= " FROM m1 ";
$result = mysqli_query($connection,$query);
while($row=mysqli_fetch_assoc($result)){
$output = $row["id"] ;
$output .= $row["name"] ;
$output .= $row["lastname"];