This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Daemon
Pages: [1] 2 3 4 5 6 7 8 ... 12
1
« on: October 05, 2011, 01:34:25 PM »
What about Linux Mint?
2
« on: September 28, 2011, 11:44:39 AM »
thank you all
3
« on: September 27, 2011, 10:59:10 AM »
4
« on: May 22, 2011, 02:37:30 AM »
Thanks
5
« on: May 21, 2011, 11:07:46 AM »
I made first part and still working on defragment
6
« on: May 20, 2011, 03:29:58 PM »
Hello, everyone. I need some help with python. I'm writing program that helps controlling virtual machines. So, the main problems are: How to collect such information like:
- IP address of virtual machine
- data storage of vm
And also:
- DefragmentAllDisks + power On
from suds.client import Client from suds.sudsobject import Property
#import logging #logging.basicConfig(level=logging.INFO) #logging.getLogger('suds.client').setLevel(logging.DEBUG) #logging.getLogger('suds.wsdl').setLevel(logging.DEBUG)
data_file = open("pass.txt", "r") for line in data_file: # strip white space from line line = line.strip() # ignore empty lines if not line: continue
# split using your seperating character user, password = line.split(' ') # convert string to float values
url = 'xxxxxx'
client = Client(url)
client.set_options(location='xxxxxx')
mo_ServiceInstance = Property('ServiceInstance') mo_ServiceInstance._type = 'ServiceInstance'
ServiceContent = client.service.RetrieveServiceContent(mo_ServiceInstance)
mo_SessionManager = Property(ServiceContent.sessionManager.value) mo_SessionManager._type = 'SessionManager'
SessionManager = client.service.Login(mo_SessionManager, user, password)
# Traversal Specs FolderTraversalSpec = client.factory.create('ns0:TraversalSpec') DatacenterVMTraversalSpec = client.factory.create('ns0:TraversalSpec')
FolderSelectionSpec = client.factory.create('ns0:SelectionSpec') DatacenterVMSelectionSpec = client.factory.create('ns0:SelectionSpec')
FolderSelectionSpec.name = "FolderTraversalSpec" DatacenterVMSelectionSpec.name = "DatacenterVMTraversalSpec"
DatacenterVMTraversalSpec.name = "DatacenterVMTraversalSpec" DatacenterVMTraversalSpec.type = "Datacenter" DatacenterVMTraversalSpec.path = "vmFolder" DatacenterVMTraversalSpec.skip = True
FolderTraversalSpec.name = "FolderTraversalSpec" FolderTraversalSpec.type = "Folder" FolderTraversalSpec.path = "childEntity" FolderTraversalSpec.skip = True
DatacenterVMTraversalSpec.selectSet = [FolderSelectionSpec] FolderTraversalSpec.selectSet = [DatacenterVMSelectionSpec, FolderSelectionSpec]
# Property Spec
propSpec = client.factory.create('ns0:PropertySpec') propSpec.all = False propSpec.pathSet = ["name", "runtime"] propSpec.type = "VirtualMachine"
# Object Spec
mo_RootFolder = Property(ServiceContent.rootFolder.value) mo_RootFolder._type = 'Folder'
objSpec = client.factory.create('ns0:ObjectSpec') objSpec.obj = mo_RootFolder objSpec.selectSet = [ FolderTraversalSpec, DatacenterVMTraversalSpec ]
# PropertyFilterSpec
propFilterSpec = client.factory.create('ns0:PropertyFilterSpec') propFilterSpec.propSet = [ propSpec ] propFilterSpec.objectSet = [ objSpec ]
# RetrieveProperties
mo_PropertyCollector = Property(ServiceContent.propertyCollector.value) mo_PropertyCollector._type = 'PropertyCollector' objContent = client.service.RetrieveProperties(mo_PropertyCollector, propFilterSpec) # --
# print results
def properties_to_dict(entity): props = {}
props['_type'] = entity.obj._type props['mo_ref'] = entity.obj.value
for dynProp in entity.propSet: props[dynProp.name] = dynProp.val
return props
virtual_machines = map(properties_to_dict, objContent) hname = ipaddr = None
for vm in virtual_machines: print "Virtual Machine: "+vm['name'] print "(PowerState : "+str(vm['runtime'])+")" print "\n"
so, any suggestions?
7
« on: December 15, 2010, 05:42:00 PM »
Please elaborate. Are you talking about Python? What exactly do you want it to do?
No, its smt like his:
.model tiny .286 .code org 100h start: mov ax,3 int 10h; чищу экран mov ah,9 mov dx,offset string1; выводим приглашение на ввод int 21h mov ah,0Ah mov dx,offset string2; получаем число int 21h mov ah,9 mov dx,offset string14; выводим результат на экран int 21h mov bh,0 mov bl,string2[2] sub bl,'0'; из ASCII-кода символа получаю число shl bx,1; умножаю полученное число на 2 mov dx,string13[bx]; нахожу адрес ответа mov ah,9 int 21h ; вывожу результат на экран mov ah,0; ждем пока не нажмут любую клавишу int 16h retn; выходим из программы string1 db 'Введите число от 0 до 9 и нажмите Enter',0Dh,0Ah,"$" string14 db 0Dh,0Ah,'результат равен $' string2 db 2,0,?,?,?; буфер для ввода числа string3 db '0$';0 string4 db '1$';0+1=1 string5 db '3$';0+1+2=3 string6 db '6$';0+1+2+3=6 string7 db '10$';0+1+2+3+4=10 string8 db '15$';0+1+2+3+4+5=15 string9 db '21$';0+1+2+3+4+5+6=21 string10 db '28$';0+1+2+3+4+5+6+7=28 string11 db '36$';0+1+2+3+4+5+6+7+8=36 string12 db '45$';0+1+2+3+4+5+6+7+8+9=45 string13 dw string3,string4,string5,string6,string7; адреса ответов dw string8,string9,string10,string11,string12 end start
Holy shit comments in Russian. I do some ASM programming (x86 [Bare Metal, Windows and some Linux] and a little bit of ARM). Why are you writing 16-bit code?
У тебя нету образцов ассемблера? Просто мне нужно до этого понедельника написать прогу на асме, которая считывает из .com файла машинный код и записывает его в .txt. напр.: 0100: B409 mov ah, 09 0102: BADE01 mov dx, 01DE 0105: CD21 int 21 0107: B40A mov ah, 0A 0109: BA6301 mov dx, 0163 010C: CD21 int 21 010E: B409 mov ah, 09 0110: BA1102 mov dx, 0211 0113: CD21 int 21 0115: 32ED xor ch, ch 0117: 2BC0 sub ax, ax 0119: 8A0E6401 mov cl, [0164] 011D: BB6501 mov bx, 0165 0120: B241 mov dl, 41 0122: B65A mov dh, 5A 0124: 3A17 cmp dl, [bx] 0126: 7F05 jg 012D 0128: 3A37 cmp dh, [bx] 012A: 7C01 jl 012D 012C: 40 inc ax 012D: 43 inc bx 012E: 49 dec cx 012F: 83F900 cmp cx, 00 0132: 7FF0 jg 0124 0134: B20A mov dl, 0A 0136: F6F2 div dl 0138: 88261002 mov [0210], ah 013C: 8006100230 add byte ptr [0210], 30
Проблема в том, что я просто не успеваю, так как разные контр. каждый день. P.S. в каком универе учат прорамировать под линукс на асме?)
8
« on: December 13, 2010, 10:52:00 AM »
Please elaborate. Are you talking about Python? What exactly do you want it to do?
No, its smt like his: .model tiny .286 .code org 100h start: mov ax,3 int 10h; чищу экран mov ah,9 mov dx,offset string1; выводим приглашение на ввод int 21h mov ah,0Ah mov dx,offset string2; получаем число int 21h mov ah,9 mov dx,offset string14; выводим результат на экран int 21h mov bh,0 mov bl,string2[2] sub bl,'0'; из ASCII-кода символа получаю число shl bx,1; умножаю полученное число на 2 mov dx,string13[bx]; нахожу адрес ответа mov ah,9 int 21h ; вывожу результат на экран mov ah,0; ждем пока не нажмут любую клавишу int 16h retn; выходим из программы string1 db 'Введите число от 0 до 9 и нажмите Enter',0Dh,0Ah,"$" string14 db 0Dh,0Ah,'результат равен $' string2 db 2,0,?,?,?; буфер для ввода числа string3 db '0$';0 string4 db '1$';0+1=1 string5 db '3$';0+1+2=3 string6 db '6$';0+1+2+3=6 string7 db '10$';0+1+2+3+4=10 string8 db '15$';0+1+2+3+4+5=15 string9 db '21$';0+1+2+3+4+5+6=21 string10 db '28$';0+1+2+3+4+5+6+7=28 string11 db '36$';0+1+2+3+4+5+6+7+8=36 string12 db '45$';0+1+2+3+4+5+6+7+8+9=45 string13 dw string3,string4,string5,string6,string7; адреса ответов dw string8,string9,string10,string11,string12 end start
9
« on: December 07, 2010, 03:23:20 PM »
Anyone knows how to write programs on assembler?
10
« on: December 05, 2010, 08:50:05 AM »
11
« on: December 05, 2010, 07:04:55 AM »
It is delightful
12
« on: December 01, 2010, 05:32:12 AM »
13
« on: December 01, 2010, 05:15:59 AM »
yep, I made them all
14
« on: November 28, 2010, 02:34:04 PM »
15
« on: November 18, 2010, 05:19:24 AM »
I know this situation:D It often happens
16
« on: November 14, 2010, 04:09:28 PM »
I've only ever played the early games admittedly. Apart from those, I never really caught on to it.
So why do you posting them?
17
« on: November 14, 2010, 04:08:15 PM »
18
« on: November 14, 2010, 03:59:38 PM »
Yes, of course. I choose:
MOV AH,09 MOV AL,' ' MOV BH,00 MOV BL,0F0H MOV CX,905 INT 10H
Pokemons mean the same thing to me as well as this to you.
19
« on: November 14, 2010, 03:55:06 PM »
These pokemon jokes not funny at all.
20
« on: November 09, 2010, 03:08:27 PM »
Pages: [1] 2 3 4 5 6 7 8 ... 12
|