Fresh Grasshopper Seeking Knowledge on inputing awk scripts and working with them?
Hey people people,
I am a new grasshopper willing to learn from the masters. I type a lot when I am nervous!
I have pulled tons of info off here in the last week concerning awk. I know nothing about awk, I mean nuthin. I have started work as the guy below the lowest man on the totumpole as a cyber security tech. I have a LOT to learn. I need to get a grip on awk. I decided after it was suggested to make me a cheatsheet with some commands. I found this forum and started working pulling what I saw and playing with it. Some of the things I need to be able to do concerns Nmap and wordlists.
I grabbed some info I tried but I don't even know how to use them in a terminal. If I could get someone to help me out some. I need to know how to take a text document, something like a short story that was copied and pasted into a text file and make it into a wordlist (one word per line) then remove the duplicates and be able to run it in any password cracker. I have to be able to do each one as a step.
Here is what my boss gave me. He copied a short story and put it in a text file. He has a test server that I must crack. He said not to bruteforce it (I wasn't ready for that) but he gave me a short story on a text file. He said the password for the server was in this story. I have to break the story down into a wordlist with no duplicates and get into the server where he has a file with my name on it and inside this file is an email address where I have to email it before a certain date and time.
I searched out a lot on here because I want to get it on my own. But I need help.
The last thing is, where is a site or a book title where I can read up on awk at it's most basic level. I would like to take what you help me with and break it down to get a much better understanding.
--- Post updated at 06:55 PM ---
I'm sorry. I read the response and thought it was something in general about posting code. So I overlooked it.
and please please calm down. Careful and concise phrasing of your request, plus giving decent, detailed data samples, will increase your chances to get relevant answers to your question.
I, for instance, have no idea how you are to "crack the server" with a wordlist, not getting into or at least close to brute force. What in the wordlist will be the username? What the password? How will the server react after n failed login attempts - close the line? Slow down the line?
For a word list, you don't need awk at all. Try (with your above post in "textfile")
Regarding your last question, these links might be useful:
I have the username. I am not sure if I follow. If your saying the code I posted will work then I am doing something wrong. I have used it many ways in a terminal but got no where.
An always ready reference book comes with your system too. The man utility gives you access to the manual pages for the utilities and library routines available on your system. For example, to get details on how awk works, type the command:
into your shell. And, to get more information on how man works, try:
So <inputfile tr -s' ,.'$'\n' translates characters one-by-one as given by its arguments while reading from inputfile. -s tells tr to squeeze any number of spaces, commas, and periods in a row into one single newline character.
Then | feeds its input into sort -u, which sorts them alphabetically and excludes any duplicates. Not having been redirected anywhere else, it outputs to the terminal.
Hi,
Recently we migrated our app from Unix to Linux platform. All our shell scripts which use to work in Unix platform are not working in Linux now.
below is such sample script. I tried removing trailing spaces, but no luck. dear experts kindly help..
#############BEGIN###############
split... (7 Replies)
Hi,
I have a .csv file that contains a variety of fields for 60 clients: USERNAME, PASSWORD, and COMMENTS. I have a template file which contains a great deal of data for each client and has the fields USERNAME, PASSWORD, and COMMENTS that has to be filled with the values of USERNAME,... (1 Reply)
Hi,
Putting across a few awk expressions.
Apart from the last, all of them are working.
echo a/b/c | awk -F'/b/c$' '{print $1}'
a
echo a/b/c++ | awk -F'/b/c++' '{print $1}'
a
echo a/b/c++ | awk -F'/b/c++$' '{print $1}'
a/b/c++
Request thoughts on why putting a '$' post double ++... (12 Replies)
Hi Gurus,
I have a test unix server in which currently some unix cronjob are running.
I have written two script one is a shell script in which env variable are there (in that i am exporting those variables).
I have also written a perl script .
when i am running at the shell manually like... (5 Replies)
hi all, i have scripts executable in manully, but not working in cron. any ideas? thanks a lot?
* * * * * /home/dir/dir/file.sh
#! /bin/sh
alarmPath="/home/dir/monitoringAlarm"
alarmDateTime="$(date +%Y%m%d) $(date +%H%M%S)"
tomcatPID=`pidof /usr/local/jdk1.6.0_13/bin/java`
echo "tomcat... (3 Replies)
hi all, i have scripts executable in manully, but not working in cron. any ideas? thanks a lot?
* * * * * /home/dir/dir/file.sh
#! /bin/sh
alarmPath="/home/dir/monitoringAlarm"
alarmDateTime="$(date +%Y%m%d) $(date +%H%M%S)"
tomcatPID=`pidof /usr/local/jdk1.6.0_13/bin/java`
echo "tomcat... (1 Reply)
Hi All,
PF below details,
> cat run.sh
#!/usr/bin/ksh
alias ll="ls -l"
> ./run.sh
> ll
ksh: ll: not found.
Pls help on this?
Thanks in Advance,
Naga :cool: (2 Replies)
hi,
i am writing a script
ssh root@192.168.0.200 ls -l ,
ssh always prompts me to enter a password,
how to suppress it ,just like using rsh
thanks (3 Replies)
I had to write a script to change my login password, and the script wasnt working fine. When I searched through the previous postings in this forum, I got the solution (using 'expect' tool).
But I would like to know why passwd command isnt working in scripts? (1 Reply)