Skip to content

Instantly share code, notes, and snippets.

@riordanz
riordanz / list.sh
Created May 6, 2017 11:34
list user
#!/bin/bash
clear
echo "Created By : FreeDroid"
echo "=========================================";
echo "USERNAME EXP DATE "
echo "=========================================";
while read mumetndase
do
AKUN="$(echo $mumetndase | cut -d: -f1)"
@riordanz
riordanz / mem.sh
Created May 6, 2017 11:32
memory swap
#!/bin/bash
FREE=`free -m | grep "buffers/cache" | awk '{print $3}'`
SWAP=`free -m | grep "Swap" | awk '{print $3}'`
UP=`uptime`
echo $FREE
echo $SWAP
echo $UP
echo "Created By : FreeDroid"
@riordanz
riordanz / speedtest.sh
Created May 6, 2017 11:31
script for test speed
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2012-2014 Matt Martz
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@riordanz
riordanz / login.sh
Last active May 6, 2017 11:30
User Login
#!/bin/bash
clear
echo "Created By : FreeDroid"
echo "=========================================";
data=( `ps aux | grep -i dropbear | awk '{print $2}'`);
echo "Memeriksa User Dropbear Yang Login";
echo "(ID - Username - IP)";
echo "-----------------------------------------";
@riordanz
riordanz / limit.sh
Created May 6, 2017 11:23
Pembatas Login
#!/bin/bash
# Program untuk membatasi jumlah login user dropbear
PARAM=$1
clear
echo -n > /tmp/pid2
ps ax|grep dropbear > /tmp/pid
cat /tmp/pid | grep -i 'dropbear -p' > /tmp/pids
cat /var/log/auth.log | grep -i "Password auth succeeded" > /tmp/sks
perl -pi -e 's/Password auth succeeded for//g' /tmp/sks
#!/bin/bash
clear
if [ $(id -u) -eq 0 ]; then
read -p "Masukan username : " username
read -p "Masukan password : " password
read -p "Expired (yyyy-mm-dd) : " expired
egrep "^$username" /etc/passwd >/dev/null
if [ $? -eq 0 ]; then
echo "Username $username sudah ada di VPS anda!"
@riordanz
riordanz / menu.sh
Last active May 6, 2017 11:25
Menu Script FreeDroid
#!/bin/bash
echo "============================"
echo "|======Command List========|"
echo "============================"
echo "new : untuk membuat akun baru"
echo "list : untuk melihat daftar akun"
echo "login : untuk melihat akun yang login"
echo "mem : untuk check RAM"
echo "test : untuk check speed VPS"
echo "kill : untuk kill user nakal, cara gunain : kill -9 userid"