[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Full-disclosure] pftp-shit v1.11 directory listing ghetto patch
- To: Full-Disclosure@xxxxxxxxxxxxxxxxx
- Subject: [Full-disclosure] pftp-shit v1.11 directory listing ghetto patch
- From: "T Biehn" <tbiehn@xxxxxxxxx>
- Date: Wed, 22 Aug 2007 01:55:35 -0400
HI FD,
UNRELATED TO SECURITY, I NEEDED SOMEWHERE TO DUMP THIS PATCH
THIS PATCH IS PROBABLY IMPROPERLY DONE, BUT IT WORKS.
IT FIXES THE CASE WHERE IF YOU HAVE A USERNAME / GROUP THAT IS A MONTH PFTP
WON'T RECOGNIZE THE DIRECTORY LISTING CORRECTLY.
HUGS AND KISSES,
TRAVIS
--- server.cc.old 2006-12-19 19:28:56.000000000 -0500
+++ server.cc 2007-08-22 01:53:40.000000000 -0400
@@ -4299,7 +4299,7 @@
char *start, name[PATHLEN], dummy[12], date1[10], date2[10], date3[10];
char owntemp[9], grptemp[9];
int magic = 0, n, blocks;
- char *start_fix, *end_fix;
+ char *start_fix, *end_fix, *strstart, *strend;
char month_name[][5] = {"Jan ", "Feb ", "Mar ", "Apr ", "May ", "Jun ",
"Jul ", "Aug ", "Sep ", "Oct ", "Nov ", "Dec "};
bool use_fix, space;
@@ -4333,6 +4333,20 @@
use_fix = 0;
while (!end_fix && (n < 12)) {
end_fix = strstr(this->temp_string, month_name[n]);
+ if(end_fix) {
+ strstart = this->temp_string;
+ strend = &strstart[strlen(this->temp_string)-1];
+ for(int x=strlen(month_name[n]); ((end_fix)+x) < strend
; x++) {
+ if(*(end_fix + x) != ' ') {
+ if (*(end_fix+x) >= 48 && *(end_fix+x)
<= 57) {
+ break;
+ } else {
+ end_fix = 0;
+ break;
+ }
+ }
+ }
+ }
n++;
}
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/