Guest User

%ADD%, %SUB%, and %CMP% - small macros for doing fast math with big integers

a guest
May 30th, 2026
133
0
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.74 KB | Source Code | 0 0
  1. (SET \n=^^^
  2. %= This defines an escaped Line Feed - DO NOT ALTER =%
  3. )
  4.  
  5. :: addition - group values by 8 digits, add values, collect carry, assemble answer
  6. :: %ADD% Sum=Integer1+Integer2
  7. SET ADD=FOR %%# IN (1 2)DO IF %%#==2 (%\n%
  8. SET N=%\n%
  9. SET W=0%\n%
  10. FOR /F "tokens=1-3 delims==+ " %%A IN ("!##!")DO (%\n%
  11. SET V=%%A%\n%
  12. SET #1=000000000000000%%B%\n%
  13. SET #2=000000000000000%%C)%\n%
  14. FOR /L %%A IN (8,8,16)DO (%\n%
  15. SET/A T=W+1!#1:~-%%A,8!+1!#2:~-%%A,8!,W=T/300000000%\n%
  16. SET N=!T:~1!!N!)%\n%
  17. FOR /F "tokens=1* delims=0" %%A IN ("!V!0!W!!N!")DO (%\n%
  18. ENDLOCAL%\n%
  19. SET %%A=%%B)%\n%
  20. )ELSE SETLOCAL EnableDelayedExpansion^&SET ##=
  21.  
  22. :: subtraction - only subtract lesser from greater, all non-positive results are zero.
  23. :: %SUB% Sum=Integer1-Integer2
  24. SET SUB=FOR %%# IN (1 2)DO IF %%#==2 (%\n%
  25. SET N=%\n%
  26. SET W=0%\n%
  27. FOR /F "tokens=1-3 delims==- " %%A IN ("!##!")DO (%\n%
  28. SET V=%%A%\n%
  29. SET #1=000000000000000%%B%\n%
  30. SET #2=000000000000000%%C)%\n%
  31. FOR /L %%A IN (8,8,16)DO (%\n%
  32. SET/A T=3!#1:~-%%A,8!-1!#2:~-%%A,8!+W,W=T/200000000-1%\n%
  33. SET N=!T:~1!!N!)%\n%
  34. FOR /F "tokens=1* delims=0" %%A IN ("!V!0!N!")DO (%\n%
  35. ENDLOCAL%\n%
  36. SET %%A=%%B)%\n%
  37. )ELSE SETLOCAL EnableDelayedExpansion^&SET ##=
  38.  
  39. :: %CMP% Integer1 Integer2
  40. :: returns result in both ERRORLEVEL and return variable CMP_
  41. :: 0 if int1<int2, 1 if int1=int2, >1 if int1>int2
  42. SET CMP=FOR %%# IN (1 2)DO IF %%#==2 (%\n%
  43. FOR /F "tokens=1-2" %%A IN ("!##!")DO (%\n%
  44. SET #1=000000000000000%%A%\n%
  45. SET #2=000000000000000%%B)%\n%
  46. FOR /F "tokens=1-2" %%A IN ("!#1:~-16! !#2:~-16!")DO (ENDLOCAL%\n%
  47. IF "%%A" LSS "%%B" SET CMP_=0^&COLOR%\n%
  48. IF "%%A" EQU "%%B" SET CMP_=1^&COLOR 00%\n%
  49. IF "%%A" GTR "%%B" SET CMP_=2^&SET/A=2^>NUL)%\n%
  50. )ELSE SETLOCAL EnableDelayedExpansion^&SET ##=
  51.  
  52. ::by CirothUngol
Tags: batch
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Hayadyc
    18 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment