Pemrograman dengan Bash & Python di Termux

Pemrograman dengan Bash & Python di Termux - Nyx6st

Pemrograman dengan Bash & Python di Termux

Artikel ini akan membahas dari artikel sebelumnya
git dan kontrol versi

Author: Nyx6st


Pendahuluan

Termux bukan hanya terminal, tapi juga lingkungan pemrograman powerful. Dua bahasa yang paling sering digunakan di Termux adalah Bash (shell scripting) dan Python. Artikel ini akan membahas cara menulis, menjalankan, dan mengelola skrip dengan dua bahasa tersebut.

Menulis Bash Script

Bash digunakan untuk automasi tugas-tugas di terminal. Contoh sederhana:



nano hello.sh

    

Isi file:



#!/data/data/com.termux/files/usr/bin/bash

echo "Halo, ini script Bash pertamaku!"

    

Jalankan perintah:



chmod +x hello.sh

./hello.sh

    

Instalasi Python

Python biasanya sudah tersedia di Termux. Jika belum:



pkg install python

    

Cek versi:



python --version

    

Menulis Skrip Python

Buat file Python baru:



nano hello.py

    

Isi file:



print("Halo dunia dari Python di Termux!")

    

Jalankan:



python hello.py

    

Modul Python & Pip

Untuk menginstall pustaka Python:



pip install requests

pip install beautifulsoup4

    

Lalu buat skrip scraping atau automasi dengan modul tersebut.

Menjalankan Otomatis

Gabungkan Python dan Bash untuk workflow yang otomatis:



#!/data/data/com.termux/files/usr/bin/bash

python scriptku.py

echo "Selesai menjalankan Python!"

    

Simpan sebagai `run.sh`, lalu buat bisa dieksekusi:



chmod +x run.sh

./run.sh  

    

Penutup

Dengan Bash dan Python di Termux, kamu bisa membangun tool, mengautomasi tugas, atau bahkan membuat crawler dan exploit sederhana.


Artikel selanjutnya
Tools Hacking dan Pentesting di termux

Post a Comment

Lebih baru Lebih lama

Mengenai Saya

Foto saya
6ickzone
I've been deep in the world of cybersecurity, crypto, AI, and hacking for years. This blog is where I share my journey, tools, tips, and everything I learn along the way. But beyond code and exploits, there's also rhythm. I'm also exploring the digital soundscape — producing beats, fusing dark tech vibes with trap, drill, and EDM. Music is my second language, and it's where I channel the energy of the underground digital world. From my early days as a defacer to my current focus on ethical hacking and experimental music, I’m building 6ickzone as a hybrid space where hacking meets art. Why 6ickzone? 6ickzone is more than just a blog — it's a realm where hackers, beatmakers, and digital renegades gather. Whether you're here for the tools or the tunes, welcome to the zone.
Lihat profil lengkapku

Cari Blog Ini

About