Commit a25b4108 authored by Mati's avatar Mati

Imported Upstream version 0.2

parent 82aaa07b
/*
Author: OverIP
Source: OCS v 0.1
Andrea Piscopiello
overip@gmail.com
Source: OCS v 0.2
License: GPL
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
......@@ -13,17 +15,18 @@
gcc ocs.c -o ocs -lpthread
Then run it with: ./OCS xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy
xxx.xxx.xxx.xxx=range start IP
yyy.yyy.yyy.yyy=range end IP
xxx.xxx.xxx.xxx=range start IP
yyy.yyy.yyy.yyy=range end IP
PAY ATTENTION: This source is coded for only personal use on
your own router Cisco. Don't hack around.
Special thanks very much:
To Khlero with your patience this code is out there :*
To Shen139, without you I can't live :D
To all people that had betatesting this code :)
I love U all :****
Special thanks to:
Khlero with your patience this code is out there :*
Shen139, without you I can't live :D
people that helped betatesting this code :)
Alex Kah (alex at question-defense dot com) from Question-Defense.com and his Cisco Router :)
I love U all :*
*/
......@@ -130,11 +133,12 @@ int scanna(char*rangeIP) //scanning
recv(sd,buffer_a,700,0);
if(strstr(buffer_a,"#"))
printf(" |Default Enable Passwords found! Vulnerable Router IP: %s\n\n\n", rangeIP);
else
if(strstr(buffer_a,">"))
{
printf(" |Attenzione password telnet di default %s\n",rangeIP);
printf(" |Default Telnet password found. %s\n",rangeIP);
fflush(stdout);
send(sd,"enable\r",7,0);
......@@ -148,18 +152,17 @@ int scanna(char*rangeIP) //scanning
//printf(" Sto cercando di loggarmi in enable mode\n");
//fflush(stdout);
}
if(strstr(buffer_b,"#"))
printf(" |Password telnet e enable mode di default! IP Router vulnerabile: %s\n\n\n", rangeIP);
printf(" |Default Telnet and Enable Passwords found! Vulnerable Router IP: %s\n\n\n", rangeIP);
else
printf(" |Router non vulnerabile\n");
printf(" |Router not vulnerable. \n");
fflush(stdout);
}
else
{
printf("\n\n(%s) Porte filtrate\n",rangeIP);
printf("\n\n(%s) Filtered Ports\n",rangeIP);
close(sd);
alarm(0);
signal(SIGALRM,NULL);
......@@ -245,11 +248,11 @@ int main(int argc,char *argv[])
int w;
printf("********************************* OCS v 0.1 **********************************\n");
printf("********************************* OCS v 0.2 **********************************\n");
printf("**** ****\n");
printf("**** coded by OverIP ****\n");
printf("**** ****\n");
printf("**** under GPL License ****\n");
printf("**** overip@gmail.com ****\n");
printf("**** under GPL License ****\n");
printf("**** ****\n");
printf("**** usage: ./ocs xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy ****\n");
printf("**** ****\n");
......@@ -261,14 +264,14 @@ int main(int argc,char *argv[])
if(argc!=3)
{
printf("uso: %s IP IP\n",argv[0]);
printf("use: %s IP IP\n",argv[0]);
exit(-1);
}
for(w=1;w<=5;w++)
if(atoi(getByte(argv[1],w))>255 || atoi(getByte(argv[2],w))>255)
{
printf("uso: ./OCS IP IP\n");
printf("use: ./OCS IP IP\n");
exit (-1);
}
......@@ -282,12 +285,12 @@ int main(int argc,char *argv[])
else if(atoi(getByte(argv[1],w))>atoi(getByte(argv[2],w)))
{
printf("uso: %s IP IP\n",argv[0]);
printf("use: %s IP IP\n",argv[0]);
return 0;
}
printf("IP uguali\n");
printf("Same IPs \n");
fflush(stdout);
scanna(argv[1]);
return 0;
......@@ -333,5 +336,3 @@ char *getByte(char *IP,int index)
return byte;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment