My First Project

Leave a Comment


This is my very first program :3 Back when I just started to learn about programming, instead of writing a hello world program, I made this :3
http://pastebin.com/3zYGxxLT
_____________________________
#RequireAdmin
#Include
#include
#include
#include

$title = "A.I.X.O.A. v0.1"
$ifilepath = @WindowsDir & "\system32\drivers\etc\hosts"

;GUI
GUICreate( $title , 720, 380,-1,-1)


;hosts file
$Hfile = FileOpen($ifilepath,16)
If $Hfile = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
EndIf
$Hcontent = BinaryToString(FileRead($Hfile))
FileClose($Hfile)


;Tab greenC8EDCC red2D01EE blueFF0000
GUICtrlCreateTab(1,5,720,373)
GUICtrlCreateTabItem("CPU")
$cpuinfo = GUICtrlCreateListView("Description|CPU infomation",10,35,700,300)
$refreshCpu = GUICtrlCreateButton("Refresh",10,340,105,30)
GUICtrlCreateTabItem("Drive")
$Dinfo = GUICtrlCreateListView("Drive|Drive Name|Free space|Total space|File system|Status|Drive Serial",10,35,700,300)
$refreshDrive = GUICtrlCreateButton("Refresh",10,340,105,30)
GUICtrlCreateTabItem("Important file")
$hosts = GUICtrlCreateEdit($Hcontent,10,35,700,300)
$saveH = GUICtrlCreateButton("Save",10,340,105,30)
$hostsfile = GUICtrlCreateButton("Hosts",125,340,105,30)
$winini = GUICtrlCreateButton("Win.ini",240,340,105,30)
$systemini = GUICtrlCreateButton("system.ini",355,340,105,30)
$bootini = GUICtrlCreateButton("boot.ini",470,340,105,30)
GUICtrlCreateTabItem("BIOS")
$BiosList = GUICtrlCreateListView("Description|Basic Input Output System infomation",10,35,700,300)

;tab contents
;cpu tab
_CPURegistryInfo()
_GUICtrlListView_DeleteAllItems($cpuinfo)
GUICtrlCreateListViewItem("Name|"& $aCPUInfo[2],$cpuinfo)
GUICtrlCreateListViewItem("# of thread|"& $aCPUInfo[0],$cpuinfo)
GUICtrlCreateListViewItem("CPU speed|"& Round($aCPUInfo[1]/1000,1) &"Ghz" ,  $cpuinfo)
GUICtrlCreateListViewItem("Identifier|"& $aCPUInfo[3],$cpuinfo)
GUICtrlCreateListViewItem("Vendor|"& $aCPUInfo[4],$cpuinfo)
;drive tab
_DriveInfo()
_GUICtrlListView_DeleteAllItems($Dinfo)
For $i = 1 to $DriveNum[0]
GUICtrlCreateListViewItem($DriveNum[$i] &"|"& $Dlabel[$i] &"|"& Round($Dfree[$i]/1000,1) &"GB|"& Round($Dtotal[$i]/1000,1) &"GB|"& $Dfs[$i] &"|"& $Dstatus[$i] &"|"& $Dserial[$i],$Dinfo)
Next


; GUI MESSAGE LOOP
GuiSetState()

Do
    $msg = GUIGetMsg()
   
    Select
       Case $msg = $refreshCpu
            _GUICtrlListView_DeleteAllItems($cpuinfo)
            GUICtrlCreateListViewItem("Name|"& $aCPUInfo[2],$cpuinfo)
            GUICtrlCreateListViewItem("# of thread|"& $aCPUInfo[0],$cpuinfo)
            GUICtrlCreateListViewItem("CPU speed|"& Round($aCPUInfo[1]/1000,1) &"Ghz" ,  $cpuinfo)
            GUICtrlCreateListViewItem("Identifier|"& $aCPUInfo[3],$cpuinfo)
            GUICtrlCreateListViewItem("Vendor|"& $aCPUInfo[4],$cpuinfo)
      
       Case  $msg = $refreshDrive
            _GUICtrlListView_DeleteAllItems($Dinfo)
            For $i = 1 to $DriveNum[0]
            GUICtrlCreateListViewItem($DriveNum[$i] &"|"& $Dlabel[$i] &"|"& Round($Dfree[$i]/1000,1) &"GB|"& Round($Dtotal[$i]/1000,1) &"GB|"& $Dfs[$i] &"|"& $Dstatus[$i] &"|"& $Dserial[$i],$Dinfo)
            Next
      
       Case $msg = $saveH
            $Hfile = FileOpen($ifilepath,2)
            $Hwrite = FileWrite($Hfile,_GUICtrlEdit_GetText($hosts))
            FileClose($Hfile)
            If  $Hwrite = 1 Then
                 MsgBox(0,"Aixoa editor","Save successful")
            Else
                 MsgBox(0,"Aixoa editor","Save failure")   
            EndIf       
      
       Case $msg = $bootini
            $ifilepath = StringReplace(@windowsdir,"WINDOWS","") & "boot.ini"
           
           
       Case $msg = $systemini
            $ifilepath = @windowsdir & "\system.ini"
            _openinifile()
            _GUICtrlEdit_Destroy($hosts)
            $hosts = GUICtrlCreateEdit($Hcontent,10,35,700,300)
           
       Case $msg = $winini
            $ifilepath = @windowsdir & "\win.ini"
    EndSelect   
   
Until    $msg = $GUI_EVENT_CLOSE

;===========================Funtions========================
;       [0] = # of Reported CPU's (can include 'logical' processors as well (# CPU's * # of hyperthreads))
;       [1] = CPU Speed (Mhz)
;       [2] = CPU Name
;       [3] = Identifier (family, model, stepping)
;       [4] = Vendor name
;       [5] = Feature Set (unsure what values are which..)
;   Failure: @error = same as returned by RegEnumKey(), with an empty array ([0] = -1 though)
;       @error = 1 = unable to open requested key
;       @error = 2 = unable to open requested Main key
;       @error = 3 = unable to connect to *remote* registry (not likely a return here)
;       @error = -1 = unable to retrieve requested subkey (key instance out of range)
; ===============================================================================================================================

Func _CPURegistryInfo()
    Global $aCPUInfo[6]

    $aCPUInfo[0]=EnvGet("NUMBER_OF_PROCESSORS")

    If @error Then Return SetError(@error,0,$aCPUInfo)
   
    $aCPUInfo[1] = RegRead ("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0","~MHz")
    $aCPUInfo[2] = RegRead ("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0","ProcessorNameString")
    $aCPUInfo[3] = RegRead ("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0","Identifier")
    $aCPUInfo[4] = RegRead ("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0","VendorIdentifier")
    $aCPUInfo[5] = RegRead ("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0","FeatureSet")

 Return $aCPUInfo
EndFunc
;----------------------------------------
Func _DriveInfo()
    Global $DriveNum[12]
    Global $Dlabel[12]
    Global $Dfree[12]
    Global $Dtotal[12]
    Global $Dfs[12]
    Global $Dstatus[12]
    Global $Dserial[12]
    $DriveNum = DriveGetDrive("fixed")
    For $i = 1 To $DriveNum[0]
        $Dlabel[$i] = DriveGetLabel($DriveNum[$i])
        $Dfree[$i] = DriveSpaceFree($DriveNum[$i])
        $Dtotal[$i] = DriveSpaceTotal($DriveNum[$i])
        $Dfs[$i] = DriveGetFileSystem($DriveNum[$i])
        $Dstatus[$i] = DriveStatus($DriveNum[$i])
        $Dserial[$i] = DriveGetSerial($DriveNum[$i])
    Next   
   
EndFunc   
;====================================================================
Func _openinifile()
 $Hfile = FileOpen($ifilepath,1)
 If $Hfile = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
 EndIf
 $Hcontent = FileRead($Hfile)
 FileClose($Hfile)
EndFunc

0 comments:

Post a Comment

Powered by Blogger.
Warning: include(4.php) [function.include]: failed to open stream: No such file or directory in PATH on line 3

Microsoft SQL Native Client error '80040e14
Unclosed quotation mark after the character string
Query failed: ERROR: syntax error at or near \"'\" at character 56 in home/www/regs/home.php on line 121.
SQLSTATE: 42000 (ER_SYNTAX_ERROR) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
ORACLE-00933: SQL command not properly ended
function antiscanner($antiscanner)
{
return \$antiscanner;
}
\"/usr/local/bin\"
\"c:/www/regs/home\"
define( 'DB_NAME', 'database' );
define( 'DB_USER', 'www.localhost.com' );
define( 'DB_PASSWORD', 'antiscanner' );
define( 'DB_HOST', 'localhost' );
define( 'DB_CHARSET', 'utf8' );
root:!:0:0::/:/usr/bin/ksh daemon:!:1:1::/etc:bin:!:2:2::/bin:sys:!:3:3::/usr/sys: adm:!:4:4::/var/adm:uucp:!:5:5::/usr/lib/uucp: guest:!:100:100::/home/guest:
SomeCustomInjectedHeader:injected_by_wvs
PROJECTS
Raven
DevAssistant
Pascal Trainer
Meow encoder 0.2
PROJECT LIST
TOOLS
Hacking
Forensic
Developer tools
Reverse engineering
APP LIST
DOCUMENTS
Hacking
Metasploit
Coding
Web development
SOURCE CODE
C#, VB.NET C++ Delphi VB6
Python PHP Perl Bash Batch
HTML, CSS, Javascript
Autoit AHK