ClusterM

IP Subnet Calculator

Jun 7th, 2025 (edited)
231
0
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. Let's create an IP address and subnet calculator. Often we have two sets of IP addresses/subnets, and we need to perform operations on them:
  2. * Subtract one set from another. For example, subtracting "192.168.1.1/32" from "0.0.0.0/0" should yield "0.0.0.0/1, 128.0.0.0/2, 224.0.0.0/3, 208.0.0.0/4, 200.0.0.0/5, 196.0.0.0/6, 194.0.0.0/7, 193.0.0.0/8, 192.0.0.0/9, 192.192.0.0/10, 192.128.0.0/11, 192.176.0.0/12, 192.160.0.0/13, 192.172.0.0/14, 192.170.0.0/15, 192.169.0.0/16, 192.168.128.0/17, 192.168.64.0/18, 192.168.32.0/19, 192.168.16.0/20, 192.168.8.0/21, 192.168.4.0/22, 192.168.2.0/23, 192.168.0.0/24, 192.168.1.128/25, 192.168.1.64/26, 192.168.1.32/27, 192.168.1.16/28, 192.168.1.8/29, 192.168.1.4/30, 192.168.1.2/31, 192.168.1.0/32".
  3. * Combine (merge) the two sets, optimizing the result as much as possible.
  4. * Find intersections.
  5.  
  6. Let's implement this calculator as a simple HTML page, entirely in JavaScript!
  7. We need two input fields for subnet sets. Subnets should be accepted in multiple formats:
  8. * Just an IP address (e.g., "192.168.5.6")
  9. * IP address with mask length (e.g., "192.168.5.0/24")
  10. * IP address with subnet mask (e.g., "192.168.5.0/255.255.255.0")
  11.  
  12. Allow input of multiple subnets separated by commas or spaces.
  13.  
  14. Provide options to choose the operation type (subtract, merge, intersect) and select output format.
  15.  
  16. IPv4 only.
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Monxelen
    24 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
  • User was banned
Add Comment
Please, Sign In to add comment