Example #1
0
 def executa(self,event=None):
         recordid=random.randint(20,10055)
 #       originator=self.orig_text.GetValue()
         #os.system('perl /home/obiero/codonopt/codonOpt-test.pl %s' %originator)
         self.domain_name = self.orig_text.GetValue() 
         #wx.MessageBox('Domain:' +self.domain_name, 'MTN') 
         answer = ""
         gal = kate.mtn()
         magochi = gal.get_whois_data(self.domain_name)
         for line in magochi.split("\n"):
                 if "xpir" in line:
                         #print "Domain :"+domain_name, line.strip()
                         answer = line.strip()
         #wx.MessageBox(""+self.domain_name+": =>  :"+answer, 'MTN Business(K)  - results') 
         dlg = wx.MessageDialog(self,""+self.domain_name+": =>  :"+answer+"\n\n\nDo you wish to view entire WHOIS result ?",'MTN Business(K)  - results', wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
         if dlg.ShowModal() == wx.ID_YES:
                 du = wx.lib.dialogs.ScrolledMessageDialog(self,''+magochi, " Entire -WHOIS Results ")
                 du.ShowModal()
Example #2
0
 def worker_thread(self,event=None) :
         #Get the domain name from the input control
         self.domain = self.orig_text.GetValue() 
         #domain = self.txtServer.GetValue()
         if self.domain == '':
                 wx.MessageBox('Please Enter the domain name','Error')
               
         gal = kate.mtn()
         #magochi = gal.get_whois_data(self.domain_name)
 #Get the whois data
         #whois_data = self.perform_whois(domain)
         
         
         whois_data = gal.perform_whois(self.domain)
                               
         #print whois_data
         r = self.orig_text
         r.SetValue('')
         r.AppendText(whois_data)