library/src/exploitation/WebExploitation/SQLErrCodes/BP-WebExploitOracleErrCodes.cc
// Generates an allocated array of oracle error codes
Generates an allocated array of oracle error codes
Generates an allocated array of oracle error codes
P_BP_ORACLE_ERR_CODES BP_OracleGenErrCodeArray(){
	size_t retSize = sizeof(oracleErrCodes);
	P_BP_ORACLE_ERR_CODES retTable = (P_BP_ORACLE_ERR_CODES) bpcalloc(retSize, 1);
	if(!retTable)
		return NULL;
	memcpy(retTable, &oracleErrCodes, retSize);
	BP_ORACLE_ERR_CODES nullCmp;
	memset(&nullCmp, 0x00, sizeof(nullCmp));
	size_t x = 0;
	for(x = 0; ( sizeof(BP_ORACLE_ERR_CODES) * x ) < sizeof(oracleErrCodes); x++){
		retTable[x].description         = bpstrdup(oracleErrCodes[x].description);
		retTable[x].firstNumericalCode  = bpstrdup(oracleErrCodes[x].firstNumericalCode);
		retTable[x].secondNumericalCode = bpstrdup(oracleErrCodes[x].secondNumericalCode);
	}
	return retTable;
}
P_BP_ORACLE_ERR_CODES BP_OracleGenErrCodeArray ( ) { size_t retSize = sizeof ( oracleErrCodes ) ; P_BP_ORACLE_ERR_CODES retTable = ( P_BP_ORACLE_ERR_CODES ) bpcalloc ( retSize , 1 ) ; if ( ! retTable ) return NULL ; memcpy ( retTable , & oracleErrCodes , retSize ) ; BP_ORACLE_ERR_CODES nullCmp ; memset ( & nullCmp , 0x00 , sizeof ( nullCmp ) ) ; size_t x = 0 ; for ( x = 0 ; ( sizeof ( BP_ORACLE_ERR_CODES ) * x ) < sizeof ( oracleErrCodes ) ; x ++ ) { retTable [ x ] . description = bpstrdup ( oracleErrCodes [ x ] . description ) ; retTable [ x ] . firstNumericalCode = bpstrdup ( oracleErrCodes [ x ] . firstNumericalCode ) ; retTable [ x ] . secondNumericalCode = bpstrdup ( oracleErrCodes [ x ] . secondNumericalCode ) ; } return retTable ; }
Generates an allocated array of oracle error codes
Generates an allocated array of oracle error codes
// duplicate the array