Advertisement
Guest User

faster brute forcing

a guest
Jun 29th, 2023
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. p=1033 #your lower factor
  2. q=108271
  3. n = p*q
  4.  
  5. i = 2
  6. val = 2
  7. while n%val != 0:
  8. qr = (n - (((9**(i))*2)%n))+2
  9. m = qr
  10. val = ((n/((((n+m)/(n-m))**0.5)-1))**0.5) + (((i-(((n/((((n+m)/(n-m))**0.5)-1))**0.5)/2))*2)+1)
  11. print(f"i: {i}, val: {val}")
  12. if n%val == 0:
  13. print("found p and q!")
  14. break
  15. i = i + 1
  16.  
  17. #I also have a version that may work for (p||q)/30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement