1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00

- Update MAINTAINER address

- Convert to new OPTIONS framework
- Respect CC
- Cleanup compile warnings
- Pet portlint
- While I'm here, remove LICENSE_FILE for well-known licenses
- Use single space after WWW:

PR:		ports/182158
Submitted by:	Pavel Volkov <pavelivolkov@gmail.com> (maintainer)
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2013-09-21 15:48:50 +00:00
parent 4f157ba200
commit 9affa8d3d3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=327836
4 changed files with 113 additions and 11 deletions

View File

@ -8,27 +8,28 @@ MASTER_SITES= http://downloads.sourceforge.net/project/${MASTER_SITE_SUBDIR}/
MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/Version%20${PORTVERSION}
EXTRACT_SUFX= .tgz
MAINTAINER= pavelivolkov@googlemail.com
MAINTAINER= pavelivolkov@gmail.com
COMMENT= Is a tool that searches for credit card numbers (PAN) and track data
FETCH_ARGS= -pRr
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
OPTIONS_DEFINE= DOCS
FETCH_ARGS= -pRr
NO_STAGE= yes
PORTDOCS= README readme.html
PLIST_FILES= bin/${PORTNAME}
NO_STAGE= yes
.include <bsd.port.pre.mk>
.include <bsd.port.options.mk>
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
.if !defined(NOPORTDOCS)
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}; \
for f in ${PORTDOCS}; do \
${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
done
.endif
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,5 +1,14 @@
--- Makefile.orig 2010-07-21 17:35:58.000000000 +0400
+++ Makefile 2010-07-21 17:36:21.000000000 +0400
--- Makefile.orig 2007-08-30 04:43:27.000000000 +0400
+++ Makefile 2013-09-16 15:34:28.000000000 +0400
@@ -21,7 +21,7 @@
# Makefile for ccsrch
#
-CC =gcc
+#CC =gcc
#
# for mingw use something like the following
#INCL = -I./ -I/mingw/include
@@ -29,8 +29,8 @@
#
# for *UNIX* the following tends to work

View File

@ -0,0 +1,92 @@
--- ccsrch.c.orig 2013-09-16 16:15:41.000000000 +0400
+++ ccsrch.c 2013-09-16 16:22:57.000000000 +0400
@@ -567,7 +567,7 @@
int vnum = 0;
memset(&num2buf, '\0', 3);
- snprintf(num2buf, 3, "%d%d\0", cardbuf[0], cardbuf[1]);
+ snprintf(num2buf, 3, "%d%d", cardbuf[0], cardbuf[1]);
vnum = atoi(num2buf);
if ((vnum > 50) && (vnum < 56))
print_result("MASTERCARD", 16, offset);
@@ -580,7 +580,7 @@
int vnum = 0;
memset(&num2buf, '\0', 2);
- snprintf(num2buf, 2, "%d\0", cardbuf[0]);
+ snprintf(num2buf, 2, "%d", cardbuf[0]);
vnum = atoi(num2buf);
if (vnum == 4)
print_result("VISA", 16, offset);
@@ -593,7 +593,7 @@
int vnum = 0;
memset(&num2buf, '\0', 5);
- snprintf(num2buf, 5, "%d%d%d%d\0", cardbuf[0], cardbuf[1], cardbuf[2], cardbuf[3]);
+ snprintf(num2buf, 5, "%d%d%d%d", cardbuf[0], cardbuf[1], cardbuf[2], cardbuf[3]);
vnum = atoi(num2buf);
if (vnum == 6011)
print_result("DISCOVER", 16, offset);
@@ -605,8 +605,8 @@
char num2buf[5];
int vnum = 0;
- memset(&num2buf, '\0', 2);
- snprintf(num2buf, 5, "%d%d%d%d\0", cardbuf[0], cardbuf[1], cardbuf[2], cardbuf[3]);
+ memset(&num2buf, '\0', 5);
+ snprintf(num2buf, 5, "%d%d%d%d", cardbuf[0], cardbuf[1], cardbuf[2], cardbuf[3]);
vnum = atoi(num2buf);
if ((vnum == 3088) || (vnum == 3096) || (vnum == 3112) || (vnum == 3158) || (vnum == 3337) || (vnum == 3528) || (vnum == 3529))
print_result("JCB", 16, offset);
@@ -619,7 +619,7 @@
int vnum = 0;
memset(&num2buf, '\0', 3);
- snprintf(num2buf, 3, "%d%d\0", cardbuf[0], cardbuf[1]);
+ snprintf(num2buf, 3, "%d%d", cardbuf[0], cardbuf[1]);
vnum = atoi(num2buf);
if ((vnum == 34) || (vnum == 37))
print_result("AMEX", 15, offset);
@@ -632,7 +632,7 @@
int vnum = 0;
memset(&num2buf, '\0', 5);
- snprintf(num2buf, 5, "%d%d%d%d\0", cardbuf[0], cardbuf[1], cardbuf[2], cardbuf[3]);
+ snprintf(num2buf, 5, "%d%d%d%d", cardbuf[0], cardbuf[1], cardbuf[2], cardbuf[3]);
vnum = atoi(num2buf);
if ((vnum == 2014) || (vnum == 2149))
print_result("ENROUTE", 15, offset);
@@ -645,7 +645,7 @@
int vnum = 0;
memset(&num2buf, '\0', 5);
- snprintf(num2buf, 5, "%d%d%d%d\0", cardbuf[0], cardbuf[1], cardbuf[2], cardbuf[3]);
+ snprintf(num2buf, 5, "%d%d%d%d", cardbuf[0], cardbuf[1], cardbuf[2], cardbuf[3]);
vnum = atoi(num2buf);
if ((vnum == 2131) || (vnum == 1800) || (vnum == 3528) || (vnum == 3529))
print_result("JCB", 15, offset);
@@ -660,9 +660,9 @@
int vnum2 = 0;
memset(&num2buf, '\0', 4);
- memset(&num2buf2, '\0', 2);
- snprintf(num2buf, 4, "%d%d%d\0", cardbuf[0], cardbuf[1], cardbuf[2]);
- snprintf(num2buf2, 3, "%d%d\0", cardbuf[0], cardbuf[1]);
+ memset(&num2buf2, '\0', 3);
+ snprintf(num2buf, 4, "%d%d%d", cardbuf[0], cardbuf[1], cardbuf[2]);
+ snprintf(num2buf2, 3, "%d%d", cardbuf[0], cardbuf[1]);
vnum = atoi(num2buf);
vnum2 = atoi(num2buf2);
if (((vnum > 299) && (vnum < 306)) || ((vnum > 379) && (vnum < 389)) || (vnum2 == 36))
@@ -690,9 +690,9 @@
int end_time=0;
end_time=time(NULL);
- fprintf(stdout, "\n\nFiles searched ->\t\t%d\n", file_count);
+ fprintf(stdout, "\n\nFiles searched ->\t\t%ld\n", file_count);
fprintf(stdout, "Search time (seconds) ->\t%d\n", ((int)time(NULL) - init_time));
- fprintf(stdout, "Credit card matches->\t\t%d\n", total_count);
+ fprintf(stdout, "Credit card matches->\t\t%ld\n", total_count);
if (tracksrch)
fprintf(stdout, "Track data pattern matches->\t%d\n\n", trackdatacount);
fprintf(stdout, "\nLocal end time: %s\n\n", ctime((time_t *)&end_time));

View File

@ -3,4 +3,4 @@ contiguous credit card numbers (PAN) and track data on windows and
UNIX operating systems. It will also identify the location of the
PAN data in the files and record MAC times.
WWW: http://ccsrch.sourceforge.net/
WWW: http://ccsrch.sourceforge.net/