[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2008-01-16T19:56:40-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/2558 2008-01-16T19:56:40-05:00 2008-01-16T19:56:40-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16383#p16383 <![CDATA[Um, credit card genorator problem...]]>
Though, my code does pretty much generate "valid" numbers, though they won't get far. Pete would have deleted it by now if he thought it was bad/dangerous.

Statistics: Posted by Patz QuickBASIC Creations — Wed Jan 16, 2008 7:56 pm


]]>
2008-01-14T18:47:50-05:00 2008-01-14T18:47:50-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16375#p16375 <![CDATA[Um, credit card genorator problem...]]>
(Would really like to see you guys get mine working :p)

P.S.We should delete this post before some bad guy comes and gets Patz code and creates fake numbers :?

Statistics: Posted by Sinuvoid — Mon Jan 14, 2008 6:47 pm


]]>
2008-01-13T23:32:23-05:00 2008-01-13T23:32:23-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16370#p16370 <![CDATA[Um, credit card genorator problem...]]> Statistics: Posted by Patz QuickBASIC Creations — Sun Jan 13, 2008 11:32 pm


]]>
2008-01-12T18:46:17-05:00 2008-01-12T18:46:17-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16362#p16362 <![CDATA[LOL]]>
Let's see you make one of those routines you Devil!

Still King, but wondering

Ted

Statistics: Posted by burger2227 — Sat Jan 12, 2008 6:46 pm


]]>
2008-01-12T18:06:27-05:00 2008-01-12T18:06:27-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16360#p16360 <![CDATA[Re: How it works]]>
Interesting way to check the numbers over 10 when multipied by 2:

Code:

LuhnCheck% = LuhnCheck% + 9 * (LuhnCheck% >= 10) 
Subtracting the 9 wasn't my idea, but using the logical operator in there was. Coming from TI-BASIC makes you see tons of small optimizations you can do to the program.


Also, to tweak my code to make it work to where you can set the issuer digits, use the following code instead:

Code:

'Random Credit Card Generator RANDOMIZE TIMER CCNum$ = "52"     'Specifies that the issuer is a Mastercard.WHILE LEN(CCNum$) < 15   'Get our first 15 digits   CCNum$ = CCNum$ + LTRIM$(RTRIM$(STR$(INT(RND * 10)))) WEND        ValidateNum$ = CCNum$     'Copy our Credit Card number for the Luhn check. FOR A = 1 TO 15 STEP 2     'Perform the Luhn method on our number.   LuhnCheck% = 2 * VAL(MID$(CCNum$, A, 1))   LuhnCheck% = LuhnCheck% + 9 * (LuhnCheck% >= 10)   MID$(ValidateNum$, A, 1) = LTRIM$(RTRIM$(STR$(LuhnCheck%))) NEXT A FOR A = 1 TO 15     'Get our checksum   Checksum% = Checksum% + VAL(MID$(ValidateNum$, A, 1)) NEXT A CheckDigit% = (10 - (Checksum% MOD 10)) MOD 10     'Final (check) digit CCNum$ = CCNum$ + LTRIM$(RTRIM$(STR$(CheckDigit%)))     'Add the check digit on PRINT CCNum$     'Show output

Statistics: Posted by Patz QuickBASIC Creations — Sat Jan 12, 2008 6:06 pm


]]>
2008-01-12T14:38:01-05:00 2008-01-12T14:38:01-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16358#p16358 <![CDATA[Re: How it works]]>
IFor instance pick any number from 10 to 100. Add the digits together and subtract from your original number. The resulting number is always divisible by 9.
To restate:

Pick 10a+b (This is a two digit number. 37 = 10*3+7
Subtract a+b (This is the sum of the digits)
Result: 9a
Wow! Marvel that 9a is divisible by 9

LOL

Mac

Statistics: Posted by Mac — Sat Jan 12, 2008 2:38 pm


]]>
2008-01-12T11:29:45-05:00 2008-01-12T11:29:45-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16357#p16357 <![CDATA[How it works]]>

Code:

LuhnCheck% = LuhnCheck% + 9 * (LuhnCheck% >= 10) 
The code inside of the brackets is a boolean (true-false) evaluation which QB returns true as -1 and false as 0. So let's say the odd card digit is 8.

8 * 2 = 16 then 16 + 9 * (-1) = 7 . The same as 1 + 6 = 7 by adding the digits.
The number 9 is a common result of number digit manipulations.

For instance pick any number from 10 to 100. Add the digits together and subtract from your original number. The resulting number is always divisible by 9. The same thing can be done with more than 3 digits.

Perhaps it has something to do with our decimal numbering system. After all, in base 10 there are only numbers from 0 to 9.

Ted
Still King!

Statistics: Posted by burger2227 — Sat Jan 12, 2008 11:29 am


]]>
2008-01-12T21:21:26-05:00 2008-01-12T02:36:43-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16352#p16352 <![CDATA[Um, credit card genorator problem...]]> http://www.merriampark.com/anatomycc.htm

Code:

'Random Credit Card GeneratorRANDOMIZE TIMERFOR A = 1 TO 15   'Get our first 15 digits  CCNum$ = CCNum$ + LTRIM$(RTRIM$(STR$(INT(RND * 10))))NEXT A        ValidateNum$ = CCNum$     'Copy our Credit Card number for the Luhn check.FOR A = 1 TO 15 STEP 2     'Perform the Luhn method on our number.  LuhnCheck% = 2 * VAL(MID$(CCNum$, A, 1))  LuhnCheck% = LuhnCheck% + 9 * (LuhnCheck% >= 10)  MID$(ValidateNum$, A, 1) = LTRIM$(RTRIM$(STR$(LuhnCheck%)))NEXT AFOR A = 1 TO 15     'Get our checksum  Checksum% = Checksum% + VAL(MID$(ValidateNum$, A, 1))NEXT ACheckDigit% = (10 - (Checksum% MOD 10)) MOD 10     'Final (check) digitCCNum$ = CCNum$ + LTRIM$(RTRIM$(STR$(CheckDigit%)))     'Add the check digit onPRINT CCNum$     'Show output
Code to validate a CCN to the Luhn method:

Code:

'Credit Card Validator (Luhn method)INPUT CCNum$ValidCheck$ = CCNum$FOR A = 1 TO 15 STEP 2     'Perform the Luhn method on our number.  LuhnCheck% = 2 * VAL(MID$(CCNum$, A, 1))  LuhnCheck% = LuhnCheck% + 9 * (LuhnCheck% >= 10)  MID$(ValidCheck$, A, 1) = LTRIM$(RTRIM$(STR$(LuhnCheck%)))NEXT AFOR A = 1 TO 16     'Get our checksum  Checksum% = Checksum% + VAL(MID$(ValidCheck$, A, 1))NEXT AIF (Checksum% MOD 10) = 0 THEN   PRINT "Valid number."ELSE   PRINT "Invalid number."END IF
Also, this is perfectly legal. People use these types of codes to test out their pre-validation systems, and it's just harmless fun since this code can't generate a valid expiration date, PIN, or CVC number.

Statistics: Posted by Patz QuickBASIC Creations — Sat Jan 12, 2008 2:36 am


]]>
2008-01-11T13:08:06-05:00 2008-01-11T13:08:06-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16346#p16346 <![CDATA[Um, credit card genorator problem...]]>
The last digit makes the card numbers added divisible by 10 so it would be rather easy to find that number using lastdigit = 10 - (total MOD 10).
Unless you're doing something totally different?

Statistics: Posted by Nemesis — Fri Jan 11, 2008 1:08 pm


]]>
2008-01-11T04:05:56-05:00 2008-01-11T04:05:56-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16343#p16343 <![CDATA[Um, credit card genorator problem...]]>
Grtz

Statistics: Posted by Seb McClouth — Fri Jan 11, 2008 4:05 am


]]>
2008-01-10T16:05:34-05:00 2008-01-10T16:05:34-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16338#p16338 <![CDATA[Um, credit card genorator problem...]]>
EDIT: Yeah Mac, that was the purpose. To create a card number and see if it was valid. Thats it,Thats all. :P

Statistics: Posted by Sinuvoid — Thu Jan 10, 2008 4:05 pm


]]>
2008-01-10T14:31:51-05:00 2008-01-10T14:31:51-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16335#p16335 <![CDATA[EASY]]>
However, most establishments would require a valid expiration date and many want the security number on the back of the card. It would be a good formula for verifying a number, but nowadays, cards are sent instantly to the credit companies. Even on the web.

Ted

Statistics: Posted by burger2227 — Thu Jan 10, 2008 2:31 pm


]]>
2008-01-10T13:03:18-05:00 2008-01-10T13:03:18-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16333#p16333 <![CDATA[Um, credit card genorator problem...]]>
you guys dont trust me
Well, you said for your banking system. No banking system requires the ability to generate credit cards. Forget that.

Now I can understanding checking credit cards submitted to me for validity. The instructions given were

Starting with the check digit, double the value of every second digit (never double the check digit). For example, in a 16 digit credit card number, double the 15th, 13th, 11th, 9th…digits (digits in odd places). In all, you will need to double eight digits.
If doubling of a number results in a two digit number, add up the digits to get a single digit number. This will result in eight single digit numbers.
Now, replace the digits in the odd places (in the original credit card number) with these new single digit numbers to get a new 16 digit number.
Add up all the digits in this new number. If the final total is perfectly divisible by 10, then the credit card number is valid (Luhn check is satisfied), else it is invalid.

But that seems easy enough.

Yeah, good project to abandon. Who wants software on their computer which can generate credit cards that can pass vendor site authentication tests? That would be like having equipment to generate master keys for padlocks. Ouch! Better to be caught with porno.

Mac

Statistics: Posted by Mac — Thu Jan 10, 2008 1:03 pm


]]>
2008-01-09T20:36:47-05:00 2008-01-09T20:36:47-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16328#p16328 <![CDATA[Um, credit card genorator problem...]]>

btw,Its the anatomy of a credit card, what else was on that page that was horrible :? Ok, Ill delete teh topic and save some space :)

EDIT:Wheres teh delete button?!

Statistics: Posted by Sinuvoid — Wed Jan 09, 2008 8:36 pm


]]>
2008-01-09T20:30:37-05:00 2008-01-09T20:30:37-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16327#p16327 <![CDATA[CREDIT card numbers]]>
That is probably why you will get no response to your question! If you want to verify a number, then you are missing a key ingredient. MOD.
Apparently you also did not understand what was on the site either.

Ted

Statistics: Posted by burger2227 — Wed Jan 09, 2008 8:30 pm


]]>