This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
//configuration | |
VirusTotalConfig.getConfigInstance().setVirusTotalAPIKey(ApiDetails.API_KEY); | |
//initialization | |
VirustotalPublicV2 virusTotalRef = new VirustotalPublicV2Impl(); | |
ScanInfo scanInformation = virusTotalRef.scanFile(new File("src/main/resources/eicar.com.txt")); | |
//showing the result | |
System.out.println("___SCAN INFORMATION___"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
VirusTotalConfig.getConfigInstance().setVirusTotalAPIKey(ApiDetails.API_KEY); | |
VirustotalPublicV2 virusTotalRef = new VirustotalPublicV2Impl(); | |
String resource="275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f"; | |
FileScanReport report = virusTotalRef.getScanReport(resource); | |
System.out.println("MD5 :\t" + report.getMd5()); | |
System.out.println("Perma link :\t" + report.getPermalink()); | |
System.out.println("Resource :\t" + report.getResource()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
VirusTotalConfig.getConfigInstance().setVirusTotalAPIKey(ApiDetails.API_KEY); | |
VirustotalPublicV2 virusTotalRef = new VirustotalPublicV2Impl(); | |
String urls[] = {"www.cslworld.com", "www.pagero.com"}; | |
ScanInfo[] scanInfoArr = virusTotalRef.scanUrls(urls); | |
for (ScanInfo scanInformation : scanInfoArr) { | |
System.out.println("___SCAN INFORMATION___"); | |
System.out.println("MD5 :\t" + scanInformation.getMd5()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
VirusTotalConfig.getConfigInstance().setVirusTotalAPIKey(ApiDetails.API_KEY); | |
VirustotalPublicV2 virusTotalRef = new VirustotalPublicV2Impl(); | |
String urls[] = {"www.cslworld.com", "www.pagero.com"}; | |
FileScanReport[] reports = virusTotalRef.getUrlScanReport(urls, false); | |
for (FileScanReport report : reports) { | |
if(report.getResponseCode()==0){ | |
System.out.println("Verbose Msg :\t" + report.getVerboseMessage()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
VirusTotalConfig.getConfigInstance().setVirusTotalAPIKey(ApiDetails.API_KEY); | |
VirustotalPublicV2 virusTotalRef = new VirustotalPublicV2Impl(); | |
IPAddressReport report = virusTotalRef.getIPAddresReport("69.195.124.58"); | |
System.out.println("___IP Rport__"); | |
Sample[] communicatingSamples = report.getDetectedCommunicatingSamples(); | |
if (communicatingSamples != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/pkg/sftp" | |
"golang.org/x/crypto/ssh" | |
) | |
func main() { | |
addr := “my_ftp_server:22" | |
config := &ssh.ClientConfig{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kani.examlpe | |
object Main2 extends App{ | |
val appl = new Apple(120,"RED") | |
val ban1 = new Banana(10,"GREEN") | |
appl.printColour() | |
println(appl.isApplicableWeight) | |
ban1.printColour() | |
println(ban1.isApplicableLength) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kani.test | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.Future | |
import scala.util.{Failure, Success} | |
object FutureTest extends App{ | |
run() | |
while(true){} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kani.test | |
object ImplicitTest extends App{ | |
import PrinterPool._ | |
val book = Book("Harry potter","1SSS2-243FDB") | |
book.print() | |
} | |
case class Book(name : String, isbn : String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kani.test | |
import java.util.Date | |
object ImplicitFunctionTest extends App{ | |
val date = new Date() | |
f1(date) | |
def f1(timeStamp : Long): Unit ={ | |
println(s"Timestamp : $timeStamp") |
OlderNewer