Government Security
Network Security Resources

Jump to content

Photo

Simple Elink One Line Method

- - - - - linux beginner advanced cgi shell
  • Please log in to reply
5 replies to this topic

#1 Kenny

Kenny

    Former Commander In Chief

  • Retired Admin
  • 6,747 posts

Posted 31 December 2007 - 08:43 AM

This is a very easy to do couple of script aimed at beginners using an alternative to the likes of curl , wget or lynx

for this i am using Elinks very similar to lynx txt browser

http://elinks.or.cz/


and Scroogle search engine

http://scroogle.org/

ELinks is an advanced and well-established feature-rich text mode web (HTTP/FTP/..) browser. ELinks can render both frames and tables, is highly customizable and can be extended via Lua or Guile scripts. It is very portable and runs on a variety of platforms. Check the about page for a more complete description.

ELinks is an Open Source project covered by the GNU General Public License. It originates from the Links project written by Mikulas Patocka, and it is currently maintained by Jonas Fonseca.


i have decided to use two methods one opens the txt browser the other saves the links as a normal in bash script format...

first download Elinks

my linux input is

sudo apt-get install elinks

others differ

once downloaded open a terminal and type: touch google.sh and touch scroogle.sh your two demo files

this creates the files follow next for both files below

at the terminal again type pico google.sh or what ever editor you use

then add this to the file am using Scroogle search engine already parsed

# Simple Scroogle  shell script search 
# by Kenny GSO
# date:31.12.2007
# 
# Script for quick Google search
# This method will open the txt browser with parsed results
# To use, type ./google.sh  then your search terms 

elinks "http://www.scroogle.org/cgi-bin/nbbw.cgi?Gw=$*"

save it .... then to make it execute type in

chmod u+x google.sh

now depending on your flavour you can now run it... in my case like this am going to do a search for "index of root"

$ ./google.sh index of:root

results are

Attached File  Screenshot_index_of_root___Google_Search___ELinks___Shell___Konsole.png   94.22KB   145 downloads


another example below is of a bash script and save results to file: follow above and name it scroogle.sh

#!/bin/bash
# scroogle.sh new saved touch script
# Simple Scroogle  shell script bash search 
# by Kenny GSO
# date:31.12.2007 
# first note am using elinks because am showing two methods for the demo
# download `sudo apt-get install elinks` just an alternative to wget,curl etc 
# elink will grab the results and save them to result.txt..simple
# note scroogle is a ready parsed google search engine 
# method two will use elinks browser similar to lynx txt browser

elinks  "http://www.scroogle.org/cgi-bin/nbbw.cgi?Gw=$*" > result.txt

#END

out put for later analaysis is

Attached File  Screenshot_result.txt____test____gedit.png   86.08KB   140 downloads

anyway just a bit of one line use from the shell to use ...if you put them in the /bin/bash folder then you dont have to change directory to run then.. etc

Kenny

ps anyone got any google examples ?
Kenny aka ComSec

Please read the Forum Rules !!!

______________________

#2 DarkJester

DarkJester

    Corporal

  • Members
  • 151 posts

Posted 31 December 2007 - 12:41 PM

cheers for that kenny thats well handy i have some google "examples" but im not sure if im aloud to post them here or even if you have seen them before. btw what theme/style are you using in thoses screen shots? im a debian user myself and that looks way better than the theme/style i have installed. also on a semi related note happy new year m8
<Jesta> MJC u back me up init
<Jesta> i r a good boy yes
<MrjohnnyCochran> depends...
<Jesta> thats an open ended statment
<MrjohnnyCochran> are there girls? :P
<Jesta> mjc yes
<Jesta> lots
<MrjohnnyCochran> then ur not a good boy
* Jesta resembles that remark

^--<3s kitty aka erica

#3 Kenny

Kenny

    Former Commander In Chief

  • Retired Admin
  • 6,747 posts

Posted 31 December 2007 - 02:32 PM

thanks DarkJester..also happy new year to you and yes post your samples... its up to the user if he decides to break the TOS agreement...its not the code that breaks the law..it person who uses it ;)

re:setup

am using ubuntu 7.10 with gnome and kde option depends what am using when i switch... hence kubuntu

theme is Glossy comes with default install

here is a snapshot of my desktop


Attached File  Screenshot.png   1.45MB   131 downloads

;)
Kenny aka ComSec

Please read the Forum Rules !!!

______________________

#4 DarkJester

DarkJester

    Corporal

  • Members
  • 151 posts

Posted 03 January 2008 - 11:09 AM

hey kenny sorry for the late reply been hanging out in irc with Glyph he is slowly curropting me :P any way my google examples are as follows:

indexof: admin
".htaccess" inurl:sitemap filetype:xml
"global.asa" inurl:sitemap filetype:xml
indexof: conf
"config_inc" filetype:php < this one is kinda messy needs some tweaking
indexof: backup

there the ones i kinda worked out for myself no doubt someone will have thought of them before
i also use a text file located here: hxxp://gray-world.net/etc/passwd/googletut1.txt for referance it was written by some one called ComSec of GSO :P
<Jesta> MJC u back me up init
<Jesta> i r a good boy yes
<MrjohnnyCochran> depends...
<Jesta> thats an open ended statment
<MrjohnnyCochran> are there girls? :P
<Jesta> mjc yes
<Jesta> lots
<MrjohnnyCochran> then ur not a good boy
* Jesta resembles that remark

^--<3s kitty aka erica

#5 Kenny

Kenny

    Former Commander In Chief

  • Retired Admin
  • 6,747 posts

Posted 03 January 2008 - 02:08 PM

hmmm i was thinking more on the lines of a multi-search script...got me thinking ..then again just as easy in perl using wget ;)

i was just looking for examples of scripts to give me some idea's to work on

and

yes guilty... thats my paper i wrote a few years back on gray world :)
Kenny aka ComSec

Please read the Forum Rules !!!

______________________

#6 DarkJester

DarkJester

    Corporal

  • Members
  • 151 posts

Posted 03 January 2008 - 02:41 PM

ive got a whole bunch of stuff on the google api but it requres a developer key that i dont have i can forward you a copy if you would like
<Jesta> MJC u back me up init
<Jesta> i r a good boy yes
<MrjohnnyCochran> depends...
<Jesta> thats an open ended statment
<MrjohnnyCochran> are there girls? :P
<Jesta> mjc yes
<Jesta> lots
<MrjohnnyCochran> then ur not a good boy
* Jesta resembles that remark

^--<3s kitty aka erica





Also tagged with one or more of these keywords: linux, beginner, advanced, cgi, shell