Jump to content

Mosoo

Members
  • Posts

    7
  • Joined

  • Last visited

Mosoo's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi @ all, cause i need that rly often, i wanted to make a little script that autmaticly uploads a Photo to my facebook account. (assumed that im logged in allready) i searched and found the _winhttp udf. Found it very usefull. Played around with it, but i cant figure out how to send data over Post. I.g i dont know how the data has to be encoded. Live-http headers provides some undisplayable code at the end. Also i dont know whats about some random numbers between the lines.. If one has no Facebook, here is the testsite from the Winhttp-helpfile. Down at the page is one example where data is uploaded. Hope somebody can help me.
  2. Thats pretty perfect.. Ty
  3. Hi Guys I tried to get the adress of the PEB of the own process , it seems to work but the return value is wrong.. Can anyone took a look at the script and show me where the failure is.. The structures and methodic were taken from a script by trancexx ty $hProcess = DllCall("kernel32.dll", "handle", "GetCurrentProcess") $hThread = DllCall("kernel32.dll", "handle", "GetCurrentThread") $interpreter_type = @AutoItX64 ConsoleWrite("x64 Interpreter? = " & $interpreter_type &@CRLF) If $interpreter_type Then $iRunFlag = 2 $tCONTEXT = DllStructCreate("align 16; uint64 P1Home; uint64 P2Home; uint64 P3Home; uint64 P4Home; uint64 P5Home; uint64 P6Home;" & _ ; Register parameter home addresses "dword ContextFlags; dword MxCsr;" & _ ; Control flags "word SegCS; word SegDs; word SegEs; word SegFs; word SegGs; word SegSs; dword EFlags;" & _ ; Segment Registers and processor flags "uint64 Dr0; uint64 Dr1; uint64 Dr2; uint64 Dr3; uint64 Dr6; uint64 Dr7;" & _ ; Debug registers "uint64 Rax; uint64 Rcx; uint64 Rdx; uint64 Rbx; uint64 Rsp; uint64 Rbp; uint64 Rsi; uint64 Rdi; uint64 R8; uint64 R9; uint64 R10; uint64 R11; uint64 R12; uint64 R13; uint64 R14; uint64 R15;" & _ ; Integer registers "uint64 Rip;" & _ ; Program counter "uint64 Header[4]; uint64 Legacy[16]; uint64 Xmm0[2]; uint64 Xmm1[2]; uint64 Xmm2[2]; uint64 Xmm3[2]; uint64 Xmm4[2]; uint64 Xmm5[2]; uint64 Xmm6[2]; uint64 Xmm7[2]; uint64 Xmm8[2]; uint64 Xmm9[2]; uint64 Xmm10[2]; uint64 Xmm11[2]; uint64 Xmm12[2]; uint64 Xmm13[2]; uint64 Xmm14[2]; uint64 Xmm15[2];" & _ ; Floating point state (types are not correct for simplicity reasons!!!) "uint64 VectorRegister[52]; uint64 VectorControl;" & _ ; Vector registers (type for VectorRegister is not correct for simplicity reasons!!!) "uint64 DebugControl; uint64 LastBranchToRip; uint64 LastBranchFromRip; uint64 LastExceptionToRip; uint64 LastExceptionFromRip") ; Special debug control registers Else $iRunFlag = 1 $tCONTEXT = DllStructCreate("dword ContextFlags;" & _ ; Control flags "dword Dr0; dword Dr1; dword Dr2; dword Dr3; dword Dr6; dword Dr7;" & _ ; CONTEXT_DEBUG_REGISTERS "dword ControlWord; dword StatusWord; dword TagWord; dword ErrorOffset; dword ErrorSelector; dword DataOffset; dword DataSelector; byte RegisterArea[80]; dword Cr0NpxState;" & _ ; CONTEXT_FLOATING_POINT "dword SegGs; dword SegFs; dword SegEs; dword SegDs;" & _ ; CONTEXT_SEGMENTS "dword Edi; dword Esi; dword Ebx; dword Edx; dword Ecx; dword Eax;" & _ ; CONTEXT_INTEGER "dword Ebp; dword Eip; dword SegCs; dword EFlags; dword Esp; dword SegSs;" & _ ; CONTEXT_CONTROL "byte ExtendedRegisters[512]") ; CONTEXT_EXTENDED_REGISTERS EndIf Switch $iRunFlag Case 1 $CONTEXT_FULL = 0x10007 Case 2 $CONTEXT_FULL = 0x100007 EndSwitch $set = DllStructSetData($tCONTEXT, "ContextFlags", $CONTEXT_FULL) $aCall = DllCall("kernel32.dll", "bool", "GetThreadContext", _ "handle", $hThread[0], _ "ptr", DllStructGetPtr($tCONTEXT)) If @error Or Not $aCall[0] Then MsgBox(16,"","call to GetThreadContext failed") EndIf Local $pPEB Switch $iRunFlag Case 1 $pPEB = DllStructGetData($tCONTEXT, "Ebx") Case 2 $pPEB = DllStructGetData($tCONTEXT, "Rdx") EndSwitch MsgBox(0,"","PEB adr: " & hex($pPEB) &@CRLF)
  4. I red the article and edited these two problems But still the code allways produces the same numbers .. I would have edited this in the first post, but i cant o0 regardless i'll do it here : #include<array.au3> Opt("MustDeclareVars", 1) local $random = mersenne_twister() ConsoleWrite($random&@CRLF) Func mersenne_twister() Const $N = 624 Const $M = 397 Const $A[2] = [0x0,0x9908b0df] Const $HI = 0x8000000 Const $LO = 0x7fffffff Static $Y[$N] Static $index = $N+1 if $index >= $N Then if $index > $N Then local $r = 9, $s = 3402 local $i = 0 while $i < $N $r = 509845221 * $r + 3 $s *= $s+1 $y[$i] = $s + BitShift($r,10) $i+=1 wend EndIf _ArrayDisplay($y) Local $h, $k = 0 while $k < ($N-$M) $h =BitOR(BitAND($y[$k],$HI),BitAND($y[$k+1],$LO)) $y[$k] = BitXOR($y[$k+$M] , BitShift($h,1) , $A[BitAND($h,1)]) $k +=1 WEnd $k = $N-$M while $k < $N-1 $h =BitOR(BitAND($y[$k],$HI),BitAND($y[$k+1],$LO)) $y[$k] = BitXOR($y[$k+($M-$N)] , BitShift($h,1) , $A[BitAND($h,1)]) $k +=1 wend $h = BitOR(BitAND($y[$N-1],$HI),BitAND($y[0],$LO)) $y[$n-1] = BitXOR($y[$M-1],BitShift($h,1),$A[BitAND($h,1)]) $index = 0 EndIf Local $e = $Y[$index] $index += 1 ;~ tempering: $e = BitXOR($e,BitShift($e,11)) $e = BitXOR($e,BitAND(BitShift($e,-7),0x9d2c5680)) $e = BitXOR($e,BitAND(BitShift($e,-15),0xefc60000)) $e = BitXOR($e,BitShift($e,18)) Return $e EndFunc
  5. Hi coders, I know this is sensless and the random() func still uses this algo. but i want to give it a try cause of exercise, and I failed .. I wanted to write the Mersenne-twister in AutoIt language but it did not work.. i think the problem is the work with unsigned numbers.. Can anyone take a look at the original C -source and help me? My Code so far : ยด#include<array.au3> Opt("MustDeclareVars", 1) for $i = 0 to 5 local $random = mersenne_twister() ConsoleWrite($random&@CRLF) next Func mersenne_twister() Const $N = 624 Const $M = 397 Dim $A[2] = [0x0,0x9908b0df] Const $HI = 0x8000000 Const $LO = 0x7fffffff Dim $Y[$N] local $index = $N+1 if $index >= $N Then if $index > $N Then local $r = 9, $s = 3402 local $i = 0 while $i < $N ;~ $i+=1 $r = 509845221 * $r + 3 $s *= $s+1 $y[$i] = $s + BitShift($r,10) $i+=1 wend EndIf ;~ _ArrayDisplay($y) Local $h, $k = 0 while $k < ($N-$M) ;~ $k +=1 $h =BitOR(BitAND($y[$k],$HI),BitAND($y[$k+1],$LO)) $y[$k] = BitXOR($y[$k+$M] , BitShift($h,1) , $A[BitAND($h,1)]) $k +=1 WEnd $k = $N-$M while $k < $N-1 ;~ $k +=1 $h =BitOR(BitAND($y[$k],$HI),BitAND($y[$k+1],$LO)) $y[$k] = BitXOR($y[$k+($M-$N)] , BitShift($h,1) , $A[BitAND($h,1)]) $k +=1 wend $h = BitOR(BitAND($y[$N-1],$HI),BitAND($y[0],$LO)) $y[$n-1] = BitXOR($y[$M-1],BitShift($h,1),$A[BitAND($h,1)]) $index = 0 EndIf Local $e = $y[$index+1] ;~ tempering: $e = BitXOR($e,BitShift($e,11)) $e = BitXOR($e,BitAND(BitShift($e,-7),0x9d2c5680)) $e = BitXOR($e,BitAND(BitShift($e,-15),0xefc60000)) $e = BitXOR($e,BitShift($e,18)) Return $e EndFunc Greetings
  6. I have coded such an Eof-seperator ... If you want it, write to me at Icq (567004), I also have some questions about your Pe-Loader Let's talk
×
×
  • Create New...