Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 332 Vote(s) - 3.4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[source] Data_file_Uri coded by_Hu3c0

#1
Hi brothers today I want to share with all of you this simply code Why...? because the best way to learn for me it's read and read a lots off code.
Okey without more preambles this code give you a base64 data image from whatever image or gif in your pc or url. What does the code? in the
example html has been explained.
Quote:import com.sun.org.apache.xml.internal.security.utils.JavaUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Base64;

import java.util.Scanner;



public class File_Uri_Base {


public static void main(String[] args) throws FileNotFoundException, IOException {

Scanner sc = new Scanner(System.in);
System.out.println("Introduce the image Path please...");
String inkey= sc.nextLine();
File fl= new File (inkey);
FileInputStream fis = new FileInputStream(fl);
byte [] getbyte=JavaUtils.getBytesFromStream(fis);
String encoded = Base64.getEncoder().encodeToString(getbyte);
String outfile="<html><body><img src=\""+"data:image/png;base64,"+encoded+"\"></body></html>";

File f = new File("/home/Hu3c0/Desktop/image.html");
try (FileWriter fw = new FileWriter(f)) {
fw.write(outfile);
fw.flush();
}
I hope you like my friends and I hope would be helpfull
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through