Profile
Kalasag is an Open Source port scan detection and response tool for Unix and Unix-like operating systems such as Linux. It is based on Psionic Portsentry, which was written by Craig Rowland in 2000 and re-released under a Common Public License by Cisco in 2002.
Navigation
Git
This blob has been accessed 9 times via Git panel.

  1. #define VERSION "1.0"
  2.  
  3. #include <stdio.h>
  4. #include <syslog.h>
  5. #include <stdlib.h>
  6. #include <unistd.h>
  7. #include <signal.h>
  8. #include <time.h>
  9. #include <netdb.h>
  10. #include <string.h>
  11. #include <ctype.h>
  12. #include <errno.h>
  13. #include <stdarg.h>
  14. #include <assert.h>
  15. #include <sys/param.h>
  16. #include <sys/types.h>
  17. #ifndef _LINUX_C_LIB_VERSION
  18. #include <sys/socket.h>
  19. #include <sys/stat.h>
  20. #include <netinet/in.h>
  21. #endif
  22. #include <arpa/inet.h>
  23.  
  24. #include "kalasag_config.h"
  25. #include "kalasag_io.h"
  26. #include "kalasag_util.h"
  27.  
  28. #ifdef SUPPORT_STEALTH
  29. #ifdef LINUX
  30. #include "kalasag_tcpip.h"
  31. #include <netinet/in_systm.h>
  32. #endif
  33.  
  34. #define TCPPACKETLEN 80
  35. #define UDPPACKETLEN 68
  36. #endif                          /* SUPPORT_STEALTH */
  37.  
  38. #ifdef NEXT
  39. #include <ansi.h>
  40. #endif
  41.  
  42. #define ERROR -1
  43. #define TRUE 1
  44. #define FALSE 0
  45. #define MAXBUF 1024
  46. /* max size of an IP address plus NULL */
  47. #define IPMAXBUF 16
  48. /* max sockets we can open */
  49. #define MAXSOCKS 64
  50.  
  51. /* Really is about 1025, but we don't need the length for our purposes */
  52. #define DNSMAXBUF 255
  53.  
  54.  
  55. /* prototypes */
  56. int KalasagModeTCP(void);
  57. int KalasagModeUDP(void);
  58. int DisposeUDP(char *, int);
  59. int DisposeTCP(char *, int);
  60. int CheckStateEngine(char *);
  61. int InitConfig(void);
  62. void Usage(void);
  63. int SmartVerifyTCP(struct sockaddr_in, struct sockaddr_in, int);
  64. int SmartVerifyUDP(struct sockaddr_in, struct sockaddr_in, int);
  65.  
  66. #ifdef SUPPORT_STEALTH
  67. int KalasagStealthModeTCP(void);
  68. int KalasagAdvancedStealthModeTCP(void);
  69. int KalasagStealthModeUDP(void);
  70. int KalasagAdvancedStealthModeUDP(void);
  71. char *ReportPacketType(struct tcphdr);
  72. int PacketReadTCP(int, struct iphdr *, struct tcphdr *);
  73. int PacketReadUDP(int, struct iphdr *, struct udphdr *);
  74. #endif
  75.  
BZ2
Auto-generated tar archives of git commits on the current branch are here.
Filedrop
download filekalasag.git-97c89e1.tar.bz2
20.82 KB
12 downloads
download filekalasag.git-1141d13.tar.bz2
20.65 KB
559 downloads
download filekalasag.git-ee3c17b.tar.bz2
20.65 KB
535 downloads
download filekalasag.git-4032c54.tar.bz2
20.63 KB
7 downloads
download filekalasag.git-e51a2a6.tar.bz2
20.65 KB
8 downloads
download filekalasag.git-599c93a.tar.bz2
20.63 KB
6 downloads
download filekalasag.git-acdc640.tar.bz2
20.63 KB
8 downloads
ZIP
Friday, Aug 26, 2011, 3:47 AM
Auto-generated zip archives of git commits on the current branch are here.
Filedrop
download filekalasag.git-97c89e1.zip
25.68 KB
8 downloads
download filekalasag.git-1141d13.zip
25.37 KB
8 downloads
download filekalasag.git-ee3c17b.zip
25.34 KB
7 downloads
download filekalasag.git-4032c54.zip
25.13 KB
10 downloads
download filekalasag.git-e51a2a6.zip
25.13 KB
10 downloads
download filekalasag.git-599c93a.zip
25.11 KB
1326 downloads
download filekalasag.git-acdc640.zip
25.10 KB
10 downloads