Skip to content

Instantly share code, notes, and snippets.

View mhwh-dev's full-sized avatar
💭
Science is the knowledge of the universe

Edgar AP mhwh-dev

💭
Science is the knowledge of the universe
View GitHub Profile
@mhwh-dev
mhwh-dev / SteamLogin.php
Created May 12, 2023 05:35 — forked from Ehesp/SteamLogin.php
PHP Steam Login Script
<?php
/**
*
* Origin: http://forums.steampowered.com/forums/showthread.php?t=1430511
*
* @package Steam Community API
* @copyright (c) 2010 ichimonai.com
* @license http://opensource.org/licenses/mit-license.php The MIT License
*
@mhwh-dev
mhwh-dev / CentOS-Base.repo
Created March 16, 2023 11:08 — forked from yogeshlonkar/CentOS-Base.repo
CentOS 5.x yum repos
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
@mhwh-dev
mhwh-dev / ping-before-ssh.sh
Created March 6, 2023 04:43 — forked from whiler/ping-before-ssh.sh
ping before ssh
iptables --table filter --append INPUT --match conntrack --ctstate ESTABLISHED,RELATED --match comment --comment "Allow established and related connections" --jump ACCEPT
iptables --table filter --append INPUT --protocol icmp --icmp-type echo-request --match length --length 84 --match recent --set --name openSSH --rsource --match comment --comment "ping before ssh" --jump LOG --log-prefix "OpenDoor SSH: " --log-level 7
iptables --table filter --append INPUT --protocol tcp --dport ssh --syn --match recent ! --rcheck --seconds 30 --name openSSH --rsource --match comment --comment "Drop SSH connection not pinged recently" --jump DROP
@mhwh-dev
mhwh-dev / radio_streams_player.sh
Created May 16, 2022 01:52 — forked from nick3499/radio_streams_player.sh
Bash: Radio Streams Player: terminal app, play radio streams, declare associative array, FFplay, MPV, VLC
#!/bin/bash
declare -A STATION
STATION[$(printf "\e[38;2;255;160;0mDEF CON [SomaFM]\e[38;2;0;95;255m mid-tempo >> downtempo >> chill-out >> chillstep >> electro-soul >> ambient\e[0m")]='http://ice3.somafm.com/defcon-128-aac'
STATION[$(printf "\e[38;2;255;160;0mBlack Rock FM [SomaFM]\e[38;2;0;95;255m dark ambient >> desert electronic\e[0m")]='http://ice3.somafm.com/brfm-128-aac'
STATION[$(printf "\e[38;2;255;160;0mSynphaera [SomaFM]\e[38;2;0;95;255m modern electronic >> ambient >> space\e[0m")]='http://ice2.somafm.com/synphaera-128-aac'
STATION[$(printf "\e[38;2;255;160;0mDrone Zone [SomaFM]\e[38;2;0;95;255m ambient >> space\e[0m")]='http://ice2.somafm.com/dronezone-128-aac'
STATION[$(printf "\e[38;2;255;160;0mDeep Space One [SomaFM]\e[38;2;0;95;255m ambient >> space\e[0m")]='http://ice2.somafm.com/deepspaceone-128-aac'
STATION[$(printf "\e[38;2;255;160;0mSpace Station Soma [SomaFM]\e[38;2;0;95;255m downtempo >> space\e[0m")]='http://ice5.somafm.com/spacestation-128-aac'
STATION[$(printf "\e[38;2;255;160;0mSF
@mhwh-dev
mhwh-dev / local.ru
Created May 15, 2022 21:18 — forked from bluesku/local.ru
Snort # LOCAL RULES
# ' $Id: local.rules,v 1.11 2004/07/23 20:15:44 bmc Exp
# ' ----------------
# ' LOCAL RULES
# ' ----------------
# ' Copyright 2001-2013 Sourcefire, Inc. All Rights Reserved.
# '
# ' This file contains (i) proprietary rules that were created, tested and certified by
# ' Sourcefire, Inc. (the "VRT Certified Rules") that are distributed under the VRT
# ' Certified Rules License Agreement (v 2.0), and (ii) rules that were created by
# ' Sourcefire and other third parties (the "GPL Rules") that are distributed under the
@mhwh-dev
mhwh-dev / discord.msg.send.php
Created February 19, 2022 18:29 — forked from Mo45/discord.msg.send.php
PHP - Send message to Discord via Webhook
<?php
//=======================================================================================================
// Create new webhook in your Discord channel settings and copy&paste URL
//=======================================================================================================
$webhookurl = "YOUR_WEBHOOK_URL";
//=======================================================================================================
// Compose message. You can use Markdown
// Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting
@mhwh-dev
mhwh-dev / Units.swift
Created February 11, 2022 01:51 — forked from fethica/Units.swift
[Swift] Convert Bytes to Kilobytes to Megabytes to Gigabytes
public struct Units {
public let bytes: Int64
public var kilobytes: Double {
return Double(bytes) / 1_024
}
public var megabytes: Double {
return kilobytes / 1_024
@mhwh-dev
mhwh-dev / sources.list
Created January 2, 2022 11:48 — forked from h0bbel/sources.list
/etc/apt/sources.list for Ubuntu 18.04.1 LTS Bionic Beaver
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
#!/bin/sh
# For debugging use iptables -v.
IPTABLES="/sbin/iptables"
IP6TABLES="/sbin/ip6tables"
MODPROBE="/sbin/modprobe"
RMMOD="/sbin/rmmod"
ARP="/usr/sbin/arp"
<?php
function is_bot()
{
/* This function will check whether the visitor is a search engine robot */
$botlist = array("Teoma", "alexa", "froogle", "Gigabot", "inktomi",
"looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory",
"Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot",
"crawler", "www.galaxy.com", "Googlebot", "Scooter", "Slurp",
"msnbot", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz",