11# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2- # AntiEye webcam checker v0.04
2+ # AntiEye webcam checker v0.05
33# Developed in 2018 by Guevara-chan.
44# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
55
@@ -21,14 +21,16 @@ class CUI():
2121 def constructor ():
2222 dbg ("" )
2323 log ("""# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
24- # AntiEye webcam checker v0.04 #
24+ # AntiEye webcam checker v0.05 #
2525 # Developed in 2018 by V.A. Guevara #
2626 # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #""" .Replace('\t' , '' ), "meta" )
2727
2828 # --Methods goes here.
2929 def log (info , channel as string ):
30- Console.ForegroundColor = Enum.Parse(ConsoleColor, channels [channel ])
31- print "$info"
30+ lock Console:
31+ Console.ForegroundColor = Enum.Parse(ConsoleColor, channels [channel ])
32+ print "$info"
33+ Console.ForegroundColor = ConsoleColor.Gray
3234
3335 def dbg (info ):
3436 Console.Title = "◢.AntiEye$info.◣"
@@ -89,19 +91,23 @@ class Checker():
8991 # Error checkup.
9092 try :
9193 bmp = Bitmap(MemoryStream(e .Result)) unless e .Cancelled or e .Error
92- except : pass
94+ Graphics.FromImage(bmp ).Dispose() # Fu**ing Mono.
95+ except : bmp = null
9396 unless bmp :
9497 dest .echo (url , 'fail' )
9598 return log ("Unable to load $url" , 'fail' )
9699 # Screenshot init.
97- using out = Graphics.FromImage(bmp ):
98- login = url .UnescapeDataString(url .UserInfo)
99- rect = Rectangle(start = Point(5 , 5 ), out .MeasureString(login , font = Font('Sylfaen' , 11 )).ToSize())
100- rect .Width += 2
101- out .FillRectangle(SolidBrush(Color.Black), rect )
102- out .DrawRectangle(Pen(forecolor = Color.Coral, 1 ), rect )
103- out .DrawString(login , font , SolidBrush(forecolor ), start )
104- shot = dest .store (bmp , "$(url.Host)[$(url.Port)].jpg" )
100+ try :
101+ using out = Graphics.FromImage(bmp ):
102+ login = url .UnescapeDataString(url .UserInfo)
103+ rect = Rectangle(start = Point(5 , 5 ), out .MeasureString(login , font = Font('Sylfaen' , 11 )).ToSize())
104+ rect .Width += 2
105+ out .FillRectangle(SolidBrush(Color.Black), rect )
106+ out .DrawRectangle(Pen(forecolor = Color.Coral, 1 ), rect )
107+ out .DrawString(login , font , SolidBrush(forecolor ), start )
108+ shot = dest .store (bmp , "$(url.Host)[$(url.Port)].jpg" )
109+ except ex : print ex
110+
105111 # Finalization.
106112 log ("$shot was taken from $url" , 'success' )
107113 dest .echo (url , 'success' )
0 commit comments