Jump to content

lionfaggot

Active Members
  • Posts

    201
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

lionfaggot's Achievements

Polymath

Polymath (5/7)

3

Reputation

  1. // ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://example.com/example // @grant GM.setClipboard // ==/UserScript== (function() { var waitForEl = setInterval(function() { if (typeof document.querySelector('.example') != 'undefined') { document.querySelector('.example').focus(); GM.setClipboard('fillMe:test text'); clearInterval(waitForEl); } }, 100); // wait for element to exist })(); the above snippet will wait every millisecond for a form with the classname example to exist. once it does it focuses on the form then sets the clipboard to fillMe:test text While 1 If StringInStr(ClipGet(), 'fillMe:') Then $cliprep = StringReplace(ClipGet(), 'fillMe:', '') ClipPut($cliprep) Send('^v') ClipPut('') EndIf Sleep(100) WEnd and then you have autoit infinitely check clip for wildcard fillMe: which then will send the specified text to the currently focused form. most forms on most websites will not work if you simply use .value because of the istrusted event. the only way to activate most forms on most websites these days is with actual end user hardware input, or by figuring out functions attached to these forms which is not usually worth doing. anyone whos needed an easy fix for this issue should thank me. run windows in a virtualbox and you can even have this run silently in the background without needing to keep the browser window active
  2. been a while since i been here everything changed, point me there good sir
  3. tampermonkey is a browser addon which evals javascript into webpages by match. recently i had run into a problem where .value could not set a form, so i did something awesome. tampermonkey comes with GM funcs which are in browser functionalities normally not aavailable to js on a webpage. GM.setClipboard is insanely useful alongside autoit, heres the deal. this function sets the clipboard to the specified text. so what you do is have tampermonkey wait for a form on a webpage to exist, focus on the form, set the clipboard to fillme:texthere then you have an autoit script wait for the clipboard to contain wildcard "fillme:" remove fillme: from text then Send(text) this literally is a godsend because most forms require actual keyboard input and its a very easy way to haave an event based system that doesnt tangle up. if anyone would like examples hit me up
  4. Func evaljs($object, $js) $jspliit = StringSplit($js, '\n') For $i = 0 To $jsplit[0] _IENavigate($object, 'javascript:' & $js) Next EndFunc
  5. _IENavigate($object, 'javascript:document.querySelector(".classname").href') easiest method is by far the above. my one lline example simply evals javascript to select the class then returns the href. i know this posst is old but i figured someone might bee interested to know this can be done in one line
  6. this bot just sits in channels sends an amsg to all channels at random and waits for pms then replies based on your autoreply. not too useful but it was a test script i made for irc stuff to come, it uses ie.au3 as the debug, i was thinking about making an irc client that uses ie as the debug in a way that allows you to use javascript and the like as client addon scripts. probably a tad insecure but itd be cool. the names it picks when it connects are grabbed from the random girls list on vampirefreaks.com, you can choose whether you wish to use the selected name or not. feel free to modify my stuff! here's the code: #NoTrayIcon #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <File.au3> Opt("GUIOnEventMode", 1) $Form1 = GUICreate("Mibbit Sextastic Bot", 623, 449, 192, 114) $OBJECT = ObjCreate("Shell.Explorer.2") $OBJECT_CTRL = GUICtrlCreateObj($OBJECT, 0, 0, 510, 350) $channels = GUICtrlCreateInput("channels to join, split channels using , to join multiple", 88, 368, 153, 21) $connect = GUICtrlCreateButton("CONNECT", 0, 368, 81, 57) $presponse = GUICtrlCreateInput("PM response message", 88, 400, 497, 21) $CLEAR = GUICtrlCreateButton("clear debug", 520, 24, 97, 25) $amsg = GUICtrlCreateButton("amsg", 520, 56, 97, 25) $camsg = GUICtrlCreateButton("delete amsg", 520, 86, 97, 25) GUISetState(@SW_SHOW) _IENavigate($OBJECT, "http://freewebs.com/goldnetwork/mibbot.html") GUISetOnEvent($GUI_EVENT_CLOSE, "_quit") GUICtrlSetOnEvent($connect, "_GConnect") GUICtrlSetOnEvent($CLEAR, "_GClear") GUICtrlSetOnEvent($amsg, "_Amsg") GUICtrlSetOnEvent($camsg, "_camsg") Func _quit() Exit EndFunc ;==>_quit TCPStartup() Global $isocket Global $nick = "Porkbot" Global $chan = "#porkworld" Global $respmsg = "" Global $debug = "<body bgcolor='black'><font color='lightgreen'><plaintext>" Global $blist = "" Global $go = 0 Global $input = "" Global $pcount = 0 Global $logon = 0 Func _GClear() Global $debug = "<body bgcolor='black'><font color='lightgreen'><plaintext>debug cleared..." & @CRLF _IEDocWriteHTML($OBJECT, $debug) EndFunc ;==>_GClear Func _camsg() FileDelete("amsg.txt") _debugme("Amsg list cleared...") $OBJECT.document.parentwindow.scroll(0, $OBJECT.document.body.scrollHeight / 900000) EndFunc ;==>_camsg Func _amsg() $input = InputBox("AMSG", "input something to msg all channels with occasionally") FileWrite("amsg.txt", $input & @CRLF) _debugme("Amsg list updated...") EndFunc ;==>_amsg Func _GConnect() If $go = 0 Then If StringMid(GUICtrlRead($channels), 1, 1) = "#" And GUICtrlRead($presponse) <> "" And GUICtrlRead($presponse) <> "PM response message" Then Global $go = 1 _setnick() Global $chan = GUICtrlRead($channels) Global $respmsg = GUICtrlRead($presponse) _IRConnect("irc.uk.mibbit.net") _debugme("Connecting...") GUICtrlSetData($connect, "DISCONNECT") Else MsgBox(0, "Alert", "Fill out all fields before connecting") EndIf Else $go = 0 $logon = 0 GUICtrlSetData($connect, "CONNECT") TCPCloseSocket($isocket) _debugme("DISCONNECTED...") EndIf EndFunc ;==>_GConnect Func _setnick() $vhtml = StringReplace(BinaryToString(InetRead("http://vampirefreaks.com/random_profiles.php?sex=female", 1)), ">", @CRLF) $vsplit = StringSplit($vhtml, @CRLF) $gay = Random(1, 50, 1) $z = 1 For $v = 1 To $vsplit[0] If StringInStr($vsplit[$v], "member_thumbnail") Then If $z = $gay Then $ppp = StringSplit($vsplit[$v], "/") Global $nick = $ppp[7] _debugme("Nick Selected: " & $nick) $proceed = MsgBox(4, "Do you wish to use the nickname " & $nick & "?", "Clicking no will generate another.") If $proceed = 7 Then _debugme("Retrying, selecting new nick...") _setnick() EndIf ExitLoop EndIf $z += 1 EndIf Next EndFunc ;==>_setnick Func _debugme($deb) $debug &= $deb & @CRLF _IEDocWriteHTML($OBJECT, $debug) $OBJECT.document.parentwindow.scroll(0, $OBJECT.document.body.scrollHeight) EndFunc ;==>_debugme Func _IRConnect($host, $port = 6667) $isocket = TCPConnect(TCPNameToIP($host), $port) If $isocket = -1 Then TCPCloseSocket($isocket) Return 0 Else TCPSend($isocket, "NICK " & $nick & @CRLF) TCPSend($isocket, "USER " & $nick & " 0 0 " & $nick & @CRLF) If @error Then TCPCloseSocket($isocket) Return 0 Else Return 1 EndIf EndIf EndFunc ;==>_IRConnect Func _Ping($presp) TCPSend($isocket, "PONG " & $presp & @CRLF) EndFunc ;==>_Ping Func _msg($targ, $msg) TCPSend($isocket, "PRIVMSG " & $targ & " :" & $msg & @CRLF) If @error Then TCPCloseSocket($isocket) Return 0 Else _debugme("MESSAGE TO " & $targ & ": <" & $nick & "> " & $msg) Return 1 EndIf EndFunc ;==>_msg Func _msgall() $line = FileReadLine("amsg.txt", Random(1, _FileCountLines("amsg.txt"), 1)) _msg($chan, $line) EndFunc ;==>_msgall While 1 Sleep(100) If $go = 1 Then $recv = TCPRecv($isocket, 65000) If @error Then $logon = 0 _debugme("Lost connection... reconnecting") _IRConnect("irc.uk.mibbit.net") EndIf $tsplit = StringSplit($recv, @CRLF) For $i = 1 To $tsplit[0] $tsp = StringSplit($tsplit[$i], " ") If $tsp[0] >= 2 Then If $tsp[1] = "PING" Then If FileExists("amsg.txt") Then $pcount += 1 If $pcount = 3 Then _msgall() $pcount = 0 EndIf EndIf $presp = $tsp[2] _Ping($presp) EndIf If $tsp[2] = "MODE" And $logon = 0 Then TCPSend($isocket, "JOIN " & $chan & @CRLF) _debugme("Connected... joined: " & $chan) $logon = 1 EndIf If $tsp[2] = "PRIVMSG" And $tsp[3] = $nick Then $kkk = StringSplit(StringReplace($tsp[1], ":", ""), "!") $rnick = $kkk[1] If StringInStr($blist, $rnick) = 0 Then If $rnick <> "IRC" Then $disp = "" For $a = 4 To $tsp[0] If $a = 4 Then $ddd = StringSplit($tsp[$a], ":") $disp &= $ddd[2] & " " Else $disp &= $tsp[$a] & " " EndIf Next _debugme("PM: <" & $rnick & "> " & $disp) _msg($rnick, $respmsg) $blist &= $rnick & @CRLF EndIf EndIf EndIf EndIf Next EndIf WEnd
  7. phantomjs is a headless webkit that is used often for web automation tasks obviously. i havent had much time to look at it yet but when i do ill update this thread, im fuzzy on the details i was told briefly of its uses by a friend on skype. basically, phantomjs would be like an upgrade to ie.au3, itd be faster etc.
  8. ok dude, as you can PLAINLY SEE, my function has no issues recording the cookie. but it wont USE the cookies. which makes no sense at all, like literally its fairy unicorn logic, and the reason no one can help me is because i can p much guarantee no one has gotten this to function, ever. not even once
  9. ok, great and all, but why is the request not using the cookie i specify? i can specify any value and it will not set the supplied cookie.
  10. yes, the cookie sets to file, but does not carry over in the request. if winhttp autohandles cookies then why am i having such a hard time carrying through with those provisions? i have no problems setting the cookie, the issue im having deals with using the set cookie
  11. so ive been told of the uses of phantomjs breifly from a pal on skype, and i found you could use this tool via C# - which leads me to believe it should be useable via autoit right? if someone can maybe take a detour and show me how to go about this i will make a phantomjs udf, which would be cool
  12. so uh, its been days so im gonna bump this again. surely someone knows why winhttp just refuses to handle cookies
  13. there are interpretation libraries for java if im not mistaken? other than ie obviously,
  14. this is probably the most complete set of http functions. will be updating soon to include header stripping to return body and headers seperately. also, im noting that lots of websites these days set the cookie using javascript. seems like a daunting task to take on. however i think it is necessary, i know quite a bit about javascript but im not sure how to tackle interpreting cookie events from it. any input appreciated!
  15. whats the website in question? this will not work on https at all, only http
×
×
  • Create New...