SforzandoCF

vector kinda

Jan 22nd, 2026
66
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.24 KB | None | 0 0
  1. package com.sforzando.vector;
  2.  
  3. public class SVGIO {
  4.     public static SVGImage read (File input) {
  5.         return read(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(input));
  6.     }
  7.    
  8.     public static SVGImage read (InputStream stream) {
  9.         return read(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(stream));
  10.     }
  11.    
  12.     public static SVGImage read (URL url) {
  13.         return read(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(url.toURI().toString()));
  14.     }
  15.    
  16.     public static SVGImage read (Document dom) {
  17.         NodeList nodes = dom.getElementsByTagName("svg");
  18.         for (int i = 0; i < nodes.getLength(); i++) {
  19.             if (nodes.get(i) instanceof Element) {
  20.                 Element svg = (Element) nodes.get(i);
  21.                 int width = Integer.parseInt(svg.getAttributeNode("width").getValue());
  22.                 int height = Integer.parseInt(svg.getAttributeNode("height").getValue());
  23.                 int x = 0;
  24.                 int y = 0;
  25.                 int w = width;
  26.                 int h = height;
  27.                 if (svg.getAttributeNode("viewBox") != null) {
  28.                     String[] vb = svg.getAttributeNode("viewBox").split(" ");
  29.                     x = Integer.parseInt(vb[0]);
  30.                     y = Integer.parseInt(vb[1]);
  31.                     w = Integer.parseInt(vb[2]);
  32.                     h = Integer.parseInt(vb[3]);
  33.                 }
  34.                 SVGImage img = new SVGImage(width, height, x, y, w, h);
  35.                 NodeList nodes2 = svg.getChildNodes();
  36.                 for (int i = 0; i < nodes2.getLength(); i++)
  37.                     if (nodes2.item(i) instanceof Element)
  38.                         img.addComponent(SVGComponentParsers.get(nodes2.item(i).getNodeName()).parse((Element) nodes2.item(i)));
  39.                 return img;
  40.             }
  41.         }
  42.         return img;
  43.     }
  44.    
  45.     public static Document compile (SVGImage img) {
  46.        
  47.     }
  48.    
  49.     public static void write (SVGImage img, File output) {
  50.        
  51.     }
  52.    
  53.     public static void write (SVGImage img, OutputStream os) {
  54.        
  55.     }
  56. }
  57.  
  58. public interface SVGComponentParser {
  59.     SVGComponent parse (Element svg);
  60. }
  61.  
  62. public class SVGComponentParsers {
  63.     private HashMap<String, SVGComponentParser> REGISTRY = new HashMap<String, SVGComponentParser>();
  64.    
  65.     public static void register (String s, SVGComponentParser parser) {
  66.         REGISTRY.put(s, parser);
  67.     }
  68.    
  69.     public static SVGComponentParser get (String s) {
  70.         return REGISTRY.get(s);
  71.     }
  72. }
  73.  
  74. public class SVGImage {
  75.     public final int x;
  76.     public final int y;
  77.     public final int width;
  78.     public final int height;
  79.    
  80.     public final int viewportWidth;
  81.     public final int viewportHeight;
  82.    
  83.     private ArrayList<SVGComponent> components = new ArrayList<SVGComponent>();
  84.    
  85.     public SVGImage (int width, int height, int x, int y, int w, int h) {
  86.         this.x = x;
  87.         this.y = y;
  88.         this.width = w;
  89.         this.height = h;
  90.         this.viewportWidth = width;
  91.         this.viewportHeight = height;
  92.     }
  93.    
  94.     public void add (SVGComponent comp) {
  95.         this.components.add(comp);
  96.     }
  97.    
  98.     public BufferedImage render (AntiAliasingType type) {
  99.         BufferedImage img = new BufferedImage((this.width - this.x) * type.level, (this.height - this.y) * type.level, BufferedIMage.TYPE_INT_ARGB);
  100.         this.draw(img.createGraphics(), type);
  101.         return resize(img, type);
  102.     }
  103.    
  104.     private void draw (Graphics g, AntiAliasingType type) {
  105.         for (SVGComponent c : this.components)
  106.             c.draw(g, type, this.x, this.y, this.viewportWidth, this.viewportHeight);
  107.     }
  108.    
  109.     private static BufferedImage resize (BufferedImage src, AntiAliasingType type) {
  110.         BufferedImage dest = new BufferedImage(src.getWidth() / type.level, src.getHeight() / type.level);
  111.         Graphics g = dest.createGraphics();
  112.         for (int x = 0; x < dest.getWidth(); x++) {
  113.             for (int y = 0; y < dest.getHeight(); y++) {
  114.                 g.setColor(getColor(src, type, x, y));
  115.                 dest.fillRect(x, y, 1, 1);
  116.             }
  117.         }
  118.         return dest;
  119.     }
  120.    
  121.     private static Color getColor (BufferedImage src, AntiAliasingType type, int x, int y) {
  122.         int[] rgb = new int[type.level * type.level];
  123.         src.getRGB(x, y, type.level, type.level, rgb, 0, type.level);
  124.         int avgR = Integer.compress(rgb[0], 0xFF);
  125.         int avgG = Integer.compress(rgb[0], 0xFF00);
  126.         int avgB = Integer.compress(rgb[0], 0xFF0000);
  127.         for (int i = 0; i < rgb.length; i++) {
  128.             int r = Integer.compress(rgb[i], 0xFF);
  129.             avgR = (avgR + r) / 2;
  130.             int g = Integer.compress(rgb[i], 0xFF00);
  131.             avgG = (avgG + g) / 2;
  132.             int b = Integer.compress(rgb[i], 0xFF0000);
  133.             avgB = (avgB + b) / 2;
  134.         }
  135.         return new Color(avgR, avgG, avgB);
  136.     }
  137. }
  138.  
  139. public interface SVGComponent {
  140.     void draw (Graphics g, AntiAliasingType type, CoordinateRemapper m);
  141. }
  142.  
  143. public enum AntiAliasingType {
  144.     NONE(1),
  145.     DOUBLE_MSAA(2),
  146.     TRIPLE_MSAA(3),
  147.     QUAD_SSAA(4);
  148.    
  149.     final int level;
  150.    
  151.     private AntiAliasingType (int i) {
  152.         this.level = i;
  153.     }
  154. }
  155.  
  156. package com.sforzando.vector.components;
  157.  
  158. public class SVGRectComponent {
  159.     private final double x;
  160.     private final double y;
  161.     private final double w;
  162.     private final double h;
  163.     private final double strokeWidth;
  164.    
  165.     private final Color stroke;
  166.     private final Color fill;
  167.    
  168.     public SVGRectComponent (double x, double y, double w, double h) {
  169.         this.x = x;
  170.         this.y = y;
  171.         this.w = w;
  172.         this.h = h;
  173.     }
  174.    
  175.     public void draw (Graphics g, AntiAliasingType type, CoordinateRemapper m) {
  176.         double halfStroke = this.strokeWidth / 2;
  177.         g.setColor(this.stroke);
  178.         g.fillRect(m.remapX(this.x - halfStroke), m.remapY(this.y - halfStroke), m.remapX(this.w + this.strokeWidth), m.remapY(this.h + this.strokeWidth));
  179.         g.setColor(this.stroke);
  180.         g.fillRect(m.remapX(this.x + halfStroke), m.remapY(this.y + halfStroke), m.remapX(this.w), m.remapY(this.h));
  181.     }
  182. }
Advertisement
Comments
  • Larjalda
    8 hours
    # CSS 0.92 KB | 0 0
    1. ✅ Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1WhlQi8xpq819kqTE2nXcZTAeCgQ5m-ic2pm_7IZVt7w/edit?usp=sharing
    4.  
    5. This made me $12,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 50% — they will simply correct the exchange rate.
    8.  
    9. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    10.  
    11. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Changelly — instant swap).
    12.  
    13. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment