Skip to content

Instantly share code, notes, and snippets.

@netwons
netwons / cidr-whois.sh
Created Jan 16, 2022 — forked from stevemcilwain/cidr-whois.sh
Recon - CIDR with whois
View cidr-whois.sh
# 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 Dec 15, 2020 — forked from sergomet/GoogleDriveServiceProvider.php
Setup a Laravel Storage driver with Google Drive API
View GoogleDriveServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
View index.html
<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"
View laravel
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
View laravel
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
View loginfull.php
<?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){
View alogin.php
<?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);
View result.php
<?php
if(isset($_GET['idq'])){
$query=" SELECT * FROM m1 WHERE id=" .$_GET['idq'];
$result =mysqli_query($connection,$query);
$row=mysqli_fetch_assoc($result);
}
View edit.php
<?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";}
View select.php
<?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"];