Results 1 to 50 of 70

Thread: adstar Wordlist Generator v1.0

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    2013-Jun
    Posts
    125
    Quote Originally Posted by Nick_the_Greek View Post
    Hi thepoor.

    Look at to your parent directory plus /root/adstar/
    adstar.tar extracts it's contents to your current directory plus /root/adstar/ take a look:
    Code:
    root@kali:~# tar xvf adstar.tar
    root/adstar/adstar
    root/adstar/adstar.sh
    root/adstar/adstar-HOW TOS.txt
    root@kali:~# cd /root/root/adstar
    root@kali:~/root/adstar# pwd
    /root/root/adstar
    @repzeroworld
    My friend, maybe it's a good idea to change adstar.tar to extract it's contents to parent directory plus adstar folder and not /root/adstar/
    I was trying to compress all file into .tar file but i notice that .tar file is placing the adstar folder in a "/root" folder...any ideas Nick on the command line you use to compress..? it could be my command line arguments i am using to compress....

  2. #2
    Join Date
    2014-Jun
    Location
    Greece
    Posts
    133
    Hi repzeroworld,

    Just don't give the full path to adstar folder. Take a look:
    Code:
    root@kali:~/root# ls
    adstar Desktop
    root@kali:~/root# tar -cvf adstar.tar adstar
    adstar/
    adstar/adstar-HOW TOS.txt
    adstar/adstar.sh
    adstar/adstar
    but if you do:
    Code:
    root@kali:~# ls
    adstar  Desktop
    root@kali:~# tar -cvf adstar.tar /root/adstar
    tar: Removing leading `/' from member names
    /root/adstar/
    /root/adstar/adstar-HOW TOS.txt
    /root/adstar/adstar.sh
    /root/adstar/adstar
    and if you extract adstar.tar then the extracted contents will placed at parent directory plus /root/adstar/.

    if you want better compression ration you can use bz2 algorithm:
    Code:
    tar cjf adstart.tar.bz2 adstar
    also you can change this:
    Code:
    ##Let's see...determine my working directory
    script_dir=`dirname "$0"`;
    if [ -e "$script_dir/adstar" ];then
    cd ~;
    cp -f "$script_dir/adstar" /etc/;
    fi
    if [ ! -e "$script_dir/adstar" ];then
    echo "Exiting...adstar program not found within this script's directory";
    exit
    fi
    ....
    .....
    to this:
    Code:
    #!/bin/bash
    ##Let's see...determine my working directory
    script_dir=`pwd`
    
    if [ -e "$script_dir" ];then
    	cp -f "$script_dir/adstar" /etc/adstar
    else
    	echo "Exiting...adstar program not found within this script's directory"
    	exit 1
    fi
    
    ##adding directory path to .bashrc file
    path_check=`cat /root/.bashrc| grep -F 'export PATH=/etc:$PATH'`
    if [ -n "$path_check" ]; then
    	echo -e "\e[32m\e[1mexisting adstar path found...."
    	sleep 1
    	echo "continuing..."
    	sleep 1
    else
    	echo "export PATH=/etc:"$PATH"" >> /root/.bashrc
    	source /root/.bashrc
    fi
    echo "Successful!...."
    echo "To use adstar type 'adstar <command line>' in terminal!"
    ###
    basically it's almost the same thing but I like it most this way
    Last edited by Nick_the_Greek; 2014-10-18 at 11:10. Reason: new adstar.sh
    Security always begins with personal responsibility. - quietman7

  3. #3
    Join Date
    2013-Jun
    Posts
    125
    Quote Originally Posted by Nick_the_Greek View Post
    Hi repzeroworld,

    Just don't give the full path to adstar folder. Take a look:
    Code:
    root@kali:~/root# ls
    adstar Desktop
    root@kali:~/root# tar -cvf adstar.tar adstar
    adstar/
    adstar/adstar-HOW TOS.txt
    adstar/adstar.sh
    adstar/adstar
    but if you do:
    Code:
    root@kali:~# ls
    adstar  Desktop
    root@kali:~# tar -cvf adstar.tar /root/adstar
    tar: Removing leading `/' from member names
    /root/adstar/
    /root/adstar/adstar-HOW TOS.txt
    /root/adstar/adstar.sh
    /root/adstar/adstar
    and if you extract adstar.tar then the extracted contents will placed at parent directory plus /root/adstar/.

    if you want better compression ration you can use bz2 algorithm:
    Code:
    tar cjf adstart.tar.bz2 adstar
    also you can change this:
    Code:
    ##Let's see...determine my working directory
    script_dir=`dirname "$0"`;
    if [ -e "$script_dir/adstar" ];then
    cd ~;
    cp -f "$script_dir/adstar" /etc/;
    fi
    if [ ! -e "$script_dir/adstar" ];then
    echo "Exiting...adstar program not found within this script's directory";
    exit
    fi
    ....
    .....
    to this:
    Code:
    #!/bin/bash
    ##Let's see...determine my working directory
    script_dir=`pwd`
    
    if [ -e "$script_dir" ];then
    	cp -f "$script_dir/adstar" /etc/adstar
    else
    	echo "Exiting...adstar program not found within this script's directory"
    	exit 1
    fi
    
    ##adding directory path to .bashrc file
    export PATH=$PATH
    path_check=`cat /root/.bashrc| grep -F 'export PATH=/etc:$PATH'`
    if [ -n "$path_check" ]; then
    	echo -e "\e[32m\e[1mexisting adstar path found...."
    	sleep 1
    	echo "continuing..."
    	sleep 1
    else
    	echo "export PATH=/etc:"$PATH"" >> /root/.bashrc
    	source /root/.bashrc
    fi
    echo "Successful!...."
    echo "To use adstar type 'adstar <command line>' in terminal!"
    ###
    basically it's almost the same thing but I like it most this way
    COMPRESSION WITH TAR (I SEE)
    i see when using tar it is the path directories being created..THANKS(i think the tar help menu should be a little more detailed with this..haven't made time to expirement with tar compression feature)

    CHANGING "dirname" to "pwd"
    changing dirname $0 to pwd will only store WORKING directory into variable and this can cause problems with locating the actual adstar folder is..let us take a look at what happen

    USING A MODIFIED SCRIPT BELOW WITH "PWD" WILL CAUSE SCRIPT NOT TO DETECT WORKING DIRECTORY OF SCRIPT

    YOUR CODES

    #!/bin/bash
    ##Let's see...determine my working directory
    script_dir=`pwd`
    echo "$script_dir";

    RESULTS

    root@kali:~# '/root/adstar/ad.sh'
    /root #parent working directory and not the script working directory..remember this part of the code is to detect if adstar is in the SCRIPT'S WORKING DIRECTORY (in case someone move it)


    MY CODES

    #!/bin/bash
    root@kali:~# '/root/adstar/ad.sh'
    /root/adstar

    ##Let's see...determine my working directory
    script_dir=`dirname $0`
    echo "$script_dir";

    RESULTS
    root@kali:~# '/root/adstar/ad.sh'

    /root/adstar #WORKING DIRECTORY OF SCRIPT WHICH SHOULD ALSO HAVE ADSTAR PROGRAM..SUCESSFUL DECTECTION

  4. #4
    Join Date
    2013-Jun
    Posts
    125
    TO:NICK_THE_GREEK
    whenever i am doing an updated version of adstar I WILL COMPRESS THIS WAY WITHOUT PATH DIRECTORY..CHEERS

  5. #5
    Join Date
    2014-Jun
    Location
    Greece
    Posts
    133
    Quote Originally Posted by repzeroworld View Post
    COMPRESSION WITH TAR (I SEE)
    i see when using tar it is the path directories being created..THANKS(i think the tar help menu should be a little more detailed with this..haven't made time to expirement with tar compression feature)

    CHANGING "dirname" to "pwd"
    changing dirname $0 to pwd will only store WORKING directory into variable and this can cause problems with locating the actual adstar folder is..let us take a look at what happen

    USING A MODIFIED SCRIPT BELOW WITH "PWD" WILL CAUSE SCRIPT NOT TO DETECT WORKING DIRECTORY OF SCRIPT

    YOUR CODES

    #!/bin/bash
    ##Let's see...determine my working directory
    script_dir=`pwd`
    echo "$script_dir";

    RESULTS

    root@kali:~# '/root/adstar/ad.sh'
    /root #parent working directory and not the script working directory..remember this part of the code is to detect if adstar is in the SCRIPT'S WORKING DIRECTORY (in case someone move it)


    MY CODES

    #!/bin/bash
    root@kali:~# '/root/adstar/ad.sh'
    /root/adstar

    ##Let's see...determine my working directory
    script_dir=`dirname $0`
    echo "$script_dir";

    RESULTS
    root@kali:~# '/root/adstar/ad.sh'

    /root/adstar #WORKING DIRECTORY OF SCRIPT WHICH SHOULD ALSO HAVE ADSTAR PROGRAM..SUCESSFUL DECTECTION
    Man, I understand what are saying but you must test again you sh script. Since you are suggesting in your adstar-HOW TOS.txt to:
    1. Execute adstar.sh bash script in a terminal. This script will install
    adstar to your terminal .bashrc file so that you can use the adstar
    program from the terminal.
    command:
    #bash adstar.sh
    that require to be into the adstar directory.
    Let's see again:
    Code:
    root@kali:~# cd adstar
    root@kali:~/adstar# ls
    adstar  adstar-HOW TOS.txt  adstar.sh
    root@kali:~/adstar# bash adstar.sh
    cp: omitting directory `./adstar'
    existing adstar path found....
    continuing...
    Successful!....
    To use adstar type 'adstar <command line>' in terminal!
    root@kali:~/adstar# adstar
    bash: adstar: command not found
    adstar was not copied to /etc/ and in .bash file was added the line that you want BUT $PATH was added as a word not as an variable, which look like this:
    Code:
    # enable programmable completion features (you don't need to enable
    # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
    # sources /etc/bash.bashrc).
    if ! shopt -oq posix; then
      if [ -f /usr/share/bash-completion/bash_completion ]; then
        . /usr/share/bash-completion/bash_completion
      elif [ -f /etc/bash_completion ]; then
        . /etc/bash_completion
      fi
    fi
    -e 
    export PATH=/etc:$PATH
    See? Are you running your sh script in a different OS than Kali?
    The same results are coming when I extract you .tar file to a different location let's say /root/Desktop/
    Code:
    root@kali:~/Desktop# cd adstar
    root@kali:~/Desktop/adstar# ls
    adstar  adstar-HOW TOS.txt  adstar.sh
    root@kali:~/Desktop/adstar# bash adstar.sh
    cp: cannot stat `./adstar': No such file or directory
    Exiting...adstar program not found within this script's directory
    Anyway. Run it your self in Kali and you will found your way.
    Glad I helped with tar.
    Keep up you good work repzeroworld!
    Security always begins with personal responsibility. - quietman7

Similar Threads

  1. Custom Wordlist Generator
    By St0ner1995 in forum Development Archive
    Replies: 1
    Last Post: 2016-12-08, 13:53
  2. Cewl Wordlist-Generator // German-Umlauts
    By bastian in forum General Archive
    Replies: 1
    Last Post: 2014-11-02, 11:50
  3. Wordlist generator and remover
    By magnum199547 in forum General Archive
    Replies: 7
    Last Post: 2013-09-05, 13:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •