problem with seq

Hi , I know there is a comand that can be used for seq at FreeBsd FreeBSD, called "jot" but I just want to know how to install seq on FreeBsd FreeBSD.

When I try to run a seq I get this:
Code:
seq: Command not found.

Code:
CLASA=$1
sh run "`for i in $(seq 0 100); do echo -n $CLASA.$i\ ;done`"

run file

Code:
#!/bin/bash
LIST=$1
for i in $LIST; do
	sh runner -h $i.
done

And If I try "jot" I get
Code:
Out of space
when I can run it normally in another system like Ubuntu.

Thanks
 
I used to use ./run but I get error at freebsd FreeBSD. It is correct to change it for "sh", right?
 
mix_room said:
I have used the seq command before.
There is probably a slight syntax difference between bash and sh.

While there are indeed quite some differences between bash and sh, seq is not a builtin command.
 
How are you invoking 'jot'?

$ jot 0 100
would seem to do what you want.

Although in bash you can also use brace expansion to generate sequences of numbers:

[CMD="bash$"]for i in {0..99}; do echo $i; done[/CMD]


Also, is there a reason you're using two scripts to do what can easily be achieved with one?

Code:
#!/usr/local/bin/bash

CLASA=$1

for i in ${CLASA}.{0..99}; do
	sh runner -h $i
done

You might need to install shells/bash before you can use these bashisms.
 
phoenix said:
Perhaps you are looking for this: misc/seq2

I have installed it but I keept getting "seq not found"

Sin_titulo2.jpg



jem said:
How are you invoking 'jot'?

$ jot 0 100
would seem to do what you want.

Although in bash you can also use brace expansion to generate sequences of numbers:

[CMD="bash$"]for i in {0..99}; do echo $i; done[/CMD]


Also, is there a reason you're using two scripts to do what can easily be achieved with one?

Code:
#!/usr/local/bin/bash

CLASA=$1

for i in ${CLASA}.{0..99}; do
	sh runner -h $i
done

You might need to install shells/bash before you can use these bashisms.

I tried that but I get
Code:
Syntax error: word unexpected
 
Syntax error: "(" unexpected

Hi I am trying to run this scanner :

Code:
scanner -h 80.0.0/16 -u users -p pass -t 6 -c 20 -o log -d -k -C

At ubuntu it starts normally but at FreeBsd I get this
Code:
Syntax error: "(" unexpected

What does it mean?

thanks
 
Please give us some information anout the script. And try it running using bash (which is the default shell on ubuntu installation):

$ bash scanner <your option here>
 
jb_fvwm2 said:
Code:
 rehash && which seq2
... seq2 is installed by that port.

I did :

Code:
ks309492# rehash && which seq2
/usr/local/bin/seq2

But when I try to run it :
Code:
ks309492# seq
seq: Command not found.
 
fluca1978 said:
Please give us some information anout the script. And try it running using bash (which is the default shell on ubuntu installation):

$ bash scanner <your option here>

I tried but I get this :

Code:
cannot execute binary file

The script that I am trying to run is this :

Code:
/*
        Multi-thread FTP scanner v0.2.5 by Inode <inode@wayreth.eu.org>
	
	This software is a simple multithread scanner for ftp with an
	integrated dictionary bruteforce.

	In the password file use the keyword "null" (with quotes) for check
	null passwords.

	You can download the latest version at: http://www.wayreth.eu.org

	Thanks Megat0n for programming support

	Tested on:
		Linux Slackware 8.0 (i386)
		OpenBSD 3.3 (i386)
		SunOS 5.8 (sparc)

	Compile:
		- Linux / OpenBSD
			gcc -O2 -o ftp_scanner ftp_scanner.c -lpthread
		- FreeBSD
			gcc -O2 -o ftp_scanner ftp_scanner.c -pthread
		- SunOS
			gcc -O2 -o ftp_scanner ftp_scanner.c -DSOLARIS -lpthread -lxnet

	Changes 0.2.5
		- Added option -C (check if command RMD exist, else can be
		  like a printer and doesn't log it) 

	Changes 0.2.4
		- Programmed again connect routines
		- Rebuild the log file 

	Changes 0.2.3
		- Added SSH and Telnet check
		- Fix SIGPIPE (maybe?)

	 $ver=v0.2.5 $name=ftp_scanner 


*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <signal.h>
#include <sys/types.h>
#include <fcntl.h>
#include <pthread.h>
#include <sys/time.h>

#define MAX_THREAD 50 
#define DEF_THREAD 30
#define TIMEOUT 5
#define PORT 21
#define PORT_TELNET 3389
#define PORT_SSH 25

// Structure 
struct users_list {
	char username[100];
	struct users_list * next;
};

struct password_list {
	char password[100];
        struct password_list * next;
};      

// Global variables
FILE * OUTFILE;
int verbose = 0;
int drop = 0;
int timeout = 0;
int banner = 0;
int strange = 0;
int ssh_telnet = 0;
int rm_dir = 0;

// Address 
unsigned long current_ip;
unsigned long end_ip;

// Mutex variables
pthread_mutex_t input_queue;
pthread_mutex_t user_list;
pthread_mutex_t output_file;

// Main lists pointers
struct users_list * first_user = NULL;
struct password_list * first_pass = NULL;

// Functions prototipes
void * scan(void * data);
void usage(char * argv);
void load_users( char * in_file );
void load_password( char * in_file );
int check_ftp_reply( char * string );
void connect_ip(unsigned long ip);
int check_user( int sock, char * user, char * pass,char * buffer, int lbuffer );
int check_telssh( unsigned long ip );
int check_port( unsigned long ip , int port );

Note: Cant add the whole code because it exceeds the 1000 char limit

Which is based in 2 files:

0-100 (for scan to 0-100)

Code:
#!/bin/bash
CLASA=$1
./run "`for i in $(seq 0 100); do echo -n $CLASA.$i\ ;done`"

and Run

Code:
#!/bin/bash
LIST=$1
for i in $LIST; do
	./ftp_scanner -h $i.0.0/16 -u users -p pass -t 6 -c 20 -o log -d -k -C &
done

I am trying to adapt it to FreeBSD because it have been made for Linux but can be compiled at freebsd so should work.
 
And if I try

[CMD=]bash scanner <your option here>[/CMD]

I am getting

Code:
cannot execute binary file
 
Script dont work

I am making a new topic because there are two topics about this problem I can't get any fix yet.

http://forums.freebsd.org/showthread.php?t=28102
http://forums.freebsd.org/showthread.php?t=28078

I am new at FreeBsd FreeBSD so I have some problems trying to use my scripts at this OS. The script that I am trying to run is this (ftp scanner) : http://www.multiupload.com/4QC0GQKBVZ

It normally works at FreeBsd FreeBSD just changing ./ for sh but I don't know what is the problem now with this version of FreeBsd FreeBSD (maybe I need a port or related).

The usage used to be : 0-100 90 , and it will scan all the ftp servers with vulns at 90.0.0.0/16.

I tested it in Linux 2.6 and Ubuntu and it works perfect so I dont know why I am getting all that problems :S

Thanks for the reply and sorry so much for making all the topics.. :(
 
yeikel said:
I Did :

PHP:
ks309492# rehash && which seq2
/usr/local/bin/seq2

But when I try to run it :
PHP:
ks309492# seq
seq: Command not found.
$ seq2
If having to type the 2 bothers you, you can of course use an alias or a symlink

Fonz

P.S. Why are you using PHP tags?

P.P.S. Why are you working as root?
 
Back
Top