Skip to content

Instantly share code, notes, and snippets.

View goeroeku's full-sized avatar

Agus Indra Cahaya goeroeku

View GitHub Profile
@goeroeku
goeroeku / findshell.pl
Last active October 21, 2021 22:30
Script to search for php shell. `for i in /srv/www/htdocs/ ; do perl findshell.pl 10 $i >> scanout.txt ; done`
#!/usr/bin/perl -w
# findshell v1.0 == code taken/modified from traps.darkmindz.com
#usage: ./findshell.pl
use strict;
use File::Find;
my $sens = shift || 10;
my $folder = shift || './';
find(\&backdoor, "$folder");
sub backdoor {
if ((/\.(php|txt)/)){
@goeroeku
goeroeku / docker-install-ubuntu.sh
Last active October 4, 2021 23:30
IDCH Docker Installation
#!/bin/bash
sudo apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
@goeroeku
goeroeku / main.go.md
Last active September 9, 2021 14:41
Golang STMP Without TLS

Script GoLang SMTP without TLS, used to test Postal Mail Server

package main

import (
	"crypto/tls"
	"errors"
	"log"
	"net/smtp"
@goeroeku
goeroeku / aes-256-cbc.js
Created April 12, 2021 08:15 — forked from siwalikm/aes-256-cbc.js
AES-256-CBC implementation in nodeJS with built-in Crypto library
'use strict';
const crypto = require('crypto');
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key
const IV = "5183666c72eec9e4"; // set random initialisation vector
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex');
const phrase = "who let the dogs out";
var encrypt = ((val) => {
@goeroeku
goeroeku / encryption.js
Created April 8, 2021 00:54 — forked from vlucas/encryption.js
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@goeroeku
goeroeku / jquery.slider.custom.step.js
Created February 3, 2021 23:19 — forked from thiyagaraj/jquery.slider.custom.step.js
jQuery UI slider, custom step or snap points
//This should have each valid amount that can be selected in the slider
var sliderAmountMap = [10000, 20000,30000, 40000, 45000,50000,65000];
$(function() {
$( "#slider" ).slider({
value: 4, //array index of onload selected default value on slider, for example, 45000 in same array will be selected as default on load
min: 0, //the values will be from 0 to array length-1
max: sliderAmountMap.length-1, //the max length, slider will snap until this point in equal width increments
@goeroeku
goeroeku / config-one-click.sh
Last active September 21, 2021 04:12
IDCH One Install Mailcoach
#!/bin/bash
#
# Mailcoach activation script
#
# This script will configure Apache with the domain
# provided by the user and offer the option to set up
# LetsEncrypt as well.
# Enable Mailcoach on firstlogin
echo "This script will copy the Mailcoach installation into"
@goeroeku
goeroeku / default.conf
Last active December 3, 2020 14:10
Nginx server block untuk proxy nodejs
server {
server_name nodejs.idch.my.id;
location / {
proxy_pass http://localhost:3000; #whatever port your app runs on
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
@goeroeku
goeroeku / app.js
Created October 24, 2020 07:15
Panduan menggunakan NodeJS pada Private Cloud IDCH
const http = require('http');
const hostname = '0.0.0.0';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World');
});
@goeroeku
goeroeku / docker-compose.yml
Last active October 17, 2020 19:08
Panduan installasi wordpress pada docker - IDCH
version: '3.1'
services:
wordpress:
image: wordpress
restart: always
ports:
- 80:80
environment: