LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-06-2006, 09:24 AM   #1
mrbabis
LQ Newbie
 
Registered: Jul 2005
Posts: 20

Rep: Reputation: 0
mount from list


Is it way to use list for mount and mount to random folder by pattern?


nmap -p T:139 10.92.107.99-254 | grep "ing ports on" | grep "(10.92.107.*)" -o | gsar -s"(" -r"smbclient \\" -F | gsar -s")" -r"\SHARE MOUNTPATH -U="User%" -F

SHARE MOUNTPATH
where SHARE = *
and MOUNTPATH = *
find and mount all avalible shares on network

 
Old 03-06-2006, 09:43 AM   #2
sipsipi
Member
 
Registered: Dec 2005
Location: Chicago
Distribution: Fedora and Redhat
Posts: 86

Rep: Reputation: 15
mrbabis,

This is an awesome idea. I would think that you could easily do this from a script, but getting the output of your nmap, then doing something (not exact script here, but the idea is outlayed)::
Code:
for share in `nmap blah blah`
  do mount -t smbfs -o user=user,rw //server/$share /mountpoint
etc, etc...

Check out stuffnthings.org for my script examples (very new, so not alot there yet )


Good luck

Last edited by sipsipi; 03-06-2006 at 09:44 AM.
 
Old 03-10-2006, 11:12 AM   #3
mrbabis
LQ Newbie
 
Registered: Jul 2005
Posts: 20

Original Poster
Rep: Reputation: 0
I did one script that works other way, but.... still some problem..

ehh.... this NOT working
"@echo mount -o password="empty" //%myip%/C /tmp/%myip% >> temp%\doscan.sh"

cannot mount :'( when putty running script

Here is whole script...
_________Windows Creating Linux Script_________
net share C /delete
net share C=C:

@ipconfig | grep "IP-adress" | grep ": 10.92.107.*" -o --max-count=1 | gsar -s":: " -r"set myip=" -F > %temp%\tmp.cmd
@gsar -ud %temp%\tmp.cmd -o
@call %temp%\tmp.cmd > nul

@echo echo Creating dir > %temp%\doscan.sh
@echo mkdir /tmp/%myip% >> %temp%\doscan.sh
@echo echo Connecting >> %temp%\doscan.sh
@echo umount /tmp/%myip% >> %temp%\doscan.sh
@echo mount -o password="empty" //%myip%/C /tmp/%myip% >> temp%\doscan.sh
@echo echo Scannar >> %temp%\doscan.sh
@echo clamscan -r /tmp >> %temp%\doscan.sh
@echo umount /tmp/%myip% >> %temp%\doscan.sh
@echo echo Sleeping 10 sec >> %temp%\doscan.sh
::@echo echo sleep 10 >> %temp%\doscan.sh

@putty linux -l root -pw linuxpass -m %temp%\doscan.sh
@echo.
@pause
_____________________________________________
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Recommendation for Debian Etch sources.list ( /etc/apt/sources.list ) forgox Debian 6 05-05-2007 01:57 PM
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 06:03 AM
get list of latest list of packages bobwall Linux - Distributions 1 11-30-2004 03:48 PM
wireless channel list different from router's list heluani Linux - Laptop and Netbook 1 08-29-2004 10:04 PM
Inserting element to a list of list in C suwandy_chandra Programming 2 03-09-2004 03:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration