Articles

Metasploit Framework Windows Tutorial
Remote Desktop Connection
Windows Processes That May Be Dangerous
How-To use NetCat a Tutorial
Common Linux Commands
Common Ports
Netcat Commands
HTTP Response Codes
War-Google Hack Terms
Wardriving
Avoiding Social Engineering and Phishing Attacks
Intrusion Detection on Linux
Linux Intrusion Detection
Penetration Testing Guide
Penetration Testing Tools
Social Engineering Fundamentals, Part I: Hacker Tactics
Social engineering (computer security)
The Psychology of Social Engineering

The Archives

General GSO
GovernmentSecurity.org News & Suggestions
In The News
Open Topic
General Security Information
Trash Can
Exploit & Vulnerability Mailing List Archives
Trial Member Forum
Product and Program Reviews GSO Tutorials
System Security
Windows Systems
Beginners Section
Linux & Unix Systems
File Downloads
Exploit Research & Discussion Trojan & Virus Errata
Networking Security / Firewall / IDS / VPN / Routers
System Hardening
E-Mail Security
Wifi Security
Trial Member Uploads
Upload discovered Trojans & Mal ware
GSO Programming Section
C , C++ , VC++
Visual Basic.NET
Perl /CGI
Java/Javascript
PHP/XML/ASP/HTML
Assembly + Other
The Cork Board
Network Security Consultant Directory
Network Security Jobs
The Archives
Encryption Information
General Network Security
Internet Anonymity
HTTP Protocol Security
Linux Security
MS IIS Information
Exploit Articles
Programming / Tool Design
GSO Software Projects
Public Downloads
Microsoft Security Questions and Papers

Full Version: How To Write In Linux
realloader
Under Windows i use :
for /f "eol=; tokens=1*" %%i in (ip.txt) do exploit.exe %%i *.*.*.* 31337
Now i wanna use in Linux,
I try with bash, but alway got this:
bash: syntax error near unexpected token `"eol=; tokens=1*"'
Pl. help!
Thank you!
JustAsFire
You can find here an advanced bash scripting guide. Hope you'll find it useful.
Eliot
Hi,

I am not 100% sure how your input looks like and how your output should look like.
As far as I could understand you want to run a program with two command-line parameters <ip> and <port>.
The ip is read from a file and is an array of IPs with each IP seperated by a given character throughout the file.
If you're using bash (dunno on which other shells it'd work) you can use this little script to get the job done.

CODE

#!/bin/bash
IFS=$'token delimiter, eg: \n to handle input line-by-line'
for ip in $(cat $1)
do
   exploit $ip 31337
done

Write it into a file and do 'chmod +x file' once to mark it as an executable file.
Execute it with the filename of the input file as the first parameter.
To use it as a one liner you have to seperate the lines in the script with a semicolon and replace $1 with the input filename. The #!/bin/bash must not be include in a one liner.

If you have any questions or anything else to say feel free to do so.
realloader
Thank you very much!

What i want is to write such as:

FOR /F "tokens=1* delims=, " %%i in (%list%) do mass.bat %%i

scan.exe -p 443 %startip% %endip%

FOR /F "tokens=1* delims=, " %%i in (%list%) do check.bat %%i

Something like that but under Linux!

tibbar
so basically you want help writing an autohacker script in linux...
realloader
QUOTE(tibbar @ Aug 7 2005, 11:21 PM)
so basically you want help writing an autohacker script in linux...
*



yes!
tibbar
well in that case i will have to trash the topic!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2005 Invision Power Services, Inc.