Leaderboard
Popular Content
Showing content with the highest reputation on 02/20/2015 in all areas
-
Code Usage Etiquette?
Xandy and 2 others reacted to jvanegmond for a topic
The laws concerning this scenario are broken beyond belief. Placing anything on the internet means you are distributing your software to every country, you need to comply with all of their individual laws. You're not only dealing with classical author copyright (since code is text and someone authored it), you're dealing with software patents as well and don't forget overly broad laws like the PATRIOT act which can be used against you no matter where you live or what you're doing. And most countries do extradite to the US for blatantly made-up charges, consider yourself fortunate if yours doesn't. It takes a lifetime to really study the relevant laws concerning what you're doing if you're limiting yourself to distribution in a single country, if you're distributing to the world it takes many many multiples of lifetimes -- or an army of lawyers. This is generally why web-based companies will launch in a single country and make their services available in other countries at a later date, once they know their service is profitable and they have the equity to be able to afford plenty of lawyers in said country. On the upside, despite all of the brokenness and frivolous lawsuits, the world keeps spinning, the sun comes up for nothing and the internet is still working to a reasonable degree. You can waste a lot of time on licensing your code to cover your ass, but in practice it doesn't work and you might as well have slapped on something that looks good and official (eg MIT or Apache). Generally speaking, if you're not doing it for profit, it is better to ask forgiveness rather than permission and try not to upset anyone with power/money/influence to send mean looking lawyers and threatening letters your way.3 points -
I have wrote a lot of binary code library for AutoIt before. I also discover many ways to generate binary code for AutoIt in the past. However, all of them have limitation or need some extra effort. Recently, I think I found the best and easiest way to generate the binary code. So I wrote this UDF, may be my last one about binary code. The Features:Both AutoIt x86 and x64 version are supported.Windows API and static variables can be use (code relocation supported).Decompression at run-time with smallest footprint LZMA decoder.Allocated memory blocks are released automatically.Most C source code works without modification.Two step or one step script generation, very easy to use.How It Works: The C source code must be compiled by MinGW GCC with "-S -masm=intel" option. Output is GAS syntax assembly file.BinaryCall Tool is able to convert the GAS syntax assembly file (*.s) to FASM syntax (*.asm). During the conversion, global symbols will be stored as "Symbol Jump Table" at the head of the file. The output file should be able to be assembled to binary file under command line by FASM.EXE. This syntax conversion is step 1.The step 2 is to assemble the file. BinaryCall Tool will use the embedded FASM to assemble every file twice to generate the relocation table. "BinaryCall.inc" will be included automatically before assembling to detect the Windows API and generate the "API Jump table". All the results will be compressed and converted to AutoIt script output.There are two major functions in the output script. _BinaryCall_Create() function allocates memorys, decompress the binary, relocates the address in memory, and fills the "API Jump Table"._BinaryCall_SymbolList() converts the "Symbol Jump Table" to memory addresses, and then store them as pointers in a DllStruct variable.Finally, we can use DllCallAddress() to call the memory address stored in the DllStruct.Step by Step Tutorial: Write C source code:#include <windows.h> void main() { MessageBox(0, "Hello", "Welcome Message", 1); }Use GCC MinGW 32/64 to compile the source code: gcc -S -masm=intel -m32 MessageBox.cUse BinaryCall Tool "GAS2AU3 Converter", select "MessageBox.s": If Not @AutoItX64 Then Local $Code = '...' Local $Reloc = '...' Local $Symbol[] = ["main"] Local $CodeBase = _BinaryCall_Create($Code, $Reloc) If @Error Then Exit Local $SymbolList = _BinaryCall_SymbolList($CodeBase, $Symbol) If @Error Then Exit EndIfPaste the output script, call the main() in AutoIt: #Include "BinaryCall.au3" ; Paste output here DllCallAddress("none:cdecl", DllStructGetData($SymbolList, "main"))Try to run it! Change Log:v1.0Initial release.v1.1A lot of improvement for GAS2ASM converter and FASM header file.Add many C Run-Time library as inline asm subroutines.Add command-line to argc/argv parser for easy calling main() function.Add ability to redirect stdio.More C source code can work without modification in this version. Following open source projects are tested. And Yes, they can run as binary code library in AutoIt now. SQLite 3.8.5 TCC 0.9.26 PuTTY beta 0.63 v1.2Dynamic-link library (DLL) calling is supported now. If the C program requires a DLL file to run, just put it together with the source file. BinaryCall Tool will searches *.dll and exports all the symbols in these DLL files automatically. Of course, you need these DLL files when run the output script. However, it also works if you loaded them by last version of MemoryDll UDF.To add more Windows API library easily by editing the ini file.Better error handling and more error messages in output script.Add zero padding to avoid short jumps that crash the relocation table.BinaryCall Tool accepts drag and drop files now.Some small bug fixed. BinaryCall 1.0.zip BinaryCall 1.1.zip BinaryCall 1.2.zip1 point
-
Your public IP (STUN protocol)
coffeeturtle reacted to trancexx for a topic
Usually you get IP info by connecting to some site that echoes your IP address. The bad thing about that method is almost proverbial need of site administrators to make changes to sites or their policies requiring from you to frequently update your code. Another issue could be caching thingy of the Inet approach. I did some reading about alternative ways to get public IP, and initially tried with SMTP. This Works great but it's kind of slow and on top of that some ISPs tend to block users on port 25 to prevent spam. Then further reading lead me to STUN protocol documentation. STUN servers are made to resolve and echo users' IP addresses, and are often used by VoIP services. The protocol is extremly simple and everything happens very quickly. Client connects (it's UDP so you Know what Imean), sends request, server replies, client parses the response and IP is there. RFC5389 describes STUN in details, so knock yourself out, if you are that crazy. I have found some implementations written in c++ and c sharp, but OMG, some people are just to stubborn and love to write incomprehensible idiotic hundreds of thousands kilobytes of code for something as simple as STUN. That went nowhere for me and gave me only the pain, so I just fall back to RFC and wrote my own client based on documentation. Function is called STUN_GetMyIP() and you can find example of usage in this little script. It's UDP this and UDP that: STUN.au3 If something wouldn't work, do say.1 point -
And everyone please take a deep breath before someone oversteps the mark (which has already been approached pretty closely) and I have to put on my Mod hat... square65, I agree that the documentation does not appear to have a note of the requirement for arrays to be scoped on declaration in all cases - which makes me wonder why no-one has ever raised the point before. Perhaps everyone else did "realize the scope specifier was absolutely necessary", despite not being as good a programmer as your good self. I will add something to the "Array" section of the "Language Reference - Variables" page and to the "Arrays" Wiki tutorial for the enlightenment of future searchers. M231 point
-
You have done nothing of the sort, word walls in coding forums should probably include actual code, otherwise it is nonsense. Tell us more about this awesome first project......that obviously doesnt use arrays.1 point
-
$str = "True" If StringInStr($str, "a" or "b") Then MsgBox(0, "", "Found it") its obfuscation1 point
-
This sticky question is why I added into my signature that all the code I post here is free to use by all. Whether it's valid legally isn't important, it tells everyone that I don't care if they use anything I post and I'm not coming after them if they use it.1 point
-
GuiBuilderNxt - Reboot [08/18/2016]
TheSaint reacted to jaberwacky for a topic
Latest update. Please see >op for details.1 point -
Same code, different results
SorryButImaNewbie reacted to jdelaney for a topic
Wouldn't this be much easier|quicker|reliable to rename a file? FileMove1 point -
Same code, different results
SorryButImaNewbie reacted to TheSaint for a topic
Nothing seems obvious to me. You really should make a function and reduce that code by about three quarters. It will also help with troubleshooting. Basically, you can just add a parameter to the Function call for each PDF. i.e. RenamePDF("Pdf_1") RenamePDF("Pdf_2") RenamePDF("Pdf_3") RenamePDF("Pdf_4") Func RenamePDF($pdf) $name = $pdf ; Your one lot of repeated code here. ; EndFunc Instead of repeating each function call for each pdf (RenamePDF("Pdf_1")), you could create a loop, but as it is only four lines I probably wouldn't bother. P.S. I would ignore the $name variable, and just use $pdf where you need to. $name was only added to make you think. Likewise Pdf_1 etc. Just use your equivalents.1 point -
yes, you can if you start coding with the simple functions in the iuiautomation library. but for sure doing it thru UI interfaces is most likely not efficient and/or fast suggestion is to post in general help and support of even in gmail forums https://developers.google.com/gmail/api/guides/sending http://en.wikipedia.org/wiki/Collaboration_Data_Objects https://developers.google.com/gmail/api/downloads1 point
-
Wordpress help
JohnOne reacted to jvanegmond for a topic
I make Wordpress websites in my spare time to earn a little on the side. If you need any advice, I've subscribed to this topic.1 point -
_HWID() Protect Your Script.
TouchOdeath reacted to nullschritt for a topic
Maybe if your arrogance didn't result in ignorance, which resulted in defeating the whole purpose of the function, I would be open to "suggestions", were that what it were, not half assed attempts to show me up/show off. I've seen your other posts too, always throwing in your "two cents" about how YOU think it ought to work. Guess what, it's not about YOU, especially when YOU often miss the point, as you clearly did with the hwid singleton post. It doesn't work the way you think it should? Too bad, modify it for your own use, it's not your job to destroy the original purpose of an idea, because you think your idea is superior. Re-release it as your own snippet You code does not make a HWID, not even close, it makes a software and hardware ID, which is useless for independently creating an ID based on only the hardware of the computer, you might as well take a bunch of random ass info and hash it together, if you want to go that route. k. thanks. Have a nice day.1 point -
Hello I need some help how to run a mifile.exe and delcara argument like myfile.exe /xpto and the xpto sould be a computername.1 point
-
Run with arguments
realtebo reacted to AdmiralAlkex for a topic
Or maybe he wants ro Run() that file. Run("myfile.exe /xpto") Something like that. Give it a try yourself, and if it fails, post your code and what you're having trouble with, and I'm sure someone will be able to help you.1 point -
New line in Msgbox
realtebo reacted to Rolstoelfreak for a topic
Hey all, Just a quick question. Is there a command to start a new line in a messagebox? So for example Msgbox (0, "title", "text on first line" & \n & " text on second line") Is this possible?1 point -
New line in Msgbox
oskrki reacted to Confuzzled for a topic
Cutted and posted directly from the help file: @CR Carriage return, Chr(13); sometimes used for line breaks. @LF Line feed, Chr(10); typically used for line breaks. @CRLF = @CR & @LF ;occasionally used for line breaks. So your code would be Msgbox (0, "title", "text on first line" & @LF & " text on second line")1 point