Affichage des articles dont le libellé est Script. Afficher tous les articles
Affichage des articles dont le libellé est Script. Afficher tous les articles

jeudi 27 mars 2014

How to insert a time delay mid script topic




Hello all,
I am loving the assistance of this community. Im a coder of HTML PHP and some other stuff, and am trying to get into this. Thanks for all the help thus far.

Today, I'm trying to learn what I can about timers/clocks.

Is there a way to insert a timed delay mid-script?

eg:


Code:


if managers.hud then
  managers.hud:show_hint( { text = "Wait for it..." } )
end

-- CODE TO DELAY BY n TIME --

if managers.hud then
  managers.hud:show_hint( { text = "Boom!!" } )
end



-Brian





mardi 25 mars 2014

[Source] Script Engine topic




Here's some relevant info for tonight!

I figured you all are busy copy and pasting the basis of others and don't know what to do when an offset changes... So I did this nice bit of reversing for you to be able to figure it out on your own!

These structures can be used to identify the name and locations of the operator functions for your dis-assembly. So, as most of them are straight forward, it will increase the rate at which you find information or data you need for your cheat.

Special Thanks:
Me again. Seriously guys, I don't use other peoples work... They tend to be all C++ happy and stuff; I'm not.


Code:



/*
FYI: I work exclusively in C, C++ constructs are wrapped in their C equivalence;
 */

typedef void (*PFunc)();

typedef struct {
/*00*/        DWORD Index; // if translated
/*04*/        DWORD Length; // inited to strlen
/*08*/        CHAR Data[0]; // null terminated
} AString, *PString;

// C++: Generic Type holder, technically GameType<Type>
typedef struct {
        PVOID vFTable;
        PVOID pType;
        PVOID pBuffer;
} GameType;

// C++: BinaryOperator
typedef struct {
/*00*/PVOID vFTable;
/*04*/PString Name; // A copy of the name from the GameInstructionOperator
/*08*/PFunc Function; // This is the function which carries out the operation.
/*0C*/GameType Unknown[3];
} BinaryOperator, *PBinaryOperator; // sizeof(BinaryOperator)=0x30; confirmed

// C++: GameInstructionOperator : Assumed similarities to other GameInstruction(Classes)
typedef struct {
/*00*/PVOID vFTable;
/*04*/PString Name;
/*08*/DWORD Four; // Seemingly it's always 4. It maketh no sense?
/*0C*/PVOID Operation; // Pointer to (Nullar/Unary/Binary)Operator (0,1,2 args)
/*10*/PString Type; // Typically void (null)
/*14*/PString Arguments;
/*18*/PString Description;
/*1C*/PString Example;
/*20*/PString Unk04;
/*24*/PString Version;
/*28*/PString Unk05;
/*2C*/PString Unk06;
/*30*/PFunc KeyFrame;
} GameInstruction; // sizeof()=0x34 ? seems so


So, as I'm sure you're going to wonder, "What about NullarOperator and UnaryOperator?" Well, as it turns out: They all share BinaryOperator's structure only GameType array is 1, and 2 respectively... The GameType's are the way the script engine limits the types being passed coerced... NullarOperator, where regex "(<NullarOperator>This, (<BinaryOperator>Arg1, (<UnaryOperator>Arg2)))"

Your welcome.





mardi 18 mars 2014

Is there a super ultra wipe flashable script? topic




My phone's software/kernel/partition (or something like that) is so messed up that my battery life sucks on all roms (even on roms I changed back to after receiving the problem that never had the problem), my phone seems to overheat, and reboots/freezes all the time. Battery stats says nothing really. My battery life is like TWO to THREE times LESS than before I flashed a bunch of ROM and kernels.

So basically I need something flashable that:

- Wipe all RE-BUILDABLE partitions COMPLETELY (and then rebuilds them) and/or gives cleans all partitions
- Formats and cleans everything on the phone (in a way it doesn't break any default features of the phone)
- Fixes any kernel bugs/glitches that retain after flashing
- Fixes all modem issues (like that flashable modem fix I saw but incorporated with everything above)
- Sets everything to default settings
- COMPLETELY and SAFELY removes Wanam and XPOSED framework out of the phone (I think it is causing me problems)

Basically, I think I broke something and want to completely fix the issue, so I can SUPER clean flash a KitKat rom and not have uncommon issues that the ROM does not have (I'm currently on 4.3)





[Request] cod uo double damage script topic




i am looking for call of duty united offensive bullet double damage script. can anyone help?





dimanche 16 mars 2014

[Q] [SH] Script topic




Hi,

Is it possible to run .SH file in Android Phone? I am trying to update WiFi driver. I have downloaded this: https://dl.google.com/dl/android/aos...h-e7a74920.tgz

Is it even possible to update this driver? You will ask why?

I have some difficulties with connecting N4 to my router and want to check if it will work.

Thanks in advance.





vendredi 7 mars 2014

HELP with android script+ modify xml topic




Hello everyone, this is the only place where I could ever find help to my project.
I need to create a script that opens url that redirects to playstore,
example: the script will open the url that redirects to a specific game or app and then the app opens itself from playstore.
the app should open only if it is already installed, not if there is BUY option or free install option.
is it possible?? somebody could points me toward the open button option in the ps apk??





jeudi 6 mars 2014

Re: script uses up all memory topic




On Wed, Mar 5, 2014 at 5:27 PM, Larry Martell <(E-Mail Removed)> wrote:
> I have a script that forks off other processes and attempts to manage
> them. Here is a stripped down version of the script:
>
> self.sleepTime = 300
> self.procs = {}
> self.startTimes = {}
> self.cmd = ['python', '/usr/local/motor/motor/app/some_other_script.py']
>
> while True:
> try:
> self.tools = Tool.objects.filter(ip__isnull=False)
> except Exception, e:
> print 'error from django call: ' + str(e)
> sys.exit(1)
>
> for tool in self.tools:
> name = tool.name
> if name in self.procs:
> if self.procs[name].poll() is None:
> if
> (datetime.datetime.now()-self.startTimes[name]) >
> datetime.timedelta(hours=12):
> # it's been running too long - kill it
> print 'killing script for ' + name + "
> it's been running too long"
> self.procs[name].kill()
> else:
> continue
>
> if self.procs[name].returncode:
> print 'scrikpt failed for ' + name + ', error
> = ' + str(self.procs[name].returncode)
>
> print 'starting script.py for ' + name + ' at ' +
> str(datetime.datetime.now())
> try:
> self.procs[name] = subprocess.Popen(self.cmd)
> self.startTimes[name] = datetime.datetime.now()
> except Exception, e:
> print 'error from Popen: ' + str(e)
> sys.exit(1)
> else:
> print 'starting script.py for ' + name + ' at ' +
> str(datetime.datetime.now())
> try:
> self.procs[name] = subprocess.Popen(self.cmd)
> self.startTimes[name] = datetime.datetime.now()
> except Exception, e:
> print 'error from Popen: ' + str(e)
> sys.exit(1)
>
> time.sleep(self.sleepTime)
>
>
> The script does what it's intended to do, however after about 2 hours
> it has used up all the memory available and the machine hangs. Can
> anyone see something that I am doing here that would be using memory
> like this? Perhaps some immutable object needs to be repeatedly
> recreated?


I figured out what is causing this. Each pass through the loop it does:

self.tools = Tool.objects.filter(ip__isnull=False)

And that is what is causing the memory consumption. If I move that
outside the loop and just do that once the memory issue goes away. Now
I need to figure out why this is happening and how to prevent it as
they do want to query the db each pass through the loop in case it has
been updated.





Re: script uses up all memory topic




On Thu, Mar 6, 2014 at 4:56 PM, Larry Martell <(E-Mail Removed)> wrote:
> On Wed, Mar 5, 2014 at 5:27 PM, Larry Martell <(E-Mail Removed)> wrote:
>> I have a script that forks off other processes and attempts to manage
>> them. Here is a stripped down version of the script:
>>
>> self.sleepTime = 300
>> self.procs = {}
>> self.startTimes = {}
>> self.cmd = ['python', '/usr/local/motor/motor/app/some_other_script.py']
>>
>> while True:
>> try:
>> self.tools = Tool.objects.filter(ip__isnull=False)
>> except Exception, e:
>> print 'error from django call: ' + str(e)
>> sys.exit(1)
>>
>> for tool in self.tools:
>> name = tool.name
>> if name in self.procs:
>> if self.procs[name].poll() is None:
>> if
>> (datetime.datetime.now()-self.startTimes[name]) >
>> datetime.timedelta(hours=12):
>> # it's been running too long - kill it
>> print 'killing script for ' + name + "
>> it's been running too long"
>> self.procs[name].kill()
>> else:
>> continue
>>
>> if self.procs[name].returncode:
>> print 'scrikpt failed for ' + name + ', error
>> = ' + str(self.procs[name].returncode)
>>
>> print 'starting script.py for ' + name + ' at ' +
>> str(datetime.datetime.now())
>> try:
>> self.procs[name] = subprocess.Popen(self.cmd)
>> self.startTimes[name] = datetime.datetime.now()
>> except Exception, e:
>> print 'error from Popen: ' + str(e)
>> sys.exit(1)
>> else:
>> print 'starting script.py for ' + name + ' at ' +
>> str(datetime.datetime.now())
>> try:
>> self.procs[name] = subprocess.Popen(self.cmd)
>> self.startTimes[name] = datetime.datetime.now()
>> except Exception, e:
>> print 'error from Popen: ' + str(e)
>> sys.exit(1)
>>
>> time.sleep(self.sleepTime)
>>
>>
>> The script does what it's intended to do, however after about 2 hours
>> it has used up all the memory available and the machine hangs. Can
>> anyone see something that I am doing here that would be using memory
>> like this? Perhaps some immutable object needs to be repeatedly
>> recreated?

>
> I figured out what is causing this. Each pass through the loop it does:
>
> self.tools = Tool.objects.filter(ip__isnull=False)
>
> And that is what is causing the memory consumption. If I move that
> outside the loop and just do that once the memory issue goes away. Now
> I need to figure out why this is happening and how to prevent it as
> they do want to query the db each pass through the loop in case it has
> been updated.


Apparently the object returned by that call is immutable as if I look
at id(self.tools) each pass through the loop, it is different. Is
there some way I can recover that memory?





Re: script uses up all memory topic




On Fri, Mar 7, 2014 at 8:56 AM, Larry Martell <(E-Mail Removed)> wrote:
> I figured out what is causing this. Each pass through the loop it does:
>
> self.tools = Tool.objects.filter(ip__isnull=False)
>
> And that is what is causing the memory consumption. If I move that
> outside the loop and just do that once the memory issue goes away. Now
> I need to figure out why this is happening and how to prevent it as
> they do want to query the db each pass through the loop in case it has
> been updated.


Interesting. So the next thing to do is to look into the
implementation of that. Does it allocate database resources and not
free them? Does it have internal reference loops?

Something to try: Put an explicit gc.collect() call into the loop. If
that solves your problem, you have a refloop somewhere (and you can
properly fix it by explicitly breaking the loop). If that keeps
returning large numbers, and especially if it populates gc.garbage
with a whole lot of stuff, then you definitely have refloops.

http://docs.python.org/2/library/gc.html

ChrisA





Re: script uses up all memory topic




On Fri, Mar 7, 2014 at 9:07 AM, Larry Martell <(E-Mail Removed)> wrote:
> Apparently the object returned by that call is immutable as if I look
> at id(self.tools) each pass through the loop, it is different. Is
> there some way I can recover that memory?


Not sure what mutability has to do with that. The changing id() simply
means you're getting back a new object every time. Normally, as soon
as your rebind self.tools to the new object, the old object will be
disposed of - unless it has refloops, which is what I mentioned in the
previous post, or has some other external reference.

ChrisA





Re: script uses up all memory topic




On Thu, Mar 6, 2014 at 5:11 PM, Chris Angelico <(E-Mail Removed)> wrote:
> On Fri, Mar 7, 2014 at 8:56 AM, Larry Martell <(E-Mail Removed)> wrote:
>> I figured out what is causing this. Each pass through the loop it does:
>>
>> self.tools = Tool.objects.filter(ip__isnull=False)
>>
>> And that is what is causing the memory consumption. If I move that
>> outside the loop and just do that once the memory issue goes away. Now
>> I need to figure out why this is happening and how to prevent it as
>> they do want to query the db each pass through the loop in case it has
>> been updated.

>
> Interesting. So the next thing to do is to look into the
> implementation of that. Does it allocate database resources and not
> free them? Does it have internal reference loops?
>
> Something to try: Put an explicit gc.collect() call into the loop. If
> that solves your problem, you have a refloop somewhere (and you can
> properly fix it by explicitly breaking the loop). If that keeps
> returning large numbers, and especially if it populates gc.garbage
> with a whole lot of stuff, then you definitely have refloops.
>
> http://docs.python.org/2/library/gc.html



First I added del(self.tools) before the Django call. That did not
stop the memory consumption. Then I added a call to gc.collect() after
the del and that did solve it. gc.collect() returns 0 each time, so
I'm going to declare victory and move on. No time to dig into the
Django code. Thanks.





Re: script uses up all memory topic




Chris Angelico <(E-Mail Removed)>:

> Not all problems need to be solved perfectly :) But at very least, I
> would put a comment against your collect() call explaining what
> happens: that self.tools is involved in a refloop. Most Python code
> shouldn't have to call gc.collect(), so it's worth explaining why you
> are here.


Refloops also are nothing to be avoided. Let GC do its job and forget
about it.


Marko





mercredi 5 mars 2014

Re: script uses up all memory topic




On Thu, Mar 6, 2014 at 11:20 AM, Larry Martell <(E-Mail Removed)> wrote:
> On Wed, Mar 5, 2014 at 5:39 PM, Chris Angelico <(E-Mail Removed)> wrote:
>> On Thu, Mar 6, 2014 at 9:27 AM, Larry Martell <(E-Mail Removed)> wrote:
>>> I have a script that forks off other processes and attempts to manage
>>> them. Here is a stripped down version of the script:
>>>
>>> self.sleepTime = 300

>>
>> That's not a stand-alone script.

>
> No, that is just the part that does the work (inside the 'while
> true'). I'll try and post a standalone script tomorrow.
>
>> What environment is it running in?

>
> CentOS 6,4


That's not the whole environment, though. There's a mention of Django
- does this run inside some framework?

>> Can you reproduce the problem outside of that environment?

>
> I will try that tomorrow.


Running as a stand-alone script, still under CentOS, would be what I
mean by "outside of that environment". I'm talking about making
something that can be saved to my drive and executed, perhaps with a
stubby subprocess script (eg "import time; time.sleep(86400)").

>> Also: Can you simply use multiprocessing rather than going through all
>> the effort of subprocess.Popen?

>
> Perhaps. I didn't write this. A client gave it to me and said 'figure
> out why it uses up all the memory and hangs.' I've messed around with
> for days and cannot see anything that would consume so much memory.


Ah. Yeah, that would be a fun little job to play with. My random
thought: Do the subprocesses produce spammy log output? If so, the
monitor might be collecting it all and holding it in memory in case
you want it (not knowing that you don't). The default should be to
leave them connected to your process's stdio streams, though, so that
shouldn't be the issue.

ChrisA





Re: script uses up all memory topic




On Wed, Mar 5, 2014 at 7:33 PM, Chris Angelico <(E-Mail Removed)> wrote:
> On Thu, Mar 6, 2014 at 11:20 AM, Larry Martell <(E-Mail Removed)> wrote:
>> On Wed, Mar 5, 2014 at 5:39 PM, Chris Angelico <(E-Mail Removed)> wrote:
>>> On Thu, Mar 6, 2014 at 9:27 AM, Larry Martell <(E-Mail Removed)> wrote:
>>>> I have a script that forks off other processes and attempts to manage
>>>> them. Here is a stripped down version of the script:
>>>>
>>>> self.sleepTime = 300
>>>
>>> That's not a stand-alone script.

>>
>> No, that is just the part that does the work (inside the 'while
>> true'). I'll try and post a standalone script tomorrow.
>>
>>> What environment is it running in?

>>
>> CentOS 6.4

>
> That's not the whole environment, though. There's a mention of Django
> - does this run inside some framework?


The system this is part of uses Django, and this script makes use of
the django ORM, but it doesn't do any web stuff itself. It just kicks
off another script once for each tool found in the database, and
ensure that there's just one script pre tool running at a time, and
that no single script runs too long. The django part can easily be
removed.

>>> Can you reproduce the problem outside of that environment?

>>
>> I will try that tomorrow.

>
> Running as a stand-alone script, still under CentOS, would be what I
> mean by "outside of that environment". I'm talking about making
> something that can be saved to my drive and executed, perhaps with a
> stubby subprocess script (eg "import time; time.sleep(86400)").


Yes, I understand what you mean.

>
>>> Also: Can you simply use multiprocessing rather than going through all
>>> the effort of subprocess.Popen?

>>
>> Perhaps. I didn't write this. A client gave it to me and said 'figure
>> out why it uses up all the memory and hangs.' I've messed around with
>> for days and cannot see anything that would consume so much memory.

>
> Ah. Yeah, that would be a fun little job to play with. My random
> thought: Do the subprocesses produce spammy log output? If so, the
> monitor might be collecting it all and holding it in memory in case
> you want it (not knowing that you don't). The default should be to
> leave them connected to your process's stdio streams, though, so that
> shouldn't be the issue.


Ohh, that's a good random thought. I'll try that tomorrow and see if
that's the issue.





Re: script uses up all memory topic




On Wed, Mar 5, 2014 at 5:39 PM, Chris Angelico <(E-Mail Removed)> wrote:
> On Thu, Mar 6, 2014 at 9:27 AM, Larry Martell <(E-Mail Removed)> wrote:
>> I have a script that forks off other processes and attempts to manage
>> them. Here is a stripped down version of the script:
>>
>> self.sleepTime = 300

>
> That's not a stand-alone script.


No, that is just the part that does the work (inside the 'while
true'). I'll try and post a standalone script tomorrow.

> What environment is it running in?


CentOS 6,4

> Can you reproduce the problem outside of that environment?


I will try that tomorrow.

> Also: Can you simply use multiprocessing rather than going through all
> the effort of subprocess.Popen?


Perhaps. I didn't write this. A client gave it to me and said 'figure
out why it uses up all the memory and hangs.' I've messed around with
for days and cannot see anything that would consume so much memory.





samedi 22 février 2014

Looking For A Specific Script topic




I'm looking for an ARMA2 script that will do something like;

on map click drop a box on a parachute with some stuff in it like a supply drop.





mercredi 5 février 2014

V6 Super Charger Script Problem topic




Hey guys I'm having problems with the v6 supercharger script, everything installed fine but now my battery doesn't seem to charge past 66%, I've left the phone on charge for over an hour and nothing has changed, is there a solution for this? Or anything so i can uninstall the script?

Thanks for your time :)





jeudi 30 janvier 2014

[Scripts] Some troll script for altis topic




Hello guys i looked at the Altis mod files and found some pretty fun stuff to do on cops or civilian. Retrain anybody, Escort them, and add "Fake coops" gears


Note codes are togglable, i suggest to bind them ;)
Restrain :


Code:


                        private["_unit"];
                        _unit = cursorTarget;
                        player setVariable["restrained",false,true];//unrestrain you
                        if(isNull _unit) exitWith {}; //Not valid
                       
                        //if(!(_unit isKindOf "Man")) exitWith {}; //Not a unit
                        if(!isPlayer _unit) exitWith {}; //Not a human
                        if(_unit getVariable "restrained") exitWith
                        {
                                if(isNull _unit) exitWith {}; //Not valid
                                _unit setVariable["restrained",false,true];
                        };
                        _unit setVariable["restrained",true,true];
                        [[player], "life_fnc_restrain", _unit, false] spawn life_fnc_MP;
                        [[0,format["%1 was restrained by %1", name _unit, name player]],"life_fnc_broadcast",west,false] spawn life_fnc_MP;


Escort :


Code:


                        private["_unit"];
                        _unit = cursorTarget;
                        if(isNull _unit) exitWith {}; //Not valid
                       
                        if(!(_unit isKindOf "Man")) exitWith {}; //Not a unit
                        if(!isPlayer _unit) exitWith {}; //remove that and you'll be able to escrot everything

                        if(_unit getVariable "Escorting") exitWith
                        {
                                if(isNull _unit) exitWith {}; //Not valid
                                detach _unit;
                                _unit setVariable["Escorting",false,true];
                        };
                       
                        _unit attachTo [player,[0,1,0]];
                        _unit setVariable["Escorting",true,true];
                        player reveal _unit;


Fake Cops :


Code:


_unit=player;
removeallweapons _unit;
removeVest _unit;

_unit addVest "V_Rangemaster_belt";
removebackpack _unit;

removeuniform _unit;
_unit addUniform "U_Rangemaster";

//_unit addBackpack "B_Carryall_Base";//you can add a backpack if you want to
_unit addWeapon "hgun_P07_snds_F";
player addWeapon "Binocular";


_magazines = getArray (configFile >> "CfgWeapons" >> "hgun_P07_snds_F" >> "magazines");

{
player addmagazine _x;
player addmagazine _x;
player addmagazine _x;
player addmagazine _x;
}foreach _magazines;

reload player;

hint format ["","You're now a Fake Cops"];


for more stuff like that look at the mod itself ;)





mercredi 29 janvier 2014

Simple initd script help topic




I'm looking to make an initd script that will mount my media_rw with full Rw permissions, can anyone help? Tried simply setting permissions using Fx file manager and root browser..works but have to redo on each reboot thanks in advance





[Help] How to convert cheat engine script on c++ topic




How to convert cheat engine script on c++ ?

for example this


Code:


[ENABLE]
Aobscan(_nametags, D9 80 80 00 00 00 8D 88 80 00 00 00 D9 41 08 DE D9 DF E0 F6 C4 41 ** ** D9 41 04 D9 41 0C )
Registersymbol(enable_NamePlates)
alloc(enable_NamePlates,4)
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(check)
label(nametags)

newmem:

originalcode:
db 8B 44 81 14 F6 40 06 01

cmp byte ptr [enable_NamePlates],(int)1
jne exit

check:
db 80 B8 8B 00 00 00 44
jne exit

nametags:
db C6 40 06 01


exit:
jmp returnhere

_nametags-A:
jmp newmem
nop
nop
nop
returnhere:

enable_NamePlates:
dd 0

[DISABLE]
Aobscan(_nametags, D9 80 80 00 00 00 8D 88 80 00 00 00 D9 41 08 DE D9 DF E0 F6 C4 41 ** ** D9 41 04 D9 41 0C )
Unregistersymbol(enable_NamePlates)
dealloc(enable_NamePlates)
dealloc(newmem)
_nametags-A:
db 8B 44 81 14 F6 40 06 01