Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - Mi4night

#1
Okay after i haven't posted anything for so long now, i coded this 2 days while I'm learning some python this Account Checker Script it works Pretty simple the script's speak's for itself.
To run it you need Python 3.1.
Let me know if you like it, or think there's something i can improve or add.
The single account check is pretty ugly yet need to read more about formating string in Python till then here it is.
(Rapidshare API makes life easier ;))
#!/usr/bin/python3
import os, sys,urllib.request

#Checking what platform we're running on to perform CLI cleaning.
if sys.platform == ('win32' or 'win64'): os.system('cls')
elif sys.platform == ('linux' or 'linux2'): os.system('clear')

print('#----------------------------------------------------------------------#')
print('# Script Name : Rapidshare Account Checker v0.1                        #')
print('# Author      : Mi4night                                               #')
print('# E-Mail      : mi4night@hotmail.com                                   #')
print('# Purpose     : rsc.py rchecklist.txt | or simply exec script          #')
print('# Usage       : At your own risk                                       #')
print('# List Format : username:password and new line                         #')
print('#----------------------------------------------------------------------#\n')

def main():
   if len(sys.argv) == 1:
      PromptedExec()
   else:
      ListCheck(sys.argv[1])

def PromptedExec():#Prompt User for Input to get Account Informations.
   Username = input("Please enter your Username:")
   Password = input("Please enter your Password:")
   print('--------------------------------------')

   try:
      if len(Username) and len(Password) != 0:
         Response = urllib.request.urlopen("http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=getaccountdetails_v1&type=prem&login="+Username+"&password="+Password)
         ResOut = Response.read()
         Response.close()

         if len(ResOut) < 44:
            print('Login failed.')
         else:
            List = ResOut
            for Items in List.split():
                print(Items)
             
           
      else:
         print ("You forgot to enter your Username or Password")
         sys.exit(0)
   except:
         print('Error Accured!')
     
def ListCheck(FileName):#Check's a list with account's if there broken or still working.

   try:
       CurrDir = os.getcwd() + '\\'
       FileHwnd = open(CurrDir + FileName)
   
       for line in FileHwnd.readlines():
           sBuffer = line
           AccountInfo = sBuffer.split(':')
           RsUsername = AccountInfo[0]
           RsPassword = AccountInfo[1]
           Response = urllib.request.urlopen("http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=getaccountdetails_v1&type=prem&login="+RsUsername+"&password="+RsPassword)
           ResOut = Response.read()
           Response.close()

           if len(ResOut) < 44:
              print('Username:{} Password:{} is not working. :('.format(RsUsername,RsPassword))
              print('------------------------------------------------------------------------')
           else:
              print('Username:{} Password:{} is working!'.format(RsUsername,RsPassword))
              print('------------------------------------------------------------------------')

              #Open File and write/append all working account's in it.
              File = open(CurrDir + 'Working Accounts.txt','a')
              File.writelines(RsUsername + ':' + RsPassword + '\n')

       print("\nAll working account's have been saved in the file (Working Account's.txt)")
       print("*************************************************************************")
       print("For suggestion's found bugs and idea's mail me mi4night@hotmail.com")

   except:
         print('Error Accured!')

   
if __name__ == '__main__':main()



#2
Hey thank you a lot Leandro one more question how would have this done using API as i know your really good at GDI.
Thanks a lot again
#3
Hey great stuff karcrack like usually!

One question what does CreateSemaphoreW  ectually do?
#4
Okay first off all Hi! all.
Okay My question is how can i create for example a Progressbar from a Image Pattern.
I know that you can't yet understand what i mean as my english is pretty poor but let me try to explain

for example i don't not load big progressbar images into my application to create a progressbar so i want use this little image here

and set it's length but i don't want to lose quality of the image by streching it so how is it possible to copy and past it over and over again until i get my disired length.
I hope i understand what i mean to say thx for any help
#5
Programación Visual Basic / [Snippet]Suicide
27 Julio 2010, 00:53 AM
Okay a thew minutes ago i was looking at some Delphi codes i had and found one that i thought why not to port it to vb6 the credit's go to Counterstrikewi  as he is the original Delphi Coder cheers
Option Explicit
'---------------------------------------------------------------------------------------
' Function    : Suicide
' DateTime    : 26.07.2009  12:23AM
' Author      : Mi4night
' Mail        : mi4night@hotmail.com
'Credits        : Counterstrikewi  
' Purpose     : A Simple Melt function that i ported from delphi,call it on the form unload event.
' Usage       : At your own risk
' Requirements: None
' Distribution: You can freely use this code in your own
'               applications, but you may not reproduce
'               or publish this code on any web site,
'               online service, or distribute as source
'               on any media without express permission.
'
'---------------------------------------------------------------------------------------
Const SW_HIDE = 0
Private Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal lBuffer As Long) As Long
Private Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (ByVal lpName As String, ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long

Public Function Suicide() As Boolean
   Dim FilePath As String * 255
   Dim CMD      As String * 255
   Dim Lng      As Long
   Suicide = False

   If GetModuleFileName(0, FilePath, 256) <> 0 Then
       Lng = lstrlen(FilePath)
       
       GetShortPathName FilePath, FilePath, Lng
       lstrcpy CMD, "/c del "
       lstrcat CMD, FilePath
       lstrcat CMD, " >> NUL"

       If (GetEnvironmentVariable("ComSpec", FilePath, 256) <> 0) And (ShellExecute(Me.hwnd, vbNullString, FilePath, CMD, 0, SW_HIDE) > 32) Then
           Suicide = True
       End If
   End If

End Function

#6
Bueno, yo use este adaptador para obtener info de mis vecinos :P
#7
Okay Played a little with the WMI today and i thought lets make something useful and done this little function which retrieves various information from active network adapters, hope you guys can use it have fun with it.

Option Explicit
'---------------------------------------------------------------------------------------
' Function : GetAdapterInfo
' DateTime : 13.07.2010 12:30PM
' Author : Mi4night
' Mail : mi4night@hotmail.com
' Purpose : Retrieve Network Adapter Information through the WMI
' Usage : At your own risk
' Requirements: None
' Distribution: You can freely use this code in your own
' applications, but you may not reproduce
' or publish this code on any web site,
' online service, or distribute as source
' on any media without express permission.
'---------------------------------------------------------------------------------------
Public Function GetAdapterInfo() As Collection
Dim objWMIService As Object
Dim AdapterConfigSet As Object
Dim AdapterConfig As Variant
Dim strComputer As String
Dim NetInfo As String
Dim i As Integer

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set AdapterConfigSet = objWMIService.ExecQuery("Select Caption,DefaultIPGateway,DNSServerSearchOrder,IPAddress,DHCPEnabled,IPSubnet,MACAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
Set GetAdapterInfo = New Collection
For Each AdapterConfig In AdapterConfigSet



For i = LBound(AdapterConfig.IPAddress) To UBound(AdapterConfig.IPAddress)

GetAdapterInfo.Add "Adapter Name :" & AdapterConfig.Caption(i) & vbCrLf & _
"IP Address :" & AdapterConfig.IPAddress(i) & vbCrLf & _
"Subnet Mask :" & AdapterConfig.IPSubnet(i) & vbCrLf & _
"Default Gateway :" & AdapterConfig.DefaultIPGateway(i) & vbCrLf & _
"DNS Server :" & AdapterConfig.DNSServerSearchOrder(i) & vbCrLf & _
"Mac Address :" & AdapterConfig.MACAddress(i) & vbCrLf & _
"DHCP Enabled :" & AdapterConfig.DHCPEnabled(i) & vbCrLf & vbNewLine
Next



Next

Set objWMIService = Nothing
Set AdapterConfigSet = Nothing
End Function
#8
Thanks *PsYkE1* but im doing it already with Images but I'm more interested for Using API instead and if you have like 12 buttons on your in different sizes it takes time to do all those images i thought more about Any Graphical API's as I never did code any grapics in vb6 i ask for help.
But thanks for your reply
#9
Hello all as i downloaded Firefox today i liked the Glow effect when I hovered over so i thought why not asking if anyone has an example of this for me as i know Leandro is a member of this forum he might have an example of doing it using API as i knew he's good at control designing.
Thanks in advanced for any reply.
#10
BlackZeroX yeah you are right about the qoutes i use, it's a bad habbit of mine.
@*PsYkE1* Yeah you get the same when using filelen then you need then only to do the calculation as i did.:P But i love API